template<typename T, T ... v>
struct std::integer_sequence< T, v >
Adaptation of std::integer_sequence
for Hana.
Modeled concepts
Comparable
Two std::integer_sequence
s are equal if and only if they have the same number of elements, and if corresponding elements compare equal. The types of the elements held in both integer_sequence
s may be different, as long as they can be compared.
#include <utility>
int main() { }
Defines macros to perform different kinds of assertions.
Defines boost::hana::equal.
constexpr auto equal
Returns a Logical representing whether x is equal to y.
Definition: equal.hpp:64
constexpr auto not_equal
Returns a Logical representing whether x is not equal to y.
Definition: not_equal.hpp:54
#define BOOST_HANA_CONSTANT_CHECK(...)
Equivalent to BOOST_HANA_CONSTANT_ASSERT, but not influenced by the BOOST_HANA_CONFIG_DISABLE_ASSERTI...
Definition: assert.hpp:239
Adapts std::integer_sequence for use with Hana.
Namespace containing everything in the library.
Definition: accessors.hpp:20
Defines boost::hana::not_equal.
Adaptation of std::integer_sequence for Hana.
Definition: integer_sequence.hpp:60
Foldable
Folding an integer_sequence
is equivalent to folding a sequence of std::integral_constant
s with the corresponding types.
#include <tuple>
#include <utility>
auto add = [](auto a, auto b, auto c) { return a + b + c; };
int main() {
return add(std::get<decltype(i)::
value>(tuple)...);
});
}
constexpr auto value
Return the compile-time value associated to a constant.
Definition: value.hpp:54
constexpr auto sum
Compute the sum of the numbers of a structure.
Definition: sum.hpp:66
constexpr auto unpack
Invoke a function with the elements of a Foldable as arguments.
Definition: unpack.hpp:79
#define BOOST_HANA_RUNTIME_CHECK(...)
Equivalent to BOOST_HANA_RUNTIME_ASSERT, but not influenced by the BOOST_HANA_CONFIG_DISABLE_ASSERTIO...
Definition: assert.hpp:209
Adapter for std::tuples.
Definition: tuple.hpp:49
Defines boost::hana::unpack.
Iterable
Iterating over an integer_sequence
is equivalent to iterating over a sequence of the corresponding std::integral_constant
s.
#include <type_traits>
#include <utility>
hana::at_c<2>(indices),
));
int main() { }
Defines boost::hana::at and boost::hana::at_c.
Adapts std::integral_constant for use with Hana.
Adapter for std::integral_constants.
Definition: integral_constant.hpp:37
Searchable
Searching through an integer_sequence
is equivalent to searching through the corresponding sequence of std::integral_constant
s.
#include <type_traits>
#include <utility>
));
int main() { }
Defines boost::hana::find.
constexpr auto find
Finds the value associated to the given key in a structure.
Definition: find.hpp:44
Defines boost::hana::integral_constant.
Defines boost::hana::optional.