diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..798d5d8 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,4 @@ +html +xml +temp +out.txt diff --git a/doc/BOOST_BINARY.qbk b/doc/BOOST_BINARY.qbk index 4b207ce..73fc2e7 100644 --- a/doc/BOOST_BINARY.qbk +++ b/doc/BOOST_BINARY.qbk @@ -10,7 +10,7 @@ [section Binary Integer Literals] [/===============] -[heading Introduction] +[section Introduction] The macro `BOOST_BINARY` is used for the representation of binary literals. It takes as an argument a binary number arranged as an @@ -37,7 +37,9 @@ them as an extension. The `BOOST_BINARY` family of macros resides in the header [@../../../include/boost/utility/binary.hpp ]. -[heading Example] +[endsect] + +[section Example] ``` void foo( int ); @@ -63,12 +65,21 @@ void bar() } ``` -[heading Acknowledgments] +[endsect] + +[/===============] +[xinclude boost_binary_reference.xml] +[/===============] + + +[section Acknowledgments] Contributed by Matt Calabrese. [endsect] +[endsect] + diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index dda8f39..4e8f411 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -3,6 +3,9 @@ # subject to 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) +import doxygen ; +import quickbook ; + project : requirements # Path for links to Boost: boost.root=../../../.. @@ -38,90 +41,356 @@ project : requirements pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/utility/doc/html ; -using quickbook ; - path-constant boost-images : ../../../doc/src/images ; -xml base_from_member : base_from_member.qbk ; -boostbook standalone_base_from_member - : - base_from_member - : - # File name of HTML output: - root.filename=base_from_member - # How far down we chunk nested sections, basically all of them: - chunk.section.depth=0 - # Don't put the first section on the same page as the TOC: - chunk.first.sections=0 - # How far down sections get TOC's - toc.section.depth=1 - # Max depth in each TOC: - toc.max.depth=1 - # How far down we go with TOC's - generate.section.toc.level=1 - ; +doxygen base_from_member_reference + : + [ glob ../include/boost/utility/base_from_member.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" -xml compressed_pair : compressed_pair.qbk ; -boostbook standalone_compressed_pair - : - compressed_pair - : - # File name of HTML output: - root.filename=compressed_pair - # How far down we chunk nested sections, basically all of them: - chunk.section.depth=0 - # Don't put the first section on the same page as the TOC: - chunk.first.sections=0 - # How far down sections get TOC's - toc.section.depth=1 - # Max depth in each TOC: - toc.max.depth=1 - # How far down we go with TOC's - generate.section.toc.level=1 - ; + ; -xml declval : declval.qbk ; -boostbook standalone_declval - : - declval - : - # File name of HTML output: - root.filename=declval - # How far down we chunk nested sections, basically all of them: - chunk.section.depth=0 - # Don't put the first section on the same page as the TOC: - chunk.first.sections=0 - # How far down sections get TOC's - toc.section.depth=1 - # Max depth in each TOC: - toc.max.depth=1 - # How far down we go with TOC's - generate.section.toc.level=1 - ; +doxygen boost_binary_reference + : + [ glob ../include/boost/utility/binary.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; -xml string_ref : string_ref.qbk ; -boostbook standalone_string_ref +doxygen call_traits_reference + : + [ glob ../include/boost/call_traits.hpp ../include/boost/detail/call_traits.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +doxygen compressed_pair_reference + : + [ glob ../include/boost/compressed_pair.hpp ../include/boost/detail/compressed_pair.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +doxygen in_place_factory_reference + : + [ glob ../include/boost/utility/in_place_factory.hpp ../include/boost/utility/typed_in_place_factory.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +# we skip operators_reference because operators.hpp is not adapted for doxygen + +doxygen result_of_reference + : + [ glob ../include/boost/utility/result_of.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +doxygen string_view_reference + : + [ glob ../include/boost/utility/string_view.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +doxygen value_init_reference + : + [ glob ../include/boost/utility/value_init.hpp ] + : + ENABLE_PREPROCESSING=YES + EXPAND_ONLY_PREDEF=YES + EXTRACT_ALL=NO + EXTRACT_PRIVATE=NO + HIDE_UNDOC_MEMBERS=YES + MACRO_EXPANSION=YES + "PREDEFINED= \\ + BOOST_UTILITY_DOCS \\ + BOOST_SYMBOL_VISIBLE= \\ + BOOST_FORCEINLINE=inline \\ + BOOST_GPU_ENABLED= \\ + BOOST_STATIC_ASSERT(x)= \\ + BOOST_STATIC_ASSERT_MSG(x,y)= \\ + BOOST_STATIC_CONSTANT(x,y)=\"static constexpr x y\" \\ + BOOST_RV_REF(x)=\"x&&\" \\ + BOOST_NESTED_TEMPLATE=template \\ + BOOST_CONSTEXPR=constexpr \\ + BOOST_CXX14_CONSTEXPR=constexpr \\ + BOOST_OPERATORS_CONSTEXPR=constexpr \\ + BOOST_CONSTEXPR_OR_CONST=constexpr \\ + BOOST_NOEXCEPT=noexcept \\ + BOOST_NOEXCEPT_IF(x)=noexcept(x) \\ + BOOST_NOEXCEPT_OR_NOTHROW=noexcept \\ + BOOST_COPY_ASSIGN_REF(x)=\"x const&\" \\ + BOOST_DEFAULTED_FUNCTION(x,y)=\"x = default;\" \\ + BOOST_DELETED_FUNCTION(x)=\"x = delete;\" \\ + BOOST_EXPLICIT_OPERATOR_BOOL()=\"explicit operator bool() const;\" \\ + BOOST_REF_CONST=const" + "EXCLUDE_SYMBOLS=detail \\ + F \\ + result_of_has_result_type_impl \\ + conditional \\ + boost::operators_impl" + ; + +xml main : main.qbk ; +boostbook standalone_main : - string_ref + main : + base_from_member_reference + boost_binary_reference + call_traits_reference + compressed_pair_reference + in_place_factory_reference + result_of_reference + string_view_reference + value_init_reference # File name of HTML output: - root.filename=string_ref - # How far down we chunk nested sections, basically all of them: - chunk.section.depth=0 + # root.filename=main + boost.root=../../../.. + pdf:boost.url.prefix="http://www.boost.org/doc/libs/release/libs/core/doc/html" + # How far down we chunk nested sections: no more than two so utility component pages include their reference + chunk.section.depth=2 # 8 # Don't put the first section on the same page as the TOC: - chunk.first.sections=0 - # How far down sections get TOC's - toc.section.depth=1 - # Max depth in each TOC: - toc.max.depth=1 - # How far down we go with TOC's - generate.section.toc.level=1 + chunk.first.sections=1 # 1 + # How far down sections get TOC: 2 so we show each Utility component in main page but no more than that + toc.section.depth=2 # 2 + # Max depth in each TOC: 2 so we show each Utility component in main page but no more than that + toc.max.depth=2 # 2 + # How far down we go with TOC's in main page: 2 so each Utility component page has 1 level TOC + generate.section.toc.level=2 # 2 ; ############################################################################### alias boostdoc ; explicit boostdoc ; + alias boostrelease : - standalone_base_from_member standalone_compressed_pair - standalone_declval standalone_string_ref ; -explicit boostrelease ; + standalone_main ; +explicit boostrelease ; \ No newline at end of file diff --git a/doc/base_from_member.qbk b/doc/base_from_member.qbk index d17559d..e5a9d02 100644 --- a/doc/base_from_member.qbk +++ b/doc/base_from_member.qbk @@ -11,7 +11,7 @@ [section:base_from_member Base from Member] [block''''''] -[heading Introduction] +[section Introduction] The class templates __base_from_member__ support the base-from-member idiom. When developing a class, sometimes a base class needs to be initialized @@ -101,7 +101,9 @@ This parameter has a default value so a single use of a particular member type does not need to concern itself with the integer. -[heading Synopsis] +[endsect] + +[section Synopsis] #include /* exposition only */ @@ -191,7 +193,9 @@ this class template as a base class for a member with a flexible set of constructors.) This constant is ignored when C++11 features are present. -[heading Basic Usage] +[endsect] + +[section Basic Usage] With the starting example, the `fdoutbuf` sub-object needs to be encapsulated in a base class that is inherited before `__std_ostream__`. @@ -234,7 +238,9 @@ sub-object of the final type is the only sub-object with the name `member` that name can be used unqualified within the final class. -[heading Multiple Sub-Objects] +[endsect] + +[section Multiple Sub-Objects] The base-from-member class templates should commonly involve only one base-from-member sub-object, usually for attaching a stream-buffer to an @@ -336,7 +342,13 @@ The last conversion is necessary for the compiler to call a constructor form __nullptr__ is used, it still needs a conversion if multiple pointer types can be accepted in a constructor call but `__std_nullptr_t__` cannot.) -[heading Acknowledgments] +[endsect] + +[/===============] +[xinclude base_from_member_reference.xml] +[/===============] + +[section Acknowledgments] Author: Walker, Daryle @@ -363,3 +375,5 @@ base_from_member_test.cpp]. [endsect] +[endsect] + diff --git a/doc/call_traits.qbk b/doc/call_traits.qbk index 60aa36a..176bc01 100644 --- a/doc/call_traits.qbk +++ b/doc/call_traits.qbk @@ -10,7 +10,7 @@ [section Call Traits] [/===============] -[heading Introduction] +[section Introduction] All of the contents of [@../../../include/boost/call_traits.hpp ``] are defined inside `namespace boost`. @@ -118,7 +118,8 @@ Notes: otherwise unchanged (requires partial specialization). -[heading Copy constructibility] +[endsect] +[section Copy constructibility] The following table defines which __call_traits__ types can always be copy-constructed from which other types: @@ -142,9 +143,10 @@ If `T` is an assignable type the following assignments are possible: [[From `const_reference`] [Yes] [Yes] [-] [-] [-]] [[From `param_type`] [Yes] [Yes] [-] [-] [-]] ] +[endsect] [#sec:examples] -[heading Examples] +[section Examples] The following table shows the effect that __call_traits__ has on various types. @@ -165,7 +167,7 @@ specialization: if it does not then all types behave in the same way as the entry for "`my_class`", and __call_traits__ can not be used with reference or array types. -[heading Example 1:] +[section Example 1:] The following class is a trivial class that stores some type `T` by value (see the [@../../../test/call_traits_test.cpp `call_traits_test.cpp`] @@ -200,9 +202,10 @@ struct contained }; ``` +[endsect] [#sec:refs] -[heading Example 2 (the reference to reference problem):] +[section Example 2 (the reference to reference problem):] Consider the definition of __std_binder1st__: @@ -236,8 +239,10 @@ Now in the case that `Operation::second_argument_type` is a reference type, the argument is passed as a reference, and the no "reference to reference" occurs. +[endsect] + [#sec:example3] -[heading Example 3 (the `make_pair` problem):] +[section Example 3 (the `make_pair` problem):] If we pass the name of an array as one (or both) arguments to `__std_make_pair__`, then template argument deduction deduces the passed parameter as @@ -270,9 +275,10 @@ principle in any function that "wraps" a temporary whose type is deduced. Note that the function arguments to __std_make_pair__ are not expressed in terms of __call_traits__: doing so would prevent template argument deduction from functioning. +[endsect] [#sec:example4] -[heading Example 4 (optimising fill):] +[section Example 4 (optimising fill):] The __call_traits__ template will "optimize" the passing of a small built-in type as a function parameter. This mainly has @@ -339,7 +345,10 @@ deduction, the compiler will optimise away the call to fill all together, replacing it with the call to `filler<>::do_fill`, which does use __call_traits__. -[heading Rationale] +[endsect] +[endsect] + +[section Rationale] The following notes are intended to briefly describe the rationale behind choices made in __call_traits__. @@ -427,6 +436,13 @@ specialisation. [endsect] +[/===============] +[xinclude call_traits_reference.xml] +[/===============] + +[endsect] + + diff --git a/doc/compressed_pair.qbk b/doc/compressed_pair.qbk index bdc8768..207ba8c 100644 --- a/doc/compressed_pair.qbk +++ b/doc/compressed_pair.qbk @@ -10,7 +10,7 @@ [section Compressed Pair] -[heading Introduction] +[section Introduction] All of the contents of [@../../../include/boost/compressed_pair.hpp ``] are defined inside `namespace boost`. @@ -20,7 +20,9 @@ the template arguments are empty classes, then the [@https://en.cppreference.com/w/cpp/language/ebo ['empty base-class optimisation]] is applied to compress the size of the pair. -[heading Synopsis] +[endsect] + +[section Synopsis] ```cpp template @@ -78,7 +80,13 @@ empty type, then assigning to that member will produce memory corruption, unless the empty type has a "do nothing" assignment operator defined. This is due to a bug in the way VC6 generates implicit assignment operators. -[heading Acknowledgments] +[endsect] + +[/===============] +[xinclude compressed_pair_reference.xml] +[/===============] + +[section Acknowledgments] Based on contributions by Steve Cleary, Beman Dawes, Howard Hinnant and John Maddock. @@ -86,3 +94,5 @@ John Maddock. Maintained by [@mailto:john@johnmaddock.co.uk John Maddock]. [endsect] + +[endsect] diff --git a/doc/in_place_factory.qbk b/doc/in_place_factory.qbk index f36cdab..286dd83 100644 --- a/doc/in_place_factory.qbk +++ b/doc/in_place_factory.qbk @@ -11,7 +11,7 @@ [section In-place Factory] [/===============] -[heading Introduction] +[section Introduction] Suppose we have a class @@ -88,7 +88,8 @@ void foo() Clearly, this solution does not scale well since the container must duplicate all the constructor overloads from the contained type, or at least all those which are to be supported directly in the container. -[heading Framework] +[endsect] +[section Framework] This library proposes a framework to allow some containers to directly construct contained objects in-place without requiring the entire set of constructor overloads from the contained type. It also allows the container to remove the __CopyConstructible__ @@ -141,7 +142,8 @@ void foo() ``` -[heading Specification] +[endsect] +[section Specification] The following is the first member of the family of `InPlaceFactory` classes, along with its corresponding helper template function. The rest of the family varies only in the number and type of template and constructor parameters. @@ -220,7 +222,8 @@ However, if the container holds heterogeneous or polymorphic objects, such as th the dynamic-type of the object to be constructed must be known by the factory. In this case, end users must use a `typed_in_place_factory` instead. -[heading Container-side Usage] +[endsect] +[section Container-side Usage] As shown in the introductory simplified example, the container class must contain methods that accept an instance of these factories and pass the object's storage to the factory's apply method. @@ -270,7 +273,8 @@ struct C }; ``` -[heading User-side Usage] +[endsect] +[section User-side Usage] End users pass to the container an instance of a factory object holding the actual parameters needed to construct the contained object directly within the container. For this, the helper template function `in_place` is used. @@ -289,11 +293,19 @@ void foo() ``` -[heading Acknowledgments] +[endsect] + +[/===============] +[#boost.typed_in_place_factory_base] +[xinclude in_place_factory_reference.xml] +[/===============] + +[section Acknowledgments] Copyright Fernando Luis Cacciola Carballal, 2004 [endsect] +[endsect] diff --git a/doc/main.qbk b/doc/main.qbk index b25a9af..e16d9b8 100644 --- a/doc/main.qbk +++ b/doc/main.qbk @@ -50,114 +50,116 @@ [def __Swappable__ [@https://en.cppreference.com/w/cpp/named_req/Swappable ['Swappable]]] [/ Boost types ] +[/ (Macros are defined here because these macros are often referenced in other components) ] +[/ (operators macros link to the a table of operators because there's no doxygen reference for the operators) ] [def __BOOST_BINARY__ [link sec:BOOST_BINARY `BOOST_BINARY`]] [def __in_place_factory__ [link sec:in_place_factory `in_place_factory`]] -[def __boost_base_from_member__ [link utility.index_and_ref.ref.boost__base_from_member `boost::base_from_member`]] -[def __boost_call_traits__ [link utility.index_and_ref.ref.boost__call_traits `boost::call_traits`]] -[def __boost_result_of__ [link utility.index_and_ref.ref.boost__result_of `boost::result_of`]] -[def __boost_tr1_result_of__ [link utility.index_and_ref.ref.boost__tr1_result_of `boost::tr1_result_of`]] -[def __boost_string_view__ [link utility.index_and_ref.ref.boost__string_view `boost::string_view`]] -[def __boost_basic_string_view__ [link utility.index_and_ref.ref.boost__basic_string_view `boost::basic_string_view`]] +[def __boost_base_from_member__ [link boost.base_from_member `boost::base_from_member`]] +[def __boost_call_traits__ [link boost.call_traits `boost::call_traits`]] +[def __boost_result_of__ [link boost.result_of `boost::result_of`]] +[def __boost_tr1_result_of__ [link boost.tr1_result_of `boost::tr1_result_of`]] +[def __boost_string_view__ [link boost.basic_string_view `boost::string_view`]] +[def __boost_basic_string_view__ [link boost.basic_string_view `boost::basic_string_view`]] -[def __additive1__ [link utility.index_and_ref.ref.boost__additive1 `additive1`]] -[def __additive2__ [link utility.index_and_ref.ref.boost__additive2 `additive2`]] -[def __arithmetic1__ [link utility.index_and_ref.ref.boost__arithmetic1 `arithmetic1`]] -[def __arithmetic2__ [link utility.index_and_ref.ref.boost__arithmetic2 `arithmetic2`]] -[def __base_from_member__ [link utility.index_and_ref.ref.boost__base_from_member `base_from_member`]] -[def __basic_string_ref__ [link utility.index_and_ref.ref.boost__basic_string_ref `basic_string_ref`]] -[def __basic_string_view__ [link utility.index_and_ref.ref.boost__basic_string_view `basic_string_view`]] -[def __bidirectional_iteratable__ [link utility.index_and_ref.ref.boost__bidirectional_iteratable `bidirectional_iteratable`]] -[def __bidirectional_iterator_helper__ [link utility.index_and_ref.ref.boost__bidirectional_iterator_helper `bidirectional_iterator_helper`]] -[def __bitwise1__ [link utility.index_and_ref.ref.boost__bitwise1 `bitwise1`]] -[def __bitwise2__ [link utility.index_and_ref.ref.boost__bitwise2 `bitwise2`]] -[def __call_traits__ [link utility.index_and_ref.ref.boost__call_traits `call_traits`]] -[def __call_traits_T__ [link utility.index_and_ref.ref.boost__call_traits `call_traits`]] -[def __call_traits_lt__T___ [link utility.index_and_ref.ref.boost__call_traits_lt__T_ `call_traits`]] -[def __call_traits_lt__T_lb_N_rb__gt___ [link utility.index_and_ref.ref.boost__call_traits_lt__T_lb_N_rb__gt_ `call_traits< T[N]>`]] -[def __call_traits_lt__const_T_lb_N_rb__gt___ [link utility.index_and_ref.ref.boost__call_traits_lt__const_T_lb_N_rb__gt_ `call_traits< const T[N]>`]] -[def __compressed_pair__ [link utility.index_and_ref.ref.boost__compressed_pair `compressed_pair`]] -[def __decrementable__ [link utility.index_and_ref.ref.boost__decrementable `decrementable`]] -[def __dereferenceable__ [link utility.index_and_ref.ref.boost__dereferenceable `dereferenceable`]] -[def __equal_pointees__ [link utility.index_and_ref.ref.boost__equal_pointees `equal_pointees`]] -[def __equal_pointees_t__ [link utility.index_and_ref.ref.boost__equal_pointees_t `equal_pointees_t`]] -[def __equality_comparable1__ [link utility.index_and_ref.ref.boost__equality_comparable1 `equality_comparable1`]] -[def __equality_comparable2__ [link utility.index_and_ref.ref.boost__equality_comparable2 `equality_comparable2`]] -[def __equivalent1__ [link utility.index_and_ref.ref.boost__equivalent1 `equivalent1`]] -[def __equivalent2__ [link utility.index_and_ref.ref.boost__equivalent2 `equivalent2`]] -[def __euclidean_ring_operators1__ [link utility.index_and_ref.ref.boost__euclidean_ring_operators1 `euclidean_ring_operators1`]] -[def __euclidean_ring_operators2__ [link utility.index_and_ref.ref.boost__euclidean_ring_operators2 `euclidean_ring_operators2`]] -[def __field_operators1__ [link utility.index_and_ref.ref.boost__field_operators1 `field_operators1`]] -[def __field_operators2__ [link utility.index_and_ref.ref.boost__field_operators2 `field_operators2`]] -[def __forward_iteratable__ [link utility.index_and_ref.ref.boost__forward_iteratable `forward_iteratable`]] -[def __forward_iterator_helper__ [link utility.index_and_ref.ref.boost__forward_iterator_helper `forward_iterator_helper`]] -[def __get__ [link utility.index_and_ref.ref.boost__get `get`]] -[def __hash_range__ [link utility.index_and_ref.ref.boost__hash_range `hash_range`]] -[def __hash_value__ [link utility.index_and_ref.ref.boost__hash_value `hash_value`]] -[def __in_place_factory_base__ [link utility.index_and_ref.ref.boost__in_place_factory_base `in_place_factory_base`]] -[def __incrementable__ [link utility.index_and_ref.ref.boost__incrementable `incrementable`]] -[def __indexable__ [link utility.index_and_ref.ref.boost__indexable `indexable`]] -[def __initialized__ [link utility.index_and_ref.ref.boost__initialized `initialized`]] -[def __initialized_value__ [link utility.index_and_ref.ref.boost__initialized_value `initialized_value`]] -[def __initialized_value_t__ [link utility.index_and_ref.ref.boost__initialized_value_t `initialized_value_t`]] -[def __input_iteratable__ [link utility.index_and_ref.ref.boost__input_iteratable `input_iteratable`]] -[def __input_iterator_helper__ [link utility.index_and_ref.ref.boost__input_iterator_helper `input_iterator_helper`]] -[def __integer_arithmetic1__ [link utility.index_and_ref.ref.boost__integer_arithmetic1 `integer_arithmetic1`]] -[def __integer_arithmetic2__ [link utility.index_and_ref.ref.boost__integer_arithmetic2 `integer_arithmetic2`]] -[def __integer_multiplicative1__ [link utility.index_and_ref.ref.boost__integer_multiplicative1 `integer_multiplicative1`]] -[def __integer_multiplicative2__ [link utility.index_and_ref.ref.boost__integer_multiplicative2 `integer_multiplicative2`]] -[def __is_chained_base__ [link utility.index_and_ref.ref.boost__is_chained_base `is_chained_base`]] -[def __less_pointees__ [link utility.index_and_ref.ref.boost__less_pointees `less_pointees`]] -[def __less_pointees_t__ [link utility.index_and_ref.ref.boost__less_pointees_t `less_pointees_t`]] -[def __less_than_comparable1__ [link utility.index_and_ref.ref.boost__less_than_comparable1 `less_than_comparable1`]] -[def __less_than_comparable2__ [link utility.index_and_ref.ref.boost__less_than_comparable2 `less_than_comparable2`]] -[def __multiplicative1__ [link utility.index_and_ref.ref.boost__multiplicative1 `multiplicative1`]] -[def __multiplicative2__ [link utility.index_and_ref.ref.boost__multiplicative2 `multiplicative2`]] -[def __operator_eq__eq__ [link utility.index_and_ref.ref.boost__operator_eq__eq_ `operator==`]] -[def __operator_gt__ [link utility.index_and_ref.ref.boost__operator_gt_ `operator_gt_`]] -[def __operator_gt__eq__ [link utility.index_and_ref.ref.boost__operator_gt__eq_ `operator>`]] -[def __operator_lt__ [link utility.index_and_ref.ref.boost__operator_lt_ `operator<`]] -[def __operator_lt__eq__ [link utility.index_and_ref.ref.boost__operator_lt__eq_ `operator<=`]] -[def __operator_lt__lt__ [link utility.index_and_ref.ref.boost__operator_lt__lt_ `operator<<`]] -[def __operator_not__eq__ [link utility.index_and_ref.ref.boost__operator_not__eq_ `operator!=`]] -[def __operators2__ [link utility.index_and_ref.ref.boost__operators2 `operators2`]] -[def __operators__ [link utility.index_and_ref.ref.boost__operators `operators`]] -[def __operators_lt_T__ [link utility.index_and_ref.ref.boost__operators_lt_T `operators`]] -[def __ordered_euclidean_ring_operators1__ [link utility.index_and_ref.ref.boost__ordered_euclidean_ring_operators1 `ordered_euclidean_ring_operators1`]] -[def __ordered_euclidean_ring_operators2__ [link utility.index_and_ref.ref.boost__ordered_euclidean_ring_operators2 `ordered_euclidean_ring_operators2`]] -[def __ordered_euclidian_ring_operators1__ [link utility.index_and_ref.ref.boost__ordered_euclidian_ring_operators1 `ordered_euclidian_ring_operators1`]] -[def __ordered_euclidian_ring_operators2__ [link utility.index_and_ref.ref.boost__ordered_euclidian_ring_operators2 `ordered_euclidian_ring_operators2`]] -[def __ordered_field_operators1__ [link utility.index_and_ref.ref.boost__ordered_field_operators1 `ordered_field_operators1`]] -[def __ordered_field_operators2__ [link utility.index_and_ref.ref.boost__ordered_field_operators2 `ordered_field_operators2`]] -[def __ordered_ring_operators1__ [link utility.index_and_ref.ref.boost__ordered_ring_operators1 `ordered_ring_operators1`]] -[def __ordered_ring_operators2__ [link utility.index_and_ref.ref.boost__ordered_ring_operators2 `ordered_ring_operators2`]] -[def __output_iteratable__ [link utility.index_and_ref.ref.boost__output_iteratable `output_iteratable`]] -[def __output_iterator_helper__ [link utility.index_and_ref.ref.boost__output_iterator_helper `output_iterator_helper`]] -[def __partially_ordered1__ [link utility.index_and_ref.ref.boost__partially_ordered1 `partially_ordered1`]] -[def __partially_ordered2__ [link utility.index_and_ref.ref.boost__partially_ordered2 `partially_ordered2`]] -[def __random_access_iteratable__ [link utility.index_and_ref.ref.boost__random_access_iteratable `random_access_iteratable`]] -[def __random_access_iterator_helper__ [link utility.index_and_ref.ref.boost__random_access_iterator_helper `random_access_iterator_helper`]] -[def __result_of__ [link utility.index_and_ref.ref.boost__result_of `result_of`]] -[def __ring_operators1__ [link utility.index_and_ref.ref.boost__ring_operators1 `ring_operators1`]] -[def __ring_operators2__ [link utility.index_and_ref.ref.boost__ring_operators2 `ring_operators2`]] -[def __shiftable1__ [link utility.index_and_ref.ref.boost__shiftable1 `shiftable1`]] -[def __shiftable2__ [link utility.index_and_ref.ref.boost__shiftable2 `shiftable2`]] -[def __string_ref__ [link utility.index_and_ref.ref.boost__string_ref `string_ref`]] -[def __string_view__ [link utility.index_and_ref.ref.boost__string_view `string_view`]] -[def __swap__ [link utility.index_and_ref.ref.boost__swap `swap`]] -[def __totally_ordered1__ [link utility.index_and_ref.ref.boost__totally_ordered1 `totally_ordered1`]] -[def __totally_ordered2__ [link utility.index_and_ref.ref.boost__totally_ordered2 `totally_ordered2`]] -[def __tr1_result_of__ [link utility.index_and_ref.ref.boost__tr1_result_of `tr1_result_of`]] -[def __typed_in_place_factory_base__ [link utility.index_and_ref.ref.boost__typed_in_place_factory_base `typed_in_place_factory_base`]] -[def __u16string_ref__ [link utility.index_and_ref.ref.boost__u16string_ref `u16string_ref`]] -[def __u16string_view__ [link utility.index_and_ref.ref.boost__u16string_view `u16string_view`]] -[def __u32string_ref__ [link utility.index_and_ref.ref.boost__u32string_ref `u32string_ref`]] -[def __u32string_view__ [link utility.index_and_ref.ref.boost__u32string_view `u32string_view`]] -[def __unit_steppable__ [link utility.index_and_ref.ref.boost__unit_steppable `unit_steppable`]] -[def __value_initialized__ [link utility.index_and_ref.ref.boost__value_initialized `value_initialized`]] -[def __wstring_ref__ [link utility.index_and_ref.ref.boost__wstring_ref `wstring_ref`]] -[def __wstring_view__ [link utility.index_and_ref.ref.boost__wstring_view `wstring_view`]] +[def __additive1__ [link sec:arithmetic `additive1`]] +[def __additive2__ [link sec:arithmetic `additive2`]] +[def __arithmetic1__ [link sec:arithmetic `arithmetic1`]] +[def __arithmetic2__ [link sec:arithmetic `arithmetic2`]] +[def __base_from_member__ [link boost.base_from_member `base_from_member`]] +[def __basic_string_ref__ [link boost.basic_string_view `basic_string_ref`]] +[def __basic_string_view__ [link boost.basic_string_view `basic_string_view`]] +[def __bidirectional_iteratable__ [link sec:arithmetic `bidirectional_iteratable`]] +[def __bidirectional_iterator_helper__ [link sec:arithmetic `bidirectional_iterator_helper`]] +[def __bitwise1__ [link sec:arithmetic `bitwise1`]] +[def __bitwise2__ [link sec:arithmetic `bitwise2`]] +[def __call_traits__ [link boost.call_traits `call_traits`]] +[def __call_traits_T__ [link boost.call_traits `call_traits`]] +[def __call_traits_lt__T___ [link boost.call_traits `call_traits`]] +[def __call_traits_lt__T_lb_N_rb__gt___ [link boost.call_traits `call_traits< T[N]>`]] +[def __call_traits_lt__const_T_lb_N_rb__gt___ [link boost.call_traits `call_traits< const T[N]>`]] +[def __compressed_pair__ [link boost.compressed_pair `compressed_pair`]] +[def __decrementable__ [link sec:arithmetic `decrementable`]] +[def __dereferenceable__ [link sec:arithmetic `dereferenceable`]] +[def __equal_pointees__ [link sec:arithmetic `equal_pointees`]] +[def __equal_pointees_t__ [link sec:arithmetic `equal_pointees_t`]] +[def __equality_comparable1__ [link sec:arithmetic `equality_comparable1`]] +[def __equality_comparable2__ [link sec:arithmetic `equality_comparable2`]] +[def __equivalent1__ [link sec:arithmetic `equivalent1`]] +[def __equivalent2__ [link sec:arithmetic `equivalent2`]] +[def __euclidean_ring_operators1__ [link sec:arithmetic `euclidean_ring_operators1`]] +[def __euclidean_ring_operators2__ [link sec:arithmetic `euclidean_ring_operators2`]] +[def __field_operators1__ [link sec:arithmetic `field_operators1`]] +[def __field_operators2__ [link sec:arithmetic `field_operators2`]] +[def __forward_iteratable__ [link sec:arithmetic `forward_iteratable`]] +[def __forward_iterator_helper__ [link sec:arithmetic `forward_iterator_helper`]] +[def __get__ [link boost.get `get`]] +[def __hash_range__ [link boost.hash_range `hash_range`]] +[def __hash_value__ [link boost.hash_value `hash_value`]] +[def __in_place_factory_base__ [link boost.in_place_factory_base `in_place_factory_base`]] +[def __incrementable__ [link sec:arithmetic `incrementable`]] +[def __indexable__ [link sec:arithmetic `indexable`]] +[def __initialized__ [link boost.initialized `initialized`]] +[def __initialized_value__ [link boost.initialized_value `initialized_value`]] +[def __initialized_value_t__ [link boost.initialized_value_t `initialized_value_t`]] +[def __input_iteratable__ [link sec:arithmetic `input_iteratable`]] +[def __input_iterator_helper__ [link sec:arithmetic `input_iterator_helper`]] +[def __integer_arithmetic1__ [link sec:arithmetic `integer_arithmetic1`]] +[def __integer_arithmetic2__ [link sec:arithmetic `integer_arithmetic2`]] +[def __integer_multiplicative1__ [link sec:arithmetic `integer_multiplicative1`]] +[def __integer_multiplicative2__ [link sec:arithmetic `integer_multiplicative2`]] +[def __is_chained_base__ [link sec:arithmetic `is_chained_base`]] +[def __less_pointees__ [link boost.less_pointees `less_pointees`]] +[def __less_pointees_t__ [link boost.less_pointees_t `less_pointees_t`]] +[def __less_than_comparable1__ [link sec:arithmetic `less_than_comparable1`]] +[def __less_than_comparable2__ [link sec:arithmetic `less_than_comparable2`]] +[def __multiplicative1__ [link sec:arithmetic `multiplicative1`]] +[def __multiplicative2__ [link sec:arithmetic `multiplicative2`]] +[def __operator_eq__eq__ [link sec:arithmetic `operator==`]] +[def __operator_gt__ [link sec:arithmetic `operator_gt_`]] +[def __operator_gt__eq__ [link sec:arithmetic `operator>`]] +[def __operator_lt__ [link sec:arithmetic `operator<`]] +[def __operator_lt__eq__ [link sec:arithmetic `operator<=`]] +[def __operator_lt__lt__ [link sec:arithmetic `operator<<`]] +[def __operator_not__eq__ [link sec:arithmetic `operator!=`]] +[def __operators2__ [link sec:arithmetic `operators2`]] +[def __operators__ [link sec:arithmetic `operators`]] +[def __operators_lt_T__ [link sec:arithmetic `operators`]] +[def __ordered_euclidean_ring_operators1__ [link sec:arithmetic `ordered_euclidean_ring_operators1`]] +[def __ordered_euclidean_ring_operators2__ [link sec:arithmetic `ordered_euclidean_ring_operators2`]] +[def __ordered_euclidian_ring_operators1__ [link sec:arithmetic `ordered_euclidian_ring_operators1`]] +[def __ordered_euclidian_ring_operators2__ [link sec:arithmetic `ordered_euclidian_ring_operators2`]] +[def __ordered_field_operators1__ [link sec:arithmetic `ordered_field_operators1`]] +[def __ordered_field_operators2__ [link sec:arithmetic `ordered_field_operators2`]] +[def __ordered_ring_operators1__ [link sec:arithmetic `ordered_ring_operators1`]] +[def __ordered_ring_operators2__ [link sec:arithmetic `ordered_ring_operators2`]] +[def __output_iteratable__ [link sec:arithmetic `output_iteratable`]] +[def __output_iterator_helper__ [link sec:arithmetic `output_iterator_helper`]] +[def __partially_ordered1__ [link sec:arithmetic `partially_ordered1`]] +[def __partially_ordered2__ [link sec:arithmetic `partially_ordered2`]] +[def __random_access_iteratable__ [link sec:arithmetic `random_access_iteratable`]] +[def __random_access_iterator_helper__ [link sec:arithmetic `random_access_iterator_helper`]] +[def __result_of__ [link boost.result_of `result_of`]] +[def __ring_operators1__ [link sec:arithmetic `ring_operators1`]] +[def __ring_operators2__ [link sec:arithmetic `ring_operators2`]] +[def __shiftable1__ [link sec:arithmetic `shiftable1`]] +[def __shiftable2__ [link sec:arithmetic `shiftable2`]] +[def __string_ref__ [link boost.basic_string_view `string_ref`]] +[def __string_view__ [link boost.basic_string_view `string_view`]] +[def __swap__ [link sec:arithmetic `swap`]] +[def __totally_ordered1__ [link sec:arithmetic `totally_ordered1`]] +[def __totally_ordered2__ [link sec:arithmetic `totally_ordered2`]] +[def __tr1_result_of__ [link boost.tr1_result_of `tr1_result_of`]] +[def __typed_in_place_factory_base__ [link boost.typed_in_place_factory_base `typed_in_place_factory_base`]] +[def __u16string_ref__ [link boost.basic_string_view `u16string_ref`]] +[def __u16string_view__ [link boost.basic_string_view `u16string_view`]] +[def __u32string_ref__ [link boost.basic_string_view `u32string_ref`]] +[def __u32string_view__ [link boost.basic_string_view `u32string_view`]] +[def __unit_steppable__ [link sec:arithmetic `unit_steppable`]] +[def __value_initialized__ [link boost.value_initialized `value_initialized`]] +[def __wstring_ref__ [link boost.basic_string_view `wstring_ref`]] +[def __wstring_view__ [link boost.basic_string_view `wstring_view`]] [/ std:: types ] @@ -213,15 +215,16 @@ [include other.qbk] -[section:index_and_ref Indexes and Reference] - -* [link sec:reference Reference] -* [link utility.index Index] - [#sec:reference] -[section:ref Reference] +[section:ref Quick Reference] + +[/ Reference table ] [xinclude quickref.xml] -[include reference.qbk] -[endsect] -[xinclude index.xml] + +[/ Generated reference files ] +[/ [include reference.qbk] ] + +[/ Generated index ] +[/ [xinclude index.xml] ] + [endsect] diff --git a/doc/operators.qbk b/doc/operators.qbk index 9fcc4a7..0d8423e 100644 --- a/doc/operators.qbk +++ b/doc/operators.qbk @@ -11,15 +11,17 @@ [section Operators] [/===============] -[heading Introduction] +[section Introduction] The header [@../../../include/boost/operators.hpp ``] supplies several sets of class templates in `namespace boost`. These templates define operators at namespace scope in terms of a minimal number of fundamental operators provided by the class. +[endsect] + [#sec:rationale] -[heading Rationale] +[section Rationale] Overloaded operators for class types typically occur in groups. If you can write `x + y`, you probably also want to be able to write `x += y`. @@ -90,8 +92,10 @@ semantics of return types of corresponding operators for built-in types requirements make `operators` library applicable to broader set of target classes from different domains, i.e. eventually more useful. +[endsect] + [#sec:example] -[heading Example] +[section Example] This example shows how some of the [link sec:arithmetic arithmetic operator templates] can be used with a geometric point class @@ -145,8 +149,10 @@ const point pi_over_4 = up + right; const point pi_over_4_normalized = pi_over_4 / length(pi_over_4); ``` +[endsect] + [#sec:usage] -[heading Usage] +[section Usage] [#sec:two_arg] [h5 Two-Argument Template Forms] @@ -304,8 +310,10 @@ whether they implement all the requirements of those templates, this shortcut is not portable. Even if this currently works with your compiler, it may not work later. +[endsect] + [#sec:arithmetic] -[heading Arithmetic Operators] +[section Arithmetic Operators] The arithmetic operator templates ease the task of creating a custom numeric type. Given a core set of operators, the templates add related @@ -1597,8 +1605,10 @@ program demonstrates the use of the arithmetic operator templates, and can also be used to verify correct operation. Check the compiler status report for the test results with selected platforms. +[endsect] + [#sec:deref] -[heading Dereference Operators and Iterator Helpers] +[section Dereference Operators and Iterator Helpers] The [link sec:iterator iterator helper] templates ease the task of creating a custom iterator. Similar to arithmetic types, a complete @@ -1904,8 +1914,10 @@ public: Check the [@http://www.boost.org/development/testing.html compiler status report] for the test results with selected platforms. +[endsect] + [#sec:old_lib_note] -[heading Note for Users of Older Versions] +[section Note for Users of Older Versions] The [link sec:chaining changes in the library interface and recommended usage] were motivated by some practical issues described @@ -1952,8 +1964,10 @@ it's worth it to make the library more useful in real world. Alexy Gurtovoy contributed the code which supports the new usage idiom while allowing the library to remain backward-compatible. +[endsect] + [#sec:contributors] -[heading Acknowledgments] +[section Acknowledgments] * [@http://www.boost.org/people/dave_abrahams.htm Dave Abrahams]: Started the library and contributed the arithmetic operators in @@ -1984,3 +1998,5 @@ library to remain backward-compatible. arithmetic operators. [endsect] + +[endsect] diff --git a/doc/quickref.xml b/doc/quickref.xml new file mode 100644 index 0000000..953421f --- /dev/null +++ b/doc/quickref.xml @@ -0,0 +1,497 @@ + + + + + + + + + + + + + + + + + + + Base from Member + + + Call Traits + + + Compressed Pair + + + In-place Factory + + + + + + + + Classes + + + base_from_member + + + + + + + Type Traits + + + call_traits + + + call_traits<T&> + + + call_traits<T[N]> + + + + call_traits<const + T[N]> + + + + + + + + Classes + + + compressed_pair + + + + Functions + + + swap + + + + + + + Classes + + + in_place_factory_base + + + typed_in_place_factory_base + + + + + + + + + + + + + + + + + + + Operators + + + + + + + + + Classes (1 of 5) + + + additive1 + + + additive2 + + + arithmetic1 + + + arithmetic2 + + + bidirectional_iteratable + + + + bidirectional_iterator_helper + + + + bitwise1 + + + bitwise2 + + + decrementable + + + dereferenceable + + + equality_comparable1 + + + equality_comparable2 + + + equivalent1 + + + + + + Classes (2 of 5) + + + equivalent2 + + + euclidean_ring_operators1 + + + + euclidean_ring_operators2 + + + + field_operators1 + + + field_operators2 + + + forward_iteratable + + + forward_iterator_helper + + + incrementable + + + indexable + + + input_iteratable + + + input_iterator_helper + + + integer_arithmetic1 + + + integer_arithmetic2 + + + + + + Classes (3 of 5) + + + integer_multiplicative1 + + + integer_multiplicative2 + + + is_chained_base + + + less_than_comparable1 + + + less_than_comparable2 + + + multiplicative1 + + + multiplicative2 + + + operators + + + operators2 + + + operators<T,T> + + + + ordered_euclidean_ring_operators1 + + + + + ordered_euclidean_ring_operators2 + + + + + ordered_euclidian_ring_operators1 + + + + + + + Classes (4 of 5) + + + + ordered_euclidian_ring_operators2 + + + + ordered_field_operators1 + + + ordered_field_operators2 + + + ordered_ring_operators1 + + + ordered_ring_operators2 + + + output_iteratable + + + output_iterator_helper + + + partially_ordered1 + + + partially_ordered2 + + + random_access_iteratable + + + + random_access_iterator_helper + + + + ring_operators1 + + + ring_operators2 + + + + + + Classes (5 of 5) + + + shiftable1 + + + shiftable2 + + + totally_ordered1 + + + totally_ordered2 + + + unit_steppable + + + Type Traits + + + is_chained_base + + + + + + + + + + + + + + + + + + Result of + + + String View + + + Value Init + + + + + + + + + Type Traits + + + result_of + + + tr1_result_of + + + + + + + Aliases + + + string_view + + + u16string_ref + + + u16string_view + + + u32string_ref + + + u32string_view + + + wstring_ref + + + wstring_view + + + string_ref + + + + + + Classes + + + basic_string_ref + + + basic_string_view + + + Functions + + + hash_range + + + hash_value + + + + + + Operators + + + operator== + + + operator!= + + + operator< + + + operator<= + + + operator> + + + operator>= + + + operator<< + + + + + + + Classes + + + initialized + + + initialized_value_t + + + value_initialized + + + Functions + + + get + + + swap + + + Constants + + + initialized_value + + + + + + + diff --git a/doc/result_of.qbk b/doc/result_of.qbk index f65232d..2ce8fa0 100644 --- a/doc/result_of.qbk +++ b/doc/result_of.qbk @@ -10,7 +10,7 @@ [section Result of] [/===============] -[heading Introduction] +[section Introduction] The class template __result_of__ helps determine the type of a call expression. For example, given an lvalue `f` of type `F` @@ -136,8 +136,10 @@ Technical Report, [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n183 or, for motivation and design rationale, the __result_of__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1454.html proposal]. +[endsect] + [#sec:result_of_guidelines] -[heading Usage guidelines for __boost_result_of__] +[section Usage guidelines for __boost_result_of__] The following are general suggestions about when and how to use __boost_result_of__. @@ -191,8 +193,10 @@ typedef __boost_result_of__< >::type type4; // type4 is float const & ``` +[endsect] + [#sec:result_of_tr1_protocol_guidelines] -[heading Usage guidelines for the TR1 result_of protocol] +[section Usage guidelines for the TR1 result_of protocol] On compliant C++11 compilers, __boost_result_of__ can use __decltype__ to deduce the type of any @@ -268,8 +272,10 @@ struct functor { }; ``` +[endsect] + [#sec:result_of_tr1_diff] -[heading Known differences between __boost_result_of__ and __boost_tr1_result_of__] +[section Known differences between __boost_result_of__ and __boost_tr1_result_of__] When using __decltype__, __boost_result_of__ ignores the TR1 protocol and instead deduces the return type of function objects directly via __decltype__. In most situations, users @@ -391,17 +397,27 @@ BOOST_STATIC_ASSERT(( #endif ``` +[endsect] + [#sec:result_of_cxx11_diff] -[heading Known differences between __boost_result_of__ and C++11 result_of] +[section Known differences between __boost_result_of__ and C++11 result_of] When using __decltype__, __boost_result_of__ implements most of the C++11 __std_result_of__ specification. One known exception is that __boost_result_of__ does not implement the requirements regarding pointers to member data. -[heading Acknowledgments] +[endsect] + +[/===============] +[xinclude result_of_reference.xml] +[/===============] + +[section Acknowledgments] Created by Doug Gregor. Contributions from Daniel Walker, Eric Niebler, Michel Morin and others. [endsect] +[endsect] + diff --git a/doc/string_view.qbk b/doc/string_view.qbk index 5c37265..13c5180 100644 --- a/doc/string_view.qbk +++ b/doc/string_view.qbk @@ -10,7 +10,7 @@ [section String View] [/===============] -[heading Introduction] +[section Introduction] The class __boost_string_view__ and other classes derived from __basic_string_view__ represent references to strings or substrings. When you are parsing/processing strings from some external source, frequently you want to pass a piece of text to a procedure for specialized processing. Before __std_string_view__, the canonical way to do this used to be a __std_string__, but that has certain drawbacks: @@ -51,9 +51,10 @@ Please prefer __string_view__ / __basic_string_view__ over __string_ref__ / __ba ] +[endsect] [/===============] -[heading Examples] +[section Examples] [/===============] Integrating __string_view__ into your code is fairly simple. Wherever you pass a `const __std_string__ &` or __std_string__ as a parameter, that's a candidate for passing a __boost_string_view__. @@ -86,9 +87,10 @@ if ( extract_part ( "ABCDEFG" ).front() == "C" ) { /* do something */ } ``` No memory allocations. No copying of character data. No changes to the code other than the types. There are two __string_view__ s created, and two __string_view__ s copied, but those are cheap operations. +[endsect] [/=================] -[heading:reference Synopsis ] +[section:reference Synopsis] [/=================] The header file [@../../../include/boost/utility/string_view.hpp ``] defines a template __boost_basic_string_view__, and four specializations __string_view__, __wstring_view__, __u16string_view__, __u32string_view__ - for `char` / `wchar_t` / `char16_t` / `char32_t`. @@ -173,9 +175,11 @@ bool starts_with(basic_string_view x) const ; bool ends_with(charT c) const ; bool ends_with(basic_string_view x) const ; ``` +[endsect] + [/===============] -[h1 History] +[section History] [/===============] [h5 boost 1.71] @@ -186,7 +190,15 @@ a common utility. [h5 boost 1.53] * Introduced -[heading Acknowledgments] +[endsect] + +[/===============] +[xinclude string_view_reference.xml] +[/===============] + +[/===============] +[section Acknowledgments] +[/===============] Author: Clow, Marshall @@ -194,6 +206,5 @@ Copyright 2012 Marshall Clow [endsect] - - +[endsect] diff --git a/doc/value_init.qbk b/doc/value_init.qbk index 75014c5..2ffbe55 100644 --- a/doc/value_init.qbk +++ b/doc/value_init.qbk @@ -9,9 +9,10 @@ [/===============] [#sec:value_init] [section Value Init] + [/===============] -[heading Introduction] +[section Introduction] Constructing and initializing objects in a generic way is difficult in C++. The problem is that there are several different rules that apply @@ -100,8 +101,10 @@ T var = initialized_value; This form of initialization is semantically equivalent to `T4 var4 = T4()`, but robust against the aforementioned compiler issues. +[endsect] + [#sec:details] -[heading Details] +[section Details] The C++ standard \[[link sec:references 3]\] contains the definitions of `zero-initialization` and `default-initialization`. Informally, zero-initialization @@ -262,11 +265,13 @@ contains. It will do so for those compilers that need to have such a workaround, [@boost:/doc/html/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects compiler defect macro] `BOOST_NO_COMPLETE_VALUE_INITIALIZATION`. +[endsect] + [#sec:types] -[heading Types and objects] +[section Types and objects] [#sec:val_init] -[heading `template class value_initialized`] +[section `template class value_initialized`] ``` namespace boost { @@ -419,8 +424,10 @@ value_initialized const cx_c; get(cx_c) = 1; // ERROR: Cannot modify a const object ``` +[endsect] + [#sec:initialized] -[heading `template class initialized`] +[section `template class initialized`] ``` @@ -482,8 +489,10 @@ object must ['always] be value-initialized, `__value_initialized__` may be preferable. And if the object must always be direct-initialized, none of the two wrappers really needs to be used. +[endsect] + [#sec:initialized_value] -[heading `initialized_value`] +[section `initialized_value`] ``` namespace boost { @@ -526,8 +535,11 @@ Instead, one could use __initialized_value__ as follows: T var = __initialized_value__; ``` +[endsect] +[endsect] + [#sec:references] -[h5 References] +[section References] # Bjarne Stroustrup, Gabriel Dos Reis, and J. Stephen Adamczyk wrote various papers, proposing to extend the support for brace-enclosed ['initializer lists] @@ -543,8 +555,14 @@ compiler-generated functions you do not want], [@http://www.aristeia.com/books.h # POD stands for "Plain Old Data" +[endsect] + +[/===============] +[xinclude value_init_reference.xml] +[/===============] + [#sec:acknowledgements] -[h5 Acknowledgements] +[section Acknowledgements] __value_initialized__ was developed by Fernando Cacciola, with help and suggestions from David Abrahams and Darin Adler. @@ -562,3 +580,5 @@ Developed by [@mailto:fernando_cacciola@hotmail.com Fernando Cacciola]. The late this file can be found at [@http://www.boost.org www.boost.org]. [endsect] + +[endsect] diff --git a/include/boost/detail/ob_compressed_pair.hpp b/include/boost/detail/ob_compressed_pair.hpp index 326e454..4621be3 100644 --- a/include/boost/detail/ob_compressed_pair.hpp +++ b/include/boost/detail/ob_compressed_pair.hpp @@ -20,10 +20,11 @@ - John Maddock Jan 2000. */ - +#ifndef BOOST_UTILITY_DOCS #ifndef BOOST_OB_COMPRESSED_PAIR_HPP #define BOOST_OB_COMPRESSED_PAIR_HPP + #include #ifndef BOOST_OBJECT_TYPE_TRAITS_HPP #include @@ -494,6 +495,4 @@ inline void swap(compressed_pair& x, compressed_pair& y) } // boost #endif // BOOST_OB_COMPRESSED_PAIR_HPP - - - +#endif // BOOST_UTILITY_DOCS diff --git a/include/boost/utility/base_from_member.hpp b/include/boost/utility/base_from_member.hpp index 604541d..614fad7 100644 --- a/include/boost/utility/base_from_member.hpp +++ b/include/boost/utility/base_from_member.hpp @@ -47,13 +47,14 @@ // {} // This macro should only persist within this file. +#ifndef BOOST_UTILITY_DOCS #define BOOST_PRIVATE_CTR_DEF( z, n, data ) \ template < BOOST_PP_ENUM_PARAMS(n, typename T) > \ base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \ : member( BOOST_PP_ENUM_PARAMS(n, x) ) \ {} \ /**/ - +#endif // BOOST_UTILITY_DOCS namespace boost { diff --git a/include/boost/utility/binary.hpp b/include/boost/utility/binary.hpp index 8cef146..2c3189a 100644 --- a/include/boost/utility/binary.hpp +++ b/include/boost/utility/binary.hpp @@ -68,6 +68,7 @@ ( (0) BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ ) +#ifndef BOOST_UTILITY_DOCS #define BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings ) \ BOOST_PP_SEQ_TRANSFORM \ ( BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION \ @@ -703,6 +704,6 @@ #define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111100 (1)(1)(1)(1)(1)(1)(0)(0), #define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111101 (1)(1)(1)(1)(1)(1)(0)(1), #define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111110 (1)(1)(1)(1)(1)(1)(1)(0), -#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), - +#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), +#endif // BOOST_UTILITY_DOCS #endif diff --git a/include/boost/utility/in_place_factory.hpp b/include/boost/utility/in_place_factory.hpp index 1a62ace..d18a4c5 100644 --- a/include/boost/utility/in_place_factory.hpp +++ b/include/boost/utility/in_place_factory.hpp @@ -19,15 +19,21 @@ namespace boost { class in_place_factory_base {} ; +#ifndef BOOST_UTILITY_DOCS #define BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY) #define BOOST_PP_FILENAME_1 +#endif // BOOST_UTILITY_DOCS + #include BOOST_PP_ITERATE() } // namespace boost #include +#ifndef BOOST_UTILITY_DOCS #define BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP +#endif + #else #define N BOOST_PP_ITERATION() diff --git a/include/boost/utility/result_of.hpp b/include/boost/utility/result_of.hpp index 9d444f9..6979449 100644 --- a/include/boost/utility/result_of.hpp +++ b/include/boost/utility/result_of.hpp @@ -36,9 +36,11 @@ # include #endif +#ifndef BOOST_UTILITY_DOCS #ifndef BOOST_RESULT_OF_NUM_ARGS # define BOOST_RESULT_OF_NUM_ARGS 16 #endif +#endif // BOOST_UTILITY_DOCS // Use the decltype-based version of result_of by default if the compiler // supports N3276 . @@ -51,6 +53,7 @@ BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK cannot be defined at the same time. #endif +#ifndef BOOST_UTILITY_DOCS #ifndef BOOST_RESULT_OF_USE_TR1 # ifndef BOOST_RESULT_OF_USE_DECLTYPE # ifndef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK @@ -62,6 +65,7 @@ # endif # endif #endif +#endif // BOOST_UTILITY_DOCS namespace boost { diff --git a/include/boost/utility/typed_in_place_factory.hpp b/include/boost/utility/typed_in_place_factory.hpp index 833a346..52a7061 100644 --- a/include/boost/utility/typed_in_place_factory.hpp +++ b/include/boost/utility/typed_in_place_factory.hpp @@ -19,15 +19,20 @@ namespace boost { class typed_in_place_factory_base {} ; +#ifndef BOOST_UTILITY_DOCS #define BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY) #define BOOST_PP_FILENAME_1 -#include BOOST_PP_ITERATE() +#endif // BOOST_UTILITY_DOCS +#include BOOST_PP_ITERATE() } // namespace boost #include +#ifndef BOOST_UTILITY_DOCS #define BOOST_UTILITY_TYPED_INPLACE_FACTORY_04APR2007_HPP +#endif // BOOST_UTILITY_DOCS + #else #define N BOOST_PP_ITERATION() diff --git a/include/boost/utility/value_init.hpp b/include/boost/utility/value_init.hpp index 418a214..f3d940b 100644 --- a/include/boost/utility/value_init.hpp +++ b/include/boost/utility/value_init.hpp @@ -37,6 +37,8 @@ #pragma warning(disable: 4512) #endif +#ifndef BOOST_UTILITY_DOCS + #ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION // Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED // suggests that a workaround should be applied, because of compiler issues @@ -54,6 +56,8 @@ #endif #endif +#endif // BOOST_UTILITY_DOCS + namespace boost { namespace detail {