/usr/include/boost/hana
NameSizeModeActions
concept/-0755rm
core/-0755rm
detail/-0755rm
experimental/-0755rm
ext/-0755rm
functional/-0755rm
fwd/-0755rm
accessors.hpp15130644editdlrm
adapt_adt.hpp4220644editdlrm
adapt_struct.hpp4370644editdlrm
adjust.hpp16980644editdlrm
adjust_if.hpp25150644editdlrm
all.hpp13270644editdlrm
all_of.hpp15700644editdlrm
and.hpp16670644editdlrm
any.hpp13270644editdlrm
any_of.hpp75310644editdlrm
ap.hpp24960644editdlrm
append.hpp23570644editdlrm
assert.hpp163250644editdlrm
at.hpp16590644editdlrm
at_key.hpp30090644editdlrm
back.hpp15340644editdlrm
basic_tuple.hpp94550644editdlrm
bool.hpp97470644editdlrm
cartesian_product.hpp38600644editdlrm
chain.hpp14880644editdlrm
comparing.hpp12220644editdlrm
concat.hpp27120644editdlrm
concept.hpp13010644editdlrm
config.hpp71520644editdlrm
contains.hpp15600644editdlrm
core.hpp6100644editdlrm
count.hpp14960644editdlrm
count_if.hpp31370644editdlrm
cycle.hpp42750644editdlrm
define_struct.hpp4420644editdlrm
difference.hpp11160644editdlrm
div.hpp38040644editdlrm
drop_back.hpp24750644editdlrm
drop_front.hpp17960644editdlrm
drop_front_exactly.hpp30300644editdlrm
drop_while.hpp31740644editdlrm
duplicate.hpp13920644editdlrm
empty.hpp14000644editdlrm
equal.hpp80120644editdlrm
erase_key.hpp10290644editdlrm
eval.hpp17980644editdlrm
eval_if.hpp33810644editdlrm
extend.hpp14980644editdlrm
extract.hpp12480644editdlrm
fill.hpp22160644editdlrm
filter.hpp44730644editdlrm
find.hpp17320644editdlrm
find_if.hpp40110644editdlrm
first.hpp12420644editdlrm
flatten.hpp17690644editdlrm
fold.hpp3780644editdlrm
fold_left.hpp31280644editdlrm
fold_right.hpp31470644editdlrm
for_each.hpp18630644editdlrm
front.hpp13150644editdlrm
functional.hpp11860644editdlrm
fuse.hpp13090644editdlrm
greater.hpp24010644editdlrm
greater_equal.hpp25520644editdlrm
group.hpp55430644editdlrm
hash.hpp35720644editdlrm
if.hpp18340644editdlrm
index_if.hpp34850644editdlrm
insert.hpp16200644editdlrm
insert_range.hpp21710644editdlrm
integral_constant.hpp3890644editdlrm
intersection.hpp11000644editdlrm
intersperse.hpp25860644editdlrm
is_disjoint.hpp20400644editdlrm
is_empty.hpp12440644editdlrm
is_subset.hpp29190644editdlrm
keys.hpp13070644editdlrm
lazy.hpp79470644editdlrm
length.hpp15540644editdlrm
less.hpp53220644editdlrm
less_equal.hpp24850644editdlrm
lexicographical_compare.hpp43440644editdlrm
lift.hpp15000644editdlrm
map.hpp225930644editdlrm
max.hpp17590644editdlrm
maximum.hpp33480644editdlrm
members.hpp19700644editdlrm
min.hpp17590644editdlrm
minimum.hpp33530644editdlrm
minus.hpp40050644editdlrm
mod.hpp38040644editdlrm
monadic_compose.hpp15830644editdlrm
monadic_fold_left.hpp48620644editdlrm
monadic_fold_right.hpp48820644editdlrm
mult.hpp37470644editdlrm
negate.hpp18570644editdlrm
none.hpp13400644editdlrm
none_of.hpp15320644editdlrm
not.hpp22170644editdlrm
not_equal.hpp19820644editdlrm
one.hpp24320644editdlrm
optional.hpp154220644editdlrm
or.hpp18600644editdlrm
ordering.hpp12310644editdlrm
pair.hpp80480644editdlrm
partition.hpp41990644editdlrm
permutations.hpp25990644editdlrm
plus.hpp37590644editdlrm
power.hpp19540644editdlrm
prefix.hpp15970644editdlrm
prepend.hpp23720644editdlrm
product.hpp17010644editdlrm
range.hpp99100644editdlrm
remove.hpp16950644editdlrm
remove_at.hpp29890644editdlrm
remove_if.hpp16440644editdlrm
remove_range.hpp38850644editdlrm
repeat.hpp17930644editdlrm
replace.hpp17970644editdlrm
replace_if.hpp17640644editdlrm
replicate.hpp22820644editdlrm
reverse.hpp18020644editdlrm
reverse_fold.hpp11440644editdlrm
scan_left.hpp50600644editdlrm
scan_right.hpp51380644editdlrm
second.hpp12530644editdlrm
set.hpp118540644editdlrm
size.hpp3750644editdlrm
slice.hpp34070644editdlrm
sort.hpp88550644editdlrm
span.hpp26290644editdlrm
string.hpp123100644editdlrm
suffix.hpp15830644editdlrm
sum.hpp16610644editdlrm
symmetric_difference.hpp13940644editdlrm
take_back.hpp25190644editdlrm
take_front.hpp24710644editdlrm
take_while.hpp17760644editdlrm
tap.hpp16160644editdlrm
then.hpp16880644editdlrm
traits.hpp101720644editdlrm
transform.hpp24110644editdlrm
tuple.hpp116510644editdlrm
type.hpp100820644editdlrm
unfold_left.hpp22040644editdlrm
unfold_right.hpp22240644editdlrm
union.hpp10300644editdlrm
unique.hpp23610644editdlrm
unpack.hpp51750644editdlrm
value.hpp15610644editdlrm
version.hpp20320644editdlrm
while.hpp44410644editdlrm
zero.hpp24540644editdlrm
zip.hpp14620644editdlrm
zip_shortest.hpp16040644editdlrm
zip_shortest_with.hpp21160644editdlrm
zip_with.hpp22920644editdlrm
Edit: /usr/include/boost/hana/string.hpp (12310B)
/*! @file Defines `boost::hana::string`. @copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_STRING_HPP #define BOOST_HANA_STRING_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include BOOST_HANA_NAMESPACE_BEGIN ////////////////////////////////////////////////////////////////////////// // string<> ////////////////////////////////////////////////////////////////////////// //! @cond namespace detail { template constexpr char const string_storage[sizeof...(s) + 1] = {s..., '\0'}; } template struct string : detail::operators::adl> , detail::iterable_operators> { static constexpr char const* c_str() { return &detail::string_storage[0]; } }; //! @endcond template struct tag_of> { using type = string_tag; }; ////////////////////////////////////////////////////////////////////////// // make ////////////////////////////////////////////////////////////////////////// template <> struct make_impl { template static constexpr auto apply(Chars const& ...) { return hana::string()...>{}; } }; ////////////////////////////////////////////////////////////////////////// // BOOST_HANA_STRING ////////////////////////////////////////////////////////////////////////// namespace string_detail { template constexpr string prepare_impl(S, std::index_sequence) { return {}; } template constexpr decltype(auto) prepare(S s) { return prepare_impl(s, std::make_index_sequence{}); } } #define BOOST_HANA_STRING(s) \ (::boost::hana::string_detail::prepare([]{ \ struct tmp { \ static constexpr decltype(auto) get() { return s; } \ }; \ return tmp{}; \ }())) \ /**/ #ifdef BOOST_HANA_CONFIG_ENABLE_STRING_UDL ////////////////////////////////////////////////////////////////////////// // _s user-defined literal ////////////////////////////////////////////////////////////////////////// namespace literals { template constexpr auto operator"" _s() { static_assert(std::is_same::value, "hana::string: Only narrow string literals are supported with " "the _s string literal right now. See https://goo.gl/fBbKD7 " "if you need support for fancier types of compile-time strings."); return hana::string_c; } } #endif ////////////////////////////////////////////////////////////////////////// // Operators ////////////////////////////////////////////////////////////////////////// namespace detail { template <> struct comparable_operators { static constexpr bool value = true; }; template <> struct orderable_operators { static constexpr bool value = true; }; } ////////////////////////////////////////////////////////////////////////// // to ////////////////////////////////////////////////////////////////////////// template <> struct to_impl { template static constexpr char const* apply(string const&) { return string::c_str(); } }; ////////////////////////////////////////////////////////////////////////// // to ////////////////////////////////////////////////////////////////////////// namespace detail { constexpr std::size_t cx_strlen(char const* s) { std::size_t n = 0u; while (*s != '\0') ++s, ++n; return n; } template constexpr hana::string()[I]...> expand(std::index_sequence) { return {}; } } template struct to_impl::value && std::is_convertible::value >> { template static constexpr auto apply(S const&) { constexpr char const* s = hana::value(); constexpr std::size_t len = detail::cx_strlen(s); return detail::expand(std::make_index_sequence{}); } }; ////////////////////////////////////////////////////////////////////////// // Comparable ////////////////////////////////////////////////////////////////////////// template <> struct equal_impl { template static constexpr auto apply(S const&, S const&) { return hana::true_c; } template static constexpr auto apply(S1 const&, S2 const&) { return hana::false_c; } }; ////////////////////////////////////////////////////////////////////////// // Orderable ////////////////////////////////////////////////////////////////////////// template <> struct less_impl { template static constexpr auto apply(string const&, string const&) { // We put a '\0' at the end only to avoid empty arrays. constexpr char const c_str1[] = {s1..., '\0'}; constexpr char const c_str2[] = {s2..., '\0'}; return hana::bool_c; } }; ////////////////////////////////////////////////////////////////////////// // Monoid ////////////////////////////////////////////////////////////////////////// template <> struct plus_impl { template static constexpr auto apply(string const&, string const&) { return string{}; } }; template <> struct zero_impl { static constexpr auto apply() { return string<>{}; } }; template constexpr auto operator+(string const&, string const&) { return hana::string{}; } ////////////////////////////////////////////////////////////////////////// // Foldable ////////////////////////////////////////////////////////////////////////// template <> struct unpack_impl { template static constexpr decltype(auto) apply(string const&, F&& f) { return static_cast(f)(char_{}...); } }; template <> struct length_impl { template static constexpr auto apply(string const&) { return hana::size_c; } }; ////////////////////////////////////////////////////////////////////////// // Iterable ////////////////////////////////////////////////////////////////////////// template <> struct front_impl { template static constexpr auto apply(string const&) { return hana::char_c; } }; template <> struct drop_front_impl { template static constexpr auto helper(string const&, std::index_sequence) { constexpr char s[] = {xs...}; return hana::string_c; } template static constexpr auto apply(string const& s, N const&) { return helper(s, std::make_index_sequence< (N::value < sizeof...(xs)) ? sizeof...(xs) - N::value : 0 >{}); } template static constexpr auto apply(string<> const& s, N const&) { return s; } }; template <> struct is_empty_impl { template static constexpr auto apply(string const&) { return hana::bool_c; } }; template <> struct at_impl { template static constexpr auto apply(string const&, N const&) { // We put a '\0' at the end to avoid an empty array. constexpr char characters[] = {s..., '\0'}; constexpr auto n = N::value; return hana::char_c; } }; ////////////////////////////////////////////////////////////////////////// // Searchable ////////////////////////////////////////////////////////////////////////// template <> struct contains_impl { template static constexpr auto helper(string const&, C const&, hana::true_) { constexpr char const characters[] = {s..., '\0'}; constexpr char c = hana::value(); return hana::bool_c< detail::find(characters, characters + sizeof...(s), c) != characters + sizeof...(s) >; } template static constexpr auto helper(S const&, C const&, hana::false_) { return hana::false_c; } template static constexpr auto apply(S const& s, C const& c) { return helper(s, c, hana::bool_c::value>); } }; template <> struct find_impl { template static constexpr auto apply(string const& str, Char const& c) { return hana::if_(contains_impl::apply(str, c), hana::just(c), hana::nothing ); } }; ////////////////////////////////////////////////////////////////////////// // Hashable ////////////////////////////////////////////////////////////////////////// template <> struct hash_impl { template static constexpr auto apply(String const&) { return hana::type_c; } }; BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_STRING_HPP