mirror of
https://github.com/boostorg/hana.git
synced 2026-01-22 05:12:35 +00:00
- Write sections on containers, algorithms, and runtime performance - Make sure examples consistently use 2 space tabs - Disable -Wunused-parameter for examples - Resolves #70 The requirement of pure functions is now documented. - Resolves #14 It turns out that the benefits of specifying the type of containers seems to be essentially limited to pattern matching. This is not enough to justify all the bad things it brings, especially considering the fact that recursion (currently the only use case for pattern matching) forces the creation of a new tuple at each step, which is disastrous. The unspecified-ness of the container's type is now documented.
20 lines
474 B
C++
20 lines
474 B
C++
/*
|
|
@copyright Louis Dionne 2015
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
|
*/
|
|
|
|
#include <boost/hana/assert.hpp>
|
|
|
|
//! [main]
|
|
#include <boost/hana/ext/std/tuple.hpp>
|
|
#include <tuple> // still required to create a tuple
|
|
using namespace boost::hana;
|
|
|
|
|
|
int main() {
|
|
constexpr std::tuple<int, char, float> xs{1, '2', 3.0f};
|
|
BOOST_HANA_CONSTEXPR_CHECK(head(xs) == 1);
|
|
}
|
|
//! [main]
|