?? tr1.qbk
字號:
// [5.1.7.6] Class template uniform_real template<class RealType = double> class uniform_real; // [5.1.7.7] Class template exponential_distribution template<class RealType = double> class exponential_distribution; // [5.1.7.8] Class template normal_distribution template<class RealType = double> class normal_distribution; // [5.1.7.9] Class template gamma_distribution template<class RealType = double> class gamma_distribution; } // namespace tr1 } // namespace std[*Configuration:][@../../libs/config/index.html Boost.Config] should (automatically) definethe macro BOOST_HAS_TR1_RANDOM if yourstandard library implements this part of TR1.[*Standard Conformity:]The Boost implementation has the following limitations:*The linear_congruential generator is fully supported for signed integer types only (unsigned types probably only work when the modulus is zero).*The subtract_with_carry template does not support a modulus of zero.*Not all of the standard generator types have Boost documentation yet, they arenone the less supported however.*Class template variate_generator does not have a template unary function call operator(), only the non-template nullary version.Note also that most of the Random number generators have been re-implemented as thin wrappers around the Boost versions in order toprovide a standard conforming interface (the Boost versions all take an additional,redundant, template parameter, and are initialized by iterators rather than functors).[endsect][section:tuple Tuples.] #include <boost/tr1/tuple.hpp>or #include <tuple>A tuple is a fixed size collection of elements. Pairs, triples, quadruples etc. are tuples. In a programming language, a tuple is a data object containing other objects as elements. These element objects may be of different types.Tuples are convenient in many circumstances. For instance, tuples make it easy to define functions that return more than one value.Some programming languages, such as ML, Python and Haskell, have built-in tuple constructs. Unfortunately C++ does not.To compensate for this "deficiency", the TR1 Tuple Library implements a tuple construct using templates.For more information see the [@../../libs/tuple/index.html Boost Tuple Library Documentation]. namespace std { namespace tr1 { // [6.1.3] Class template tuple template <class T1 = unspecified , class T2 = unspecified , ..., class TM = unspecified > class tuple; // [6.1.3.2] Tuple creation functions const unspecified ignore; template<class T1, class T2, ..., class TN> tuple<V1, V2, ..., VN> make_tuple(const T1&, const T2& , ..., const TN&); // [6.1] Tuple types Containers template<class T1, class T2, ..., class TN> tuple<T1&, T2&, ..., TN&> tie(T1&, T2& , ..., TN&); // [6.1.3.3] Tuple helper classes template <class T> class tuple_size; template <int I, class T> class tuple_element; // [6.1.3.4] Element access template <int I, class T1, class T2, ..., class TN> RI get(tuple<T1, T2, ..., TN>&); template <int I, class T1, class T2, ..., class TN> PI get(const tuple<T1, T2, ..., TN>&); // [6.1.3.5] relational operators template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator==(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator<(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator!=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator>(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator<=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM> bool operator>=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&); } // namespace tr1 } // namespace std[*Configuration:][@../../libs/config/index.html Boost.Config] should (automatically) definethe macro BOOST_HAS_TR1_TUPLE if yourstandard library implements this part of TR1.[*Standard Conformity:]No known issues for conforming compilers.[endsect][section:utility Tuple Interface to std::pair.] #include <boost/tr1/utility.hpp>or #include <utility>The existing class template std::pair, can also be accessed using the [link boost_tr1.subject_list.tuple tuple interface]. namespace std { namespace tr1 { template <class T> class tuple_size; // forward declaration template <int I, class T> class tuple_element; // forward declaration template <class T1, class T2> struct tuple_size<std::pair<T1, T2> >; template <class T1, class T2> struct tuple_element<0, std::pair<T2, T2> >; template <class T1, class T2> struct tuple_element<1, std::pair<T2, T2> >; // see below for definition of "P". template<int I, class T1, class T2> P& get(std::pair<T1, T2>&); template<int I, class T1, class T2> const P& get(const std::pair<T1, T2>&); } // namespace tr1 } // namespace std[*Configuration:][@../../libs/config/index.html Boost.Config] should (automatically) definethe macro BOOST_HAS_TR1_UTILITY if yourstandard library implements this part of TR1.[*Standard Conformity:]No known problems.[endsect][section:array Fixed Size Array.] #include <boost/tr1/array.hpp> or #include <array> Class template array is a fixed size array that is safer than and noless efficient than a C style array. Class array fulfils almost all of therequirements of a reversible-container (see Section 23.1, [lib.container.requirements] of the C++ Standard). For more information referto the [@../../libs/array/index.html Boost.Array documentation]. namespace std { namespace tr1 { // [6.2.2] Class template array template <class T, size_t N > struct array; // Array comparisons template <class T, size_t N> bool operator== (const array<T,N>& x, const array<T,N>& y); template <class T, size_t N> bool operator< (const array<T,N>& x, const array<T,N>& y); template <class T, size_t N> bool operator!= (const array<T,N>& x, const array<T,N>& y); template <class T, size_t N> bool operator> (const array<T,N>& x, const array<T,N>& y); template <class T, size_t N> bool operator>= (const array<T,N>& x, const array<T,N>& y); template <class T, size_t N> bool operator<= (const array<T,N>& x, const array<T,N>& y); // [6.2.2.2] Specialized algorithms template <class T, size_t N > void swap(array<T,N>& x, array<T,N>& y); // [6.2.2.5] Tuple interface to class template array template <class T> class tuple_size; // forward declaration template <int I, class T> class tuple_element; // forward declaration template <class T, size_t N> struct tuple_size<array<T, N> >; template <int I, class T, size_t N> struct tuple_element<I, array<T, N> >; template <int I, class T, size_t N> T& get( array<T, N>&); template <int I, class T, size_t N> const T& get(const array<T, N>&); } // namespace tr1 } // namespace std[*Configuration:][@../../libs/config/index.html Boost.Config] should (automatically) definethe macro BOOST_HAS_TR1_ARRAY if yourstandard library implements this part of TR1.[*Standard Conformity:]No known issues as of Boost-1.34 onwards.[endsect][section:hash Hash Function Objects.] #include <boost/tr1/functional.hpp> or #include <functional>Class template std::hash is a unary-functor that converts some type T into a hash-value,specializations of std::hash are provided for integer, character, floating point, and pointer types, plus the two string types std::string and std::wstring.See the [@../../libs/functional/hash/index.html Boost.Hash] documentation for more information. namespace std { namespace tr1 { template <class T> struct hash : public unary_function<T, size_t> { size_t operator()(T val)const; }; // Hash function specializations template <> struct hash<bool>; template <> struct hash<char>; template <> struct hash<signed char>; template <> struct hash<unsigned char>; template <> struct hash<wchar_t>; template <> struct hash<short>; template <> struct hash<int>; template <> struct hash<long>; template <> struct hash<unsigned short>; template <> struct hash<unsigned int>; template <> struct hash<unsigned long>; template <> struct hash<float>; template <> struct hash<double>; template <> struct hash<long double>; template<class T> struct hash<T*>; template <> struct hash<std::string>; template <> struct hash<std::wstring>; } // namespace tr1 } // namespace std[*Configuration:][@../../libs/config/index.html Boost.Config] should (automatically) definethe macro BOOST_HAS_TR1_HASH if yourstandard library implements this part of TR1.[*Standard Conformity:]Boost.Hash adds specialisations of std::hash for a wider range of typesthan those required by TR1: Boost.Hash acts as a testbed for issue 6.18in the [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf Library Extension Technical Report Issues List].[endsect][section:regex Regular Expressions.] #include <boost/tr1/regex.hpp> or #include <regex> This library provides comprehensive support for regular expressions,including either iterator or string based matching, searching, search-and-replace,iteration, and tokenization. Both POSIX and ECMAScript (JavaScript) regularexpressions are supported. For more information see the [@../../libs/regex/index.htmlBoost.Regex documentation]. namespace std { namespace tr1 { // [7.5] Regex constants namespace regex_constants { typedef bitmask_type syntax_option_type; typedef bitmask_type match_flag_type; typedef implementation-defined error_type; } // namespace regex_constants // [7.6] Class regex_error class regex_error; // [7.7] Class template regex_traits template <class charT> struct regex_traits; // [7.8] Class template basic_regex template <class charT, class traits = regex_traits<charT> > class basic_regex; typedef basic_regex<char> regex; typedef basic_regex<wchar_t> wregex; // [7.8.6] basic_regex swap template <class charT, class traits> void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2); // [7.9] Class template sub_match template <class BidirectionalIterator> class sub_match; typedef sub_match<const char*> csub_match; typedef sub_match<const wchar_t*> wcsub_match; typedef sub_match<string::const_iterator> ssub_match; typedef sub_match<wstring::const_iterator> wssub_match; // [7.9.2] sub_match non-member operators /* Comparison operators omitted for clarity.... */ template <class charT, class ST, class BiIter> basic_ostream<charT, ST>& operator<<(basic_ostream<charT, ST>& os, const sub_match<BiIter>& m); // [7.10] Class template match_results template <class BidirectionalIterator, class Allocator = allocator<sub_match<BidirectionalIterator> > > class match_results; typedef match_results<const char*> cmatch; typedef match_results<const wchar_t*> wcmatch; typedef match_results<string::const_iterator> smatch; typedef match_results<wstring::const_iterator> wsmatch; // match_results comparisons template <class BidirectionalIterator, class Allocator> bool operator== (const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2); template <class BidirectionalIterator, class Allocator> bool operator!= (const match_results<BidirectionalIterator, Allocator>& m1, const match_results<BidirectionalIterator, Allocator>& m2); // [7.10.6] match_results swap template <class BidirectionalIterator, class Allocator> void swap(match_results<BidirectionalIterator, Allocator>& m1, match_results<BidirectionalIterator, Allocator>& m2); // [7.11.2] Function template regex_match template <class BidirectionalIterator, class Allocator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, match_results<BidirectionalIterator, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class BidirectionalIterator, class charT, class traits> bool regex_match(BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class charT, class Allocator, class traits> bool regex_match(const charT* str, match_results<const charT*, Allocator>& m, const basic_regex<charT, traits>& e, regex_constants::match_flag_type flags = regex_constants::match_default); template <class ST, class SA, class Allocator, class charT, class traits>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -