/usr/include/boost/mpl
NameSizeModeActions
aux_/-0755rm
limits/-0755rm
list/-0755rm
map/-0755rm
math/-0755rm
multiset/-0755rm
set/-0755rm
vector/-0755rm
accumulate.hpp9460644editdlrm
advance.hpp19550644editdlrm
advance_fwd.hpp6600644editdlrm
alias.hpp4520644editdlrm
always.hpp8380644editdlrm
and.hpp15930644editdlrm
apply.hpp60870644editdlrm
apply_fwd.hpp26630644editdlrm
apply_wrap.hpp61770644editdlrm
arg.hpp32160644editdlrm
arg_fwd.hpp7110644editdlrm
arithmetic.hpp6650644editdlrm
assert.hpp147450644editdlrm
as_sequence.hpp8790644editdlrm
at.hpp12010644editdlrm
at_fwd.hpp5460644editdlrm
back.hpp9010644editdlrm
back_fwd.hpp5440644editdlrm
back_inserter.hpp6860644editdlrm
base.hpp7160644editdlrm
begin.hpp4400644editdlrm
begin_end.hpp14440644editdlrm
begin_end_fwd.hpp6460644editdlrm
bind.hpp149510644editdlrm
bind_fwd.hpp24930644editdlrm
bitand.hpp11460644editdlrm
bitor.hpp11330644editdlrm
bitwise.hpp6130644editdlrm
bitxor.hpp5870644editdlrm
bool.hpp9640644editdlrm
bool_fwd.hpp7660644editdlrm
char.hpp5750644editdlrm
char_fwd.hpp7340644editdlrm
clear.hpp9100644editdlrm
clear_fwd.hpp5490644editdlrm
comparison.hpp6350644editdlrm
contains.hpp10090644editdlrm
contains_fwd.hpp6030644editdlrm
copy.hpp11060644editdlrm
copy_if.hpp20850644editdlrm
count.hpp9530644editdlrm
count_fwd.hpp5610644editdlrm
count_if.hpp17660644editdlrm
deque.hpp16820644editdlrm
deref.hpp9390644editdlrm
distance.hpp20280644editdlrm
distance_fwd.hpp6660644editdlrm
divides.hpp5230644editdlrm
empty.hpp9100644editdlrm
empty_base.hpp13990644editdlrm
empty_fwd.hpp5490644editdlrm
empty_sequence.hpp9210644editdlrm
end.hpp4340644editdlrm
equal.hpp26680644editdlrm
equal_to.hpp5280644editdlrm
erase.hpp10710644editdlrm
erase_fwd.hpp5800644editdlrm
erase_key.hpp10470644editdlrm
erase_key_fwd.hpp5830644editdlrm
eval_if.hpp17540644editdlrm
filter_view.hpp11450644editdlrm
find.hpp8410644editdlrm
find_if.hpp11960644editdlrm
fold.hpp11770644editdlrm
for_each.hpp30770644editdlrm
front.hpp9100644editdlrm
front_fwd.hpp5490644editdlrm
front_inserter.hpp6920644editdlrm
get_tag.hpp5760644editdlrm
greater.hpp5230644editdlrm
greater_equal.hpp5480644editdlrm
has_key.hpp10590644editdlrm
has_key_fwd.hpp6220644editdlrm
has_xxx.hpp220560644editdlrm
identity.hpp9510644editdlrm
if.hpp29100644editdlrm
index_if.hpp15080644editdlrm
index_of.hpp8990644editdlrm
inherit.hpp56700644editdlrm
inherit_linearly.hpp9660644editdlrm
insert.hpp10300644editdlrm
inserter.hpp6480644editdlrm
insert_fwd.hpp5850644editdlrm
insert_range.hpp10810644editdlrm
insert_range_fwd.hpp6140644editdlrm
int.hpp5200644editdlrm
integral_c.hpp15090644editdlrm
integral_c_fwd.hpp8870644editdlrm
integral_c_tag.hpp7250644editdlrm
int_fwd.hpp6780644editdlrm
is_placeholder.hpp14830644editdlrm
is_sequence.hpp26440644editdlrm
iterator_category.hpp8200644editdlrm
iterator_range.hpp9430644editdlrm
iterator_tags.hpp7640644editdlrm
iter_fold.hpp12720644editdlrm
iter_fold_if.hpp30720644editdlrm
joint_view.hpp16560644editdlrm
key_type.hpp10640644editdlrm
key_type_fwd.hpp6250644editdlrm
lambda.hpp7800644editdlrm
lambda_fwd.hpp12010644editdlrm
less.hpp5110644editdlrm
less_equal.hpp5360644editdlrm
list.hpp16080644editdlrm
list_c.hpp18140644editdlrm
logical.hpp5020644editdlrm
long.hpp5250644editdlrm
long_fwd.hpp6840644editdlrm
lower_bound.hpp36050644editdlrm
map.hpp15930644editdlrm
max.hpp4320644editdlrm
max_element.hpp15800644editdlrm
min.hpp4320644editdlrm
minus.hpp5150644editdlrm
min_element.hpp8150644editdlrm
min_max.hpp9080644editdlrm
modulus.hpp5520644editdlrm
multiplies.hpp13410644editdlrm
negate.hpp18790644editdlrm
next.hpp4380644editdlrm
next_prior.hpp10470644editdlrm
not.hpp10290644editdlrm
not_equal_to.hpp5440644editdlrm
numeric_cast.hpp12210644editdlrm
O1_size.hpp10030644editdlrm
O1_size_fwd.hpp5590644editdlrm
or.hpp16230644editdlrm
order.hpp10410644editdlrm
order_fwd.hpp6120644editdlrm
pair.hpp15010644editdlrm
pair_view.hpp43550644editdlrm
partition.hpp10460644editdlrm
placeholders.hpp24500644editdlrm
plus.hpp5110644editdlrm
pop_back.hpp9370644editdlrm
pop_back_fwd.hpp5640644editdlrm
pop_front.hpp9460644editdlrm
pop_front_fwd.hpp5690644editdlrm
print.hpp16690644editdlrm
prior.hpp4410644editdlrm
protect.hpp12370644editdlrm
push_back.hpp12890644editdlrm
push_back_fwd.hpp5810644editdlrm
push_front.hpp13010644editdlrm
push_front_fwd.hpp5860644editdlrm
quote.hpp36340644editdlrm
range_c.hpp11240644editdlrm
remove.hpp10330644editdlrm
remove_if.hpp18920644editdlrm
replace.hpp11690644editdlrm
replace_if.hpp17950644editdlrm
reverse.hpp7590644editdlrm
reverse_fold.hpp12820644editdlrm
reverse_iter_fold.hpp14970644editdlrm
same_as.hpp11240644editdlrm
sequence_tag.hpp29890644editdlrm
sequence_tag_fwd.hpp5880644editdlrm
set.hpp15930644editdlrm
set_c.hpp17960644editdlrm
shift_left.hpp5600644editdlrm
shift_right.hpp5640644editdlrm
single_view.hpp8130644editdlrm
size.hpp10080644editdlrm
sizeof.hpp7660644editdlrm
size_fwd.hpp5440644editdlrm
size_t.hpp6170644editdlrm
size_t_fwd.hpp7230644editdlrm
sort.hpp6140644editdlrm
stable_partition.hpp17090644editdlrm
string.hpp245470644editdlrm
switch.hpp11870644editdlrm
tag.hpp10230644editdlrm
times.hpp5150644editdlrm
transform.hpp42020644editdlrm
transform_view.hpp11240644editdlrm
unique.hpp20530644editdlrm
unpack_args.hpp35630644editdlrm
upper_bound.hpp35570644editdlrm
value_type.hpp10840644editdlrm
value_type_fwd.hpp6350644editdlrm
vector.hpp16440644editdlrm
vector_c.hpp19320644editdlrm
void.hpp16080644editdlrm
void_fwd.hpp5990644editdlrm
zip_view.hpp15420644editdlrm
Edit: /usr/include/boost/mpl/string.hpp (24547B)
#ifndef BOOST_MPL_STRING_HPP_INCLUDED #define BOOST_MPL_STRING_HPP_INCLUDED // Copyright Eric Niebler 2009 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ // $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ // $Revision: 49239 $ // // Thanks to: // Dmitry Goncharov for porting this to the Sun compiler #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 // for bidirectional_iterator_tag #include namespace boost { namespace mpl { #define BOOST_MPL_STRING_MAX_PARAMS \ BOOST_PP_DIV(BOOST_PP_ADD(BOOST_MPL_LIMIT_STRING_SIZE, 3), 4) // Low-level bit-twiddling is done by macros. Any implementation-defined behavior of // multi-character literals should be localized to these macros. #define BOOST_MPL_MULTICHAR_LENGTH(c) \ (std::size_t)((c0xffffff)+(c>0xffff)+(c>0xff)+1)) #if BOOST_ENDIAN_LITTLE_BYTE && defined(__SUNPRO_CC) #define BOOST_MPL_MULTICHAR_AT(c,i) \ (char)(0xff&((unsigned)(c)>>(8*(std::size_t)(i)))) #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ (((unsigned)(c)<<8)|(unsigned char)(i)) #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ ((unsigned)(c)>>8) #else #define BOOST_MPL_MULTICHAR_AT(c,i) \ (char)(0xff&((unsigned)(c)>>(8*(BOOST_MPL_MULTICHAR_LENGTH(c)-(std::size_t)(i)-1)))) #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ (((unsigned)(c)<<8)|(unsigned char)(i)) #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ ((unsigned)(c)>>8) #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) #endif struct string_tag; struct string_iterator_tag; template struct string; template struct string_iterator; template struct sequence_tag; template struct size_impl; template<> struct size_impl { template struct apply; #define M0(z, n, data) \ + BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C,n)) #define M1(z, n, data) \ template \ struct apply > \ : mpl::size_t<(0 BOOST_PP_REPEAT_ ## z(n, M0, ~))> \ {}; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M1, ~) #undef M0 #undef M1 }; template<> struct size_impl::apply > : mpl::size_t<0> {}; template struct begin_impl; template<> struct begin_impl { template struct apply { typedef mpl::string_iterator type; }; }; template struct end_impl; template<> struct end_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply > \ { \ typedef mpl::string_iterator, n, 0> type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) #undef M0 }; template<> struct end_impl::apply > { typedef mpl::string_iterator, 0, 0> type; }; template struct push_back_impl; template<> struct push_back_impl { template struct apply { BOOST_MPL_ASSERT_MSG( (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) , PUSH_BACK_FAILED_MPL_STRING_IS_FULL , (Sequence) ); // If the above assertion didn't fire, then the string is sparse. // Repack the string and retry the push_back typedef typename mpl::push_back< typename mpl::copy< Sequence , mpl::back_inserter > >::type , Value >::type type; }; template struct apply, Value, false> { typedef mpl::string<(char)Value::value> type; }; #define M0(z,n,data) \ template \ struct apply, Value, false> \ { \ typedef \ mpl::string< \ BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ ?BOOST_PP_CAT(C,BOOST_PP_DEC(n)) \ :BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n)), Value::value) \ , ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ ?(char)Value::value \ :0 \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, Value, false> { typedef mpl::string< BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS), C) , BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)), Value::value) > type; }; }; template struct has_push_back_impl; template<> struct has_push_back_impl { template struct apply : mpl::true_ {}; }; template struct pop_back_impl; template<> struct pop_back_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply > \ { \ BOOST_MPL_ASSERT_MSG((C0 != 0), POP_BACK_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ typedef \ mpl::string< \ BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ BOOST_MPL_MULTICHAR_POP_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n))) \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) #undef M0 }; template struct has_pop_back_impl; template<> struct has_pop_back_impl { template struct apply : mpl::true_ {}; }; template struct push_front_impl; template<> struct push_front_impl { template struct apply { BOOST_MPL_ASSERT_MSG( (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) , PUSH_FRONT_FAILED_MPL_STRING_IS_FULL , (Sequence) ); // If the above assertion didn't fire, then the string is sparse. // Repack the string and retry the push_front. typedef typename mpl::push_front< typename mpl::reverse_copy< Sequence , mpl::front_inserter > >::type , Value >::type type; }; #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) template struct apply, Value, false> { typedef mpl::string<(char)Value::value> type; }; #endif #define M0(z,n,data) \ template \ struct apply, Value, true> \ { \ typedef \ mpl::string< \ (char)Value::value \ BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, C) \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, Value, false> { typedef mpl::string< BOOST_MPL_MULTICHAR_PUSH_FRONT(C0, Value::value) , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) > type0; #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) typedef typename mpl::if_< mpl::empty > , mpl::string<(char)Value::value> , type0 >::type type; #else typedef type0 type; #endif }; }; template struct has_push_front_impl; template<> struct has_push_front_impl { template struct apply : mpl::true_ {}; }; template struct pop_front_impl; template<> struct pop_front_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply, true> \ { \ BOOST_MPL_ASSERT_MSG((C0 != 0), POP_FRONT_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ typedef \ mpl::string \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, false> { typedef mpl::string< BOOST_MPL_MULTICHAR_POP_FRONT(C0) , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) > type; }; }; template struct has_pop_front_impl; template<> struct has_pop_front_impl { template struct apply : mpl::true_ {}; }; template struct insert_range_impl; template<> struct insert_range_impl { template struct apply : mpl::copy< mpl::joint_view< mpl::iterator_range< mpl::string_iterator , Pos > , mpl::joint_view< Range , mpl::iterator_range< Pos , typename mpl::end::type > > > , mpl::back_inserter > > {}; }; template struct insert_impl; template<> struct insert_impl { template struct apply : mpl::insert_range > {}; }; template struct erase_impl; template<> struct erase_impl { template struct apply : mpl::copy< mpl::joint_view< mpl::iterator_range< mpl::string_iterator , First > , mpl::iterator_range< typename mpl::if_na::type>::type , typename mpl::end::type > > , mpl::back_inserter > > {}; }; template struct clear_impl; template<> struct clear_impl { template struct apply { typedef mpl::string<> type; }; }; #define M0(z, n, data) \ template \ struct string_iterator, n, J> \ { \ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ typedef \ mpl::string_iterator \ next; \ typedef \ mpl::string_iterator \ prior; \ typedef mpl::char_ type; \ }; \ template \ struct string_iterator, n, 0> \ { \ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ typedef \ mpl::string_iterator \ next; \ typedef \ mpl::string_iterator< \ string \ , n - 1 \ , BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, BOOST_PP_DEC(n))) - 1 \ > \ prior; \ typedef mpl::char_ type; \ }; BOOST_PP_REPEAT(BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct string { /// INTERNAL ONLY enum { front_ = C0 , back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)) }; typedef char value_type; typedef string type; typedef string_tag tag; }; namespace aux_ { template struct next_unless : mpl::next {}; template struct next_unless { typedef End type; }; template struct deref_unless : mpl::deref {}; template struct deref_unless { typedef mpl::char_<'\0'> type; }; } template struct c_str { typedef typename mpl::end::type iend; typedef typename mpl::begin::type i0; #define M0(z, n, data) \ typedef \ typename mpl::aux_::next_unless::type \ BOOST_PP_CAT(i, BOOST_PP_INC(n)); BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) #undef M0 typedef c_str type; static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1]; }; template typename Sequence::value_type const c_str::value[BOOST_MPL_LIMIT_STRING_SIZE+1] = { #define M0(z, n, data) \ mpl::aux_::deref_unless::type::value, BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) #undef M0 '\0' }; }} // namespace boost #endif // BOOST_MPL_STRING_HPP_INCLUDED