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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user