Questions tagged [boost-mpl]

The Boost.MPL library is a general-purpose, high-level C++ template metaprogramming framework of compile-time algorithms, sequences and metafunctions. It provides a conceptual foundation and an extensive set of powerful and coherent tools that make doing explicit metaprogramming in C++ as easy and enjoyable as possible within the current language.

The Boost.MPL library is a general-purpose, high-level C++ template metaprogramming framework of compile-time algorithms, sequences and metafunctions. It provides a conceptual foundation and an extensive set of powerful and coherent tools that make doing explicit metaprogramming in C++ as easy and enjoyable as possible within the current language.

289 questions
1
vote
1 answer

Problems using mpl::if_, boost::function, and a typedef to void

I'm new to the Boost.MPL library, and have some "beginners-problems" Look at this sample: template < typename F > struct A { typedef boost::function_types::parameter_types P; typedef typename boost::function_types::result_type::type R; …
Allan
  • 4,562
  • 8
  • 38
  • 59
1
vote
1 answer

Create a functor from a MPL metafunction class

I've been looking for a class in MPL that will create a function object from a sufficiently well-behaved MPL metafunction class. I hand-rolled this implementation: template struct functor { typedef Result…
thiton
  • 35,651
  • 4
  • 70
  • 100
1
vote
2 answers

How to join type and mpl::vector into a new vector

I use the following construct to create a mpl vector of types. struct Struct1{ typedef int type; }; struct Struct2{ typedef float type; }; template struct TypeReader{ typedef typename T::type type; }; int main() { …
mkaes
  • 13,781
  • 10
  • 52
  • 72
1
vote
0 answers

question about using mpl::range_c with mpl::fold

i have below simple function to convert a mpl::vector<...> to pack<...> namespace mpl = boost::mpl; template struct pack{}; struct A{}; struct B{}; template struct mp_append_impl; template