2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-31 20:22:10 +00:00

[String] Remove the Constant model and document why

This commit is contained in:
Louis Dionne
2015-02-10 15:47:22 -05:00
parent 88549c004c
commit 5dd70cbf3a
4 changed files with 18 additions and 82 deletions

View File

@@ -7,7 +7,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/assert.hpp>
#include <boost/hana/core/models.hpp>
#include <boost/hana/detail/constexpr.hpp>
#include <boost/hana/integral_constant.hpp>
#include <boost/hana/integral.hpp>
#include <boost/hana/maybe.hpp>
#include <boost/hana/string.hpp>
using namespace boost::hana;
@@ -55,14 +55,6 @@ BOOST_HANA_CONSTANT_CHECK(
}{
//! [constant]
/* not constexpr */ auto abcdef = BOOST_HANA_STRING("abcdef");
constexpr char const* s = value(abcdef);
static_assert(s[2] == 'c', "");
//! [constant]
}{
//! [foldable]
auto sum_string = [](auto str) {
return foldl(str, int_<0>, [](auto sum, auto c) {