/usr/include/boost
NameSizeModeActions
accumulators/-0755rm
algorithm/-0755rm
align/-0755rm
archive/-0755rm
asio/-0755rm
assert/-0755rm
assign/-0755rm
atomic/-0755rm
beast/-0755rm
bimap/-0755rm
bind/-0755rm
callable_traits/-0755rm
chrono/-0755rm
circular_buffer/-0755rm
compatibility/-0755rm
compute/-0755rm
concept/-0755rm
concept_check/-0755rm
config/-0755rm
container/-0755rm
container_hash/-0755rm
context/-0755rm
contract/-0755rm
convert/-0755rm
core/-0755rm
coroutine/-0755rm
coroutine2/-0755rm
date_time/-0755rm
detail/-0755rm
dll/-0755rm
dynamic_bitset/-0755rm
endian/-0755rm
exception/-0755rm
fiber/-0755rm
filesystem/-0755rm
flyweight/-0755rm
format/-0755rm
function/-0755rm
functional/-0755rm
function_types/-0755rm
fusion/-0755rm
geometry/-0755rm
gil/-0755rm
graph/-0755rm
hana/-0755rm
heap/-0755rm
histogram/-0755rm
hof/-0755rm
icl/-0755rm
integer/-0755rm
interprocess/-0755rm
intrusive/-0755rm
io/-0755rm
iostreams/-0755rm
iterator/-0755rm
lambda/-0755rm
lexical_cast/-0755rm
locale/-0755rm
local_function/-0755rm
lockfree/-0755rm
log/-0755rm
logic/-0755rm
math/-0755rm
metaparse/-0755rm
move/-0755rm
mp11/-0755rm
mpi/-0755rm
mpl/-0755rm
msm/-0755rm
multiprecision/-0755rm
multi_array/-0755rm
multi_index/-0755rm
nowide/-0755rm
numeric/-0755rm
optional/-0755rm
outcome/-0755rm
parameter/-0755rm
pending/-0755rm
phoenix/-0755rm
polygon/-0755rm
poly_collection/-0755rm
pool/-0755rm
predef/-0755rm
preprocessor/-0755rm
process/-0755rm
program_options/-0755rm
property_map/-0755rm
property_tree/-0755rm
proto/-0755rm
ptr_container/-0755rm
python/-0755rm
qvm/-0755rm
random/-0755rm
range/-0755rm
ratio/-0755rm
regex/-0755rm
safe_numerics/-0755rm
serialization/-0755rm
signals2/-0755rm
smart_ptr/-0755rm
sort/-0755rm
spirit/-0755rm
stacktrace/-0755rm
statechart/-0755rm
static_string/-0755rm
stl_interfaces/-0755rm
system/-0755rm
test/-0755rm
thread/-0755rm
timer/-0755rm
tti/-0755rm
tuple/-0755rm
typeof/-0755rm
type_erasure/-0755rm
type_index/-0755rm
type_traits/-0755rm
units/-0755rm
unordered/-0755rm
utility/-0755rm
uuid/-0755rm
variant/-0755rm
variant2/-0755rm
vmd/-0755rm
wave/-0755rm
winapi/-0755rm
xpressive/-0755rm
yap/-0755rm
align.hpp6330644editdlrm
aligned_storage.hpp6530644editdlrm
any.hpp94720644editdlrm
array.hpp158270644editdlrm
asio.hpp74720644editdlrm
assert.hpp26250644editdlrm
assign.hpp5920644editdlrm
atomic.hpp7540644editdlrm
beast.hpp5910644editdlrm
bimap.hpp3870644editdlrm
bind.hpp18090644editdlrm
blank.hpp19850644editdlrm
blank_fwd.hpp6180644editdlrm
callable_traits.hpp21380644editdlrm
call_traits.hpp6330644editdlrm
cast.hpp5840644editdlrm
cerrno.hpp41870644editdlrm
checked_delete.hpp4140644editdlrm
chrono.hpp7060644editdlrm
circular_buffer.hpp19460644editdlrm
circular_buffer_fwd.hpp11370644editdlrm
compressed_pair.hpp6530644editdlrm
compute.hpp15230644editdlrm
concept_archetype.hpp237250644editdlrm
concept_check.hpp319770644editdlrm
config.hpp22160644editdlrm
contract.hpp18420644editdlrm
contract_macro.hpp564970644editdlrm
convert.hpp74020644editdlrm
crc.hpp948830644editdlrm
cregex.hpp7210644editdlrm
cstdfloat.hpp26110644editdlrm
cstdint.hpp184970644editdlrm
cstdlib.hpp17390644editdlrm
current_function.hpp16810644editdlrm
cxx11_char_types.hpp41600644editdlrm
date_time.hpp5400644editdlrm
dll.hpp7120644editdlrm
dynamic_bitset.hpp5600644editdlrm
dynamic_bitset_fwd.hpp6750644editdlrm
enable_shared_from_this.hpp5250644editdlrm
endian.hpp3640644editdlrm
exception_ptr.hpp3960644editdlrm
filesystem.hpp8620644editdlrm
flyweight.hpp6040644editdlrm
foreach.hpp455510644editdlrm
foreach_fwd.hpp17020644editdlrm
format.hpp21790644editdlrm
function.hpp25240644editdlrm
functional.hpp201240644editdlrm
function_equal.hpp7910644editdlrm
function_output_iterator.hpp6300644editdlrm
generator_iterator.hpp20280644editdlrm
geometry.hpp7040644editdlrm
get_pointer.hpp22880644editdlrm
gil.hpp16970644editdlrm
hana.hpp68070644editdlrm
histogram.hpp13120644editdlrm
hof.hpp20090644editdlrm
implicit_cast.hpp8100644editdlrm
indirect_reference.hpp10360644editdlrm
integer.hpp115930644editdlrm
integer_fwd.hpp51810644editdlrm
integer_traits.hpp83190644editdlrm
intrusive_ptr.hpp4810644editdlrm
io_fwd.hpp18790644editdlrm
is_placeholder.hpp6340644editdlrm
iterator.hpp4590644editdlrm
iterator_adaptors.hpp4660644editdlrm
lexical_cast.hpp32750644editdlrm
limits.hpp61560644editdlrm
locale.hpp8870644editdlrm
local_function.hpp188580644editdlrm
make_default.hpp15100644editdlrm
make_shared.hpp4640644editdlrm
make_unique.hpp2930644editdlrm
math_fwd.hpp9750644editdlrm
memory_order.hpp24570644editdlrm
mem_fn.hpp5960644editdlrm
metaparse.hpp52810644editdlrm
mp11.hpp6410644editdlrm
mpi.hpp11010644editdlrm
multi_array.hpp180210644editdlrm
multi_index_container.hpp449830644editdlrm
multi_index_container_fwd.hpp37760644editdlrm
next_prior.hpp51270644editdlrm
noncopyable.hpp4020644editdlrm
nondet_random.hpp5320644editdlrm
none.hpp16090644editdlrm
none_t.hpp9530644editdlrm
non_type.hpp6190644editdlrm
operators.hpp365740644editdlrm
operators_v1.hpp377350644editdlrm
optional.hpp5280644editdlrm
outcome.hpp16990644editdlrm
parameter.hpp10820644editdlrm
phoenix.hpp4760644editdlrm
pointee.hpp18070644editdlrm
pointer_cast.hpp36880644editdlrm
pointer_to_other.hpp11970644editdlrm
polymorphic_cast.hpp52820644editdlrm
polymorphic_pointer_cast.hpp28290644editdlrm
predef.h6350644editdlrm
preprocessor.hpp4870644editdlrm
process.hpp13660644editdlrm
program_options.hpp8200644editdlrm
progress.hpp57340644editdlrm
python.hpp29500644editdlrm
random.hpp38540644editdlrm
range.hpp6030644editdlrm
ratio.hpp3490644editdlrm
rational.hpp397200644editdlrm
ref.hpp3700644editdlrm
regex.h21740644editdlrm
regex.hpp8230644editdlrm
regex_fwd.hpp6930644editdlrm
scoped_array.hpp5060644editdlrm
scoped_ptr.hpp4970644editdlrm
scope_exit.hpp547450644editdlrm
shared_array.hpp5360644editdlrm
shared_container_iterator.hpp21540644editdlrm
shared_ptr.hpp5250644editdlrm
signals2.hpp7520644editdlrm
smart_ptr.hpp7800644editdlrm
spirit.hpp11330644editdlrm
stacktrace.hpp4990644editdlrm
static_assert.hpp72130644editdlrm
static_string.hpp4230644editdlrm
swap.hpp3740644editdlrm
thread.hpp8390644editdlrm
throw_exception.hpp43280644editdlrm
timer.hpp27810644editdlrm
tokenizer.hpp27830644editdlrm
token_functions.hpp193490644editdlrm
token_iterator.hpp38100644editdlrm
type.hpp4810644editdlrm
type_index.hpp107570644editdlrm
type_traits.hpp74310644editdlrm
unordered_map.hpp5680644editdlrm
unordered_set.hpp5680644editdlrm
utility.hpp8800644editdlrm
variant.hpp8830644editdlrm
version.hpp11170644editdlrm
visit_each.hpp6900644editdlrm
wave.hpp9440644editdlrm
weak_ptr.hpp4620644editdlrm
Edit: /usr/include/boost/token_functions.hpp (19349B)
// Boost token_functions.hpp ------------------------------------------------// // Copyright John R. Bandela 2001. // 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/tokenizer/ for documentation. // Revision History: // 01 Oct 2004 Joaquin M Lopez Munoz // Workaround for a problem with string::assign in msvc-stlport // 06 Apr 2004 John Bandela // Fixed a bug involving using char_delimiter with a true input iterator // 28 Nov 2003 Robert Zeh and John Bandela // Converted into "fast" functions that avoid using += when // the supplied iterator isn't an input_iterator; based on // some work done at Archelon and a version that was checked into // the boost CVS for a short period of time. // 20 Feb 2002 John Maddock // Removed using namespace std declarations and added // workaround for BOOST_NO_STDC_NAMESPACE (the library // can be safely mixed with regex). // 06 Feb 2002 Jeremy Siek // Added char_separator. // 02 Feb 2002 Jeremy Siek // Removed tabs and a little cleanup. #ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ #define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ #include #include #include #include #include // for find_if #include #include #include #include #include #include #if !defined(BOOST_NO_CWCTYPE) #include #endif // // the following must not be macros if we are to prefix them // with std:: (they shouldn't be macros anyway...) // #ifdef ispunct # undef ispunct #endif #ifdef iswpunct # undef iswpunct #endif #ifdef isspace # undef isspace #endif #ifdef iswspace # undef iswspace #endif // // fix namespace problems: // #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::ispunct; using ::isspace; #if !defined(BOOST_NO_CWCTYPE) using ::iswpunct; using ::iswspace; #endif } #endif namespace boost{ //=========================================================================== // The escaped_list_separator class. Which is a model of TokenizerFunction // An escaped list is a super-set of what is commonly known as a comma // separated value (csv) list.It is separated into fields by a comma or // other character. If the delimiting character is inside quotes, then it is // counted as a regular character.To allow for embedded quotes in a field, // there can be escape sequences using the \ much like C. // The role of the comma, the quotation mark, and the escape // character (backslash \), can be assigned to other characters. struct escaped_list_error : public std::runtime_error{ escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { } }; // The out of the box GCC 2.95 on cygwin does not have a char_traits class. // MSVC does not like the following typename template ::traits_type > class escaped_list_separator { private: typedef std::basic_string string_type; struct char_eq { Char e_; char_eq(Char e):e_(e) { } bool operator()(Char c) { return Traits::eq(e_,c); } }; string_type escape_; string_type c_; string_type quote_; bool last_; bool is_escape(Char e) { char_eq f(e); return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end(); } bool is_c(Char e) { char_eq f(e); return std::find_if(c_.begin(),c_.end(),f)!=c_.end(); } bool is_quote(Char e) { char_eq f(e); return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end(); } template void do_escape(iterator& next,iterator end,Token& tok) { if (++next == end) BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape"))); if (Traits::eq(*next,'n')) { tok+='\n'; return; } else if (is_quote(*next)) { tok+=*next; return; } else if (is_c(*next)) { tok+=*next; return; } else if (is_escape(*next)) { tok+=*next; return; } else BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence"))); } public: explicit escaped_list_separator(Char e = '\\', Char c = ',',Char q = '\"') : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { } escaped_list_separator(string_type e, string_type c, string_type q) : escape_(e), c_(c), quote_(q), last_(false) { } void reset() {last_=false;} template bool operator()(InputIterator& next,InputIterator end,Token& tok) { bool bInQuote = false; tok = Token(); if (next == end) { if (last_) { last_ = false; return true; } else return false; } last_ = false; for (;next != end;++next) { if (is_escape(*next)) { do_escape(next,end,tok); } else if (is_c(*next)) { if (!bInQuote) { // If we are not in quote, then we are done ++next; // The last character was a c, that means there is // 1 more blank field last_ = true; return true; } else tok+=*next; } else if (is_quote(*next)) { bInQuote=!bInQuote; } else { tok += *next; } } return true; } }; //=========================================================================== // The classes here are used by offset_separator and char_separator to implement // faster assigning of tokens using assign instead of += namespace tokenizer_detail { //=========================================================================== // Tokenizer was broken for wide character separators, at least on Windows, since // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts // if higher values are passed in. The traits extension class should take care of this. // Assuming that the conditional will always get optimized out in the function // implementations, argument types are not a problem since both forms of character classifiers // expect an int. #if !defined(BOOST_NO_CWCTYPE) template struct traits_extension_details : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { return std::iswspace(c) != 0; } static bool ispunct(char_type c) { return std::iswpunct(c) != 0; } }; template struct traits_extension_details : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { return std::isspace(c) != 0; } static bool ispunct(char_type c) { return std::ispunct(c) != 0; } }; #endif // In case there is no cwctype header, we implement the checks manually. // We make use of the fact that the tested categories should fit in ASCII. template struct traits_extension : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { #if !defined(BOOST_NO_CWCTYPE) return traits_extension_details::isspace(c); #else return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0; #endif } static bool ispunct(char_type c) { #if !defined(BOOST_NO_CWCTYPE) return traits_extension_details::ispunct(c); #else return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0; #endif } }; // The assign_or_plus_equal struct contains functions that implement // assign, +=, and clearing based on the iterator type. The // generic case does nothing for plus_equal and clearing, while // passing through the call for assign. // // When an input iterator is being used, the situation is reversed. // The assign method does nothing, plus_equal invokes operator +=, // and the clearing method sets the supplied token to the default // token constructor's result. // template struct assign_or_plus_equal { template static void assign(Iterator b, Iterator e, Token &t) { t.assign(b, e); } template static void plus_equal(Token &, const Value &) { } // If we are doing an assign, there is no need for the // the clear. // template static void clear(Token &) { } }; template <> struct assign_or_plus_equal { template static void assign(Iterator , Iterator , Token &) { } template static void plus_equal(Token &t, const Value &v) { t += v; } template static void clear(Token &t) { t = Token(); } }; template struct pointer_iterator_category{ typedef std::random_access_iterator_tag type; }; template struct class_iterator_category{ typedef typename Iterator::iterator_category type; }; // This portably gets the iterator_tag without partial template specialization template struct get_iterator_category{ typedef typename mpl::if_, pointer_iterator_category, class_iterator_category >::type cat; typedef typename cat::type iterator_category; }; } // namespace tokenizer_detail //=========================================================================== // The offset_separator class, which is a model of TokenizerFunction. // Offset breaks a string into tokens based on a range of offsets class offset_separator { private: std::vector offsets_; unsigned int current_offset_; bool wrap_offsets_; bool return_partial_last_; public: template offset_separator(Iter begin, Iter end, bool wrap_offsets = true, bool return_partial_last = true) : offsets_(begin,end), current_offset_(0), wrap_offsets_(wrap_offsets), return_partial_last_(return_partial_last) { } offset_separator() : offsets_(1,1), current_offset_(), wrap_offsets_(true), return_partial_last_(true) { } void reset() { current_offset_ = 0; } template bool operator()(InputIterator& next, InputIterator end, Token& tok) { typedef tokenizer_detail::assign_or_plus_equal< BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< InputIterator >::iterator_category > assigner; BOOST_ASSERT(!offsets_.empty()); assigner::clear(tok); InputIterator start(next); if (next == end) return false; if (current_offset_ == offsets_.size()) { if (wrap_offsets_) current_offset_=0; else return false; } int c = offsets_[current_offset_]; int i = 0; for (; i < c; ++i) { if (next == end)break; assigner::plus_equal(tok,*next++); } assigner::assign(start,next,tok); if (!return_partial_last_) if (i < (c-1) ) return false; ++current_offset_; return true; } }; //=========================================================================== // The char_separator class breaks a sequence of characters into // tokens based on the character delimiters (very much like bad old // strtok). A delimiter character can either be kept or dropped. A // kept delimiter shows up as an output token, whereas a dropped // delimiter does not. // This class replaces the char_delimiters_separator class. The // constructor for the char_delimiters_separator class was too // confusing and needed to be deprecated. However, because of the // default arguments to the constructor, adding the new constructor // would cause ambiguity, so instead I deprecated the whole class. // The implementation of the class was also simplified considerably. enum empty_token_policy { drop_empty_tokens, keep_empty_tokens }; // The out of the box GCC 2.95 on cygwin does not have a char_traits class. template ::traits_type > class char_separator { typedef tokenizer_detail::traits_extension Traits; typedef std::basic_string string_type; public: explicit char_separator(const Char* dropped_delims, const Char* kept_delims = 0, empty_token_policy empty_tokens = drop_empty_tokens) : m_dropped_delims(dropped_delims), m_use_ispunct(false), m_use_isspace(false), m_empty_tokens(empty_tokens), m_output_done(false) { // Borland workaround if (kept_delims) m_kept_delims = kept_delims; } // use ispunct() for kept delimiters and isspace for dropped. explicit char_separator() : m_use_ispunct(true), m_use_isspace(true), m_empty_tokens(drop_empty_tokens), m_output_done(false) { } void reset() { } template bool operator()(InputIterator& next, InputIterator end, Token& tok) { typedef tokenizer_detail::assign_or_plus_equal< BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< InputIterator >::iterator_category > assigner; assigner::clear(tok); // skip past all dropped_delims if (m_empty_tokens == drop_empty_tokens) for (; next != end && is_dropped(*next); ++next) { } InputIterator start(next); if (m_empty_tokens == drop_empty_tokens) { if (next == end) return false; // if we are on a kept_delims move past it and stop if (is_kept(*next)) { assigner::plus_equal(tok,*next); ++next; } else // append all the non delim characters for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) assigner::plus_equal(tok,*next); } else { // m_empty_tokens == keep_empty_tokens // Handle empty token at the end if (next == end) { if (m_output_done == false) { m_output_done = true; assigner::assign(start,next,tok); return true; } else return false; } if (is_kept(*next)) { if (m_output_done == false) m_output_done = true; else { assigner::plus_equal(tok,*next); ++next; m_output_done = false; } } else if (m_output_done == false && is_dropped(*next)) { m_output_done = true; } else { if (is_dropped(*next)) start=++next; for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) assigner::plus_equal(tok,*next); m_output_done = true; } } assigner::assign(start,next,tok); return true; } private: string_type m_kept_delims; string_type m_dropped_delims; bool m_use_ispunct; bool m_use_isspace; empty_token_policy m_empty_tokens; bool m_output_done; bool is_kept(Char E) const { if (m_kept_delims.length()) return m_kept_delims.find(E) != string_type::npos; else if (m_use_ispunct) { return Traits::ispunct(E) != 0; } else return false; } bool is_dropped(Char E) const { if (m_dropped_delims.length()) return m_dropped_delims.find(E) != string_type::npos; else if (m_use_isspace) { return Traits::isspace(E) != 0; } else return false; } }; //=========================================================================== // The following class is DEPRECATED, use class char_separators instead. // // The char_delimiters_separator class, which is a model of // TokenizerFunction. char_delimiters_separator breaks a string // into tokens based on character delimiters. There are 2 types of // delimiters. returnable delimiters can be returned as // tokens. These are often punctuation. nonreturnable delimiters // cannot be returned as tokens. These are often whitespace // The out of the box GCC 2.95 on cygwin does not have a char_traits class. template ::traits_type > class char_delimiters_separator { private: typedef tokenizer_detail::traits_extension Traits; typedef std::basic_string string_type; string_type returnable_; string_type nonreturnable_; bool return_delims_; bool no_ispunct_; bool no_isspace_; bool is_ret(Char E)const { if (returnable_.length()) return returnable_.find(E) != string_type::npos; else{ if (no_ispunct_) {return false;} else{ int r = Traits::ispunct(E); return r != 0; } } } bool is_nonret(Char E)const { if (nonreturnable_.length()) return nonreturnable_.find(E) != string_type::npos; else{ if (no_isspace_) {return false;} else{ int r = Traits::isspace(E); return r != 0; } } } public: explicit char_delimiters_separator(bool return_delims = false, const Char* returnable = 0, const Char* nonreturnable = 0) : returnable_(returnable ? returnable : string_type().c_str()), nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()), return_delims_(return_delims), no_ispunct_(returnable!=0), no_isspace_(nonreturnable!=0) { } void reset() { } public: template bool operator()(InputIterator& next, InputIterator end,Token& tok) { tok = Token(); // skip past all nonreturnable delims // skip past the returnable only if we are not returning delims for (;next!=end && ( is_nonret(*next) || (is_ret(*next) && !return_delims_ ) );++next) { } if (next == end) { return false; } // if we are to return delims and we are one a returnable one // move past it and stop if (is_ret(*next) && return_delims_) { tok+=*next; ++next; } else // append all the non delim characters for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next) tok+=*next; return true; } }; } //namespace boost #endif