-
Notifications
You must be signed in to change notification settings - Fork 48
as_tuple
Joel Falcou edited this page Jun 24, 2015
·
2 revisions
template <typename L>
struct as_tuple;
Transforms a sequence into an std::tuple
.
Brigand collection can only hold types, to be able to work with values, you need to build object such as tuples.
#include <brigand/adapted/as_tuple.hpp>
- L - A sequence of any length
#include <utility>
#include <brigand/adapted/as_tuple.hpp>
#include <brigand/sequences/list.hpp>
using the_list = brigand::list<int, char, bool>;
using the_tuple = brigand::as_tuple<the_list>;
// equivalent of writing std::tuple<int, char, bool>
the_tuple t;