C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter-3-twice.hpp
Go to the documentation of this file.
1// ===-- chapter-3/chapter-3-twice.hpp -------------------- -*- C++ -*- --=== //
9#ifndef CHAPTER_3_TWICE
10#define CHAPTER_3_TWICE
11
12#include <boost/mpl/apply.hpp>
13
14
17namespace chapter3 {
18
27template <typename F, typename X>
28struct twice : boost::mpl::apply<F, typename boost::mpl::apply<F, X>::type> { };
29
30} // namespace chapter3
31
32#endif // CHAPTER_3_TWICE
Provide utilities availble to all Chapter 3 solutions.
Apply a metafunction to its own result.