mirror of https://github.com/edouarda/brigand.git
2
as_tuple
Joel Falcou edited this page 10 years ago
Synopsis
template <typename L>
struct as_tuple;
Description
Transforms a sequence into an std::tuple
.
When to use
Brigand collection can only hold types, to be able to work with values, you need to build object such as tuples.
Header
#include <brigand/adapted/as_tuple.hpp>
Parameters
- L - A sequence of any length
Example
#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;