C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise-3-6.hpp
Go to the documentation of this file.
1
// ===-- chapter-3/exercise-3-6.hpp ----------------------- -*- C++ -*- --=== //
9
#ifndef EXERCISE_3_6
10
#define EXERCISE_3_6
11
12
#include <boost/mpl/apply.hpp>
13
14
28
namespace
exercise_3_6
{
29
31
struct
twice_lambda
32
{
39
template
<
typename
F,
typename
X>
40
struct
apply
41
: boost::mpl::apply<F, typename boost::mpl::apply<F, X>::type> { };
42
};
43
44
}
// namespace exercise_3_6
45
46
#endif
// EXERCISE_3_6
exercise_3_6
Encapsulate solution for Exercise 3-6.
Definition:
exercise-3-6.hpp:28
exercise_3_6::twice_lambda::apply
When applied, performs the given function twice.
Definition:
exercise-3-6.hpp:41
exercise_3_6::twice_lambda
A lambda to perform a metafunction twice.
Definition:
exercise-3-6.hpp:32
chapter-3
exercise-3-6.hpp
Generated on Fri Mar 8 2024 12:11:47 for C++ Template Metaprogramming by
1.9.6