Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12447 closed Support Requests (invalid)

Need some help with a lambda expression exercize

Reported by: JUAN DENT <juandent@…> Owned by: Aleksey Gurtovoy
Milestone: To Be Determined Component: mpl
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

Hi, I am studying "C++ Template Metaprogramming" and stuck in exercise 3-6 which states:

"Build a lambda expression that has functionality equivalent to 'twice'. Hint: mpl::apply is a metafunction!"

Now twice is defined like so:

template<class F, class X>
struct twice
: mpl::apply< F, typename mpl::apply<F,X>::type>
{};

The book defines a lambda expression as: "callable metadata. they have 2 basic forms: metafunction classes and placeholder expressions".

Thank you for your help! Juan

Change History (3)

comment:1 by anonymous, 6 years ago

So the twice functionality is alriedy defined? Which help you need? Consider putting some bounty on your ticket using bountysource service https://www.bountysource.com/teams/boost-c-libraries/issues?tracker_ids=160301

comment:2 by Michel Morin, 6 years ago

Resolution: invalid
Status: newclosed

comment:3 by Michel Morin, 6 years ago

As I said in another ticket, the bug tracker is not the right place to ask the questions. Please try asking your questions on Boost-users ML , StackOverflow , or other sites/services for the next time.

Note: See TracTickets for help on using tickets.