diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-06-25 22:59:01 +0000 |
---|---|---|
committer | <> | 2013-09-27 11:49:28 +0000 |
commit | 8c4528713d907ee2cfd3bfcbbad272c749867f84 (patch) | |
tree | c09e2ce80f47b90c85cc720f5139089ad9c8cfff /libs/fusion | |
download | boost-tarball-8c4528713d907ee2cfd3bfcbbad272c749867f84.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_54_0.tar.bz2.boost_1_54_0baserock/morph
Diffstat (limited to 'libs/fusion')
530 files changed, 76007 insertions, 0 deletions
diff --git a/libs/fusion/doc/Jamfile b/libs/fusion/doc/Jamfile new file mode 100644 index 000000000..8348f7ebe --- /dev/null +++ b/libs/fusion/doc/Jamfile @@ -0,0 +1,28 @@ +#============================================================================== +# Copyright (c) 2003-2011 Joel de Guzman +# +# Use, modification and distribution is 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) +#============================================================================== +project boost/libs/fusion/doc ; +import boostbook : boostbook ; +using quickbook ; + +path-constant images_location : html ; + +boostbook quickbook + : + fusion.qbk + : + <xsl:param>boost.root=../../../.. + <xsl:param>chunk.section.depth=4 + <xsl:param>chunk.first.sections=1 + <xsl:param>toc.section.depth=3 + <xsl:param>toc.max.depth=3 + <xsl:param>generate.section.toc.level=4 + <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/fusion/doc/html + <format>pdf:<xsl:param>img.src.path=$(images_location)/ + ; + + diff --git a/libs/fusion/doc/acknowledgements.qbk b/libs/fusion/doc/acknowledgements.qbk new file mode 100644 index 000000000..da0599557 --- /dev/null +++ b/libs/fusion/doc/acknowledgements.qbk @@ -0,0 +1,24 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Acknowledgements] + +Special thanks to David Abrahams, Douglas Gregor, Hartmut Kaiser, Aleksey +Gurtovoy, Peder Holt, Daniel Wallin, Jaakko Jarvi, Jeremiah Willcock, Dan +Marsden, Eric Niebler, Joao Abecasis and Andy Little. These people are +instrumental in the design and development of Fusion. + +Special thanks to Ronald Garcia, the review manager and to all the people in the +boost community who participated in the review: Andreas Pokorny, Andreas Huber, +Jeff Flinn, David Abrahams, Pedro Lamarao, Larry Evans, Ryan Gallagher, Andy +Little, Gennadiy Rozental, Tobias Schwinger, Joao Abecasis, Eric Niebler, Oleg +Abrosimov, Gary Powell, Eric Friedman, Darren Cook, Martin Bonner and Douglas +Gregor. + +[endsect] + diff --git a/libs/fusion/doc/adapted.qbk b/libs/fusion/doc/adapted.qbk new file mode 100644 index 000000000..93aa17030 --- /dev/null +++ b/libs/fusion/doc/adapted.qbk @@ -0,0 +1,1359 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2010 Christopher Schmidt + + Use, modification and distribution is 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) +===============================================================================/] +[section Adapted] + +Fusion provides a couple of adapters for other sequences such as arrays, +`std::pair`, __mpl__ sequences, and `boost::array`. These adapters are +written using Fusion's non-intrusive __extension__ mechanism. If you wish +to use these sequences with fusion, simply include the necessary files and +they will be regarded as first-class, fully conforming fusion sequences. + +Fusion also provides various schemes to make it easy for the user to adapt +various data structures, non-intrusively, as full fledged Fusion sequences. + +[heading Header] + + #include <boost/fusion/adapted.hpp> + #include <boost/fusion/include/adapted.hpp> + +Fusion sequences may also be adapted as fully conforming __mpl__ sequences (see +__intrinsics__). That way, we can have 2-way adaptation to and from __mpl__ and +Fusion. To make Fusion sequences fully conforming __mpl__ sequences, include: + + #include <boost/fusion/mpl.hpp> + +If you want bi-directional adaptation to and from __mpl__ and Fusion, simply +include: + + #include <boost/fusion/include/mpl.hpp> + +The header includes all the necessary headers. + +[section:array Array] + +This module provides adapters for arrays. Including the module +header makes any array a fully conforming __random_access_sequence__. + +[heading Header] + + #include <boost/fusion/adapted/array.hpp> + #include <boost/fusion/include/array.hpp> + +[heading Model of] + +* __random_access_sequence__ + +[heading Example] + + int arr[3] = {1,2,3}; + + std::cout << *__begin__(arr) << std::endl; + std::cout << *__next__(__begin__(arr)) << std::endl; + std::cout << *__advance_c__<2>(__begin__(arr)) << std::endl; + std::cout << *__prior__(__end__(arr)) << std::endl; + std::cout << __at_c__<2>(arr) << std::endl; + +[endsect] + +[section std::pair] + +This module provides adapters for `std::pair`. Including the module header +makes `std::pair` a fully conforming __random_access_sequence__. + +[heading Header] + + #include <boost/fusion/adapted/std_pair.hpp> + #include <boost/fusion/include/std_pair.hpp> + +[heading Model of] + +* __random_access_sequence__ + +[heading Example] + + std::pair<int, std::string> p(123, "Hola!!!"); + std::cout << __at_c__<0>(p) << std::endl; + std::cout << __at_c__<1>(p) << std::endl; + std::cout << p << std::endl; + +[heading See also] + +__std_pair_doc__, __tr1_tuple_pair__ + +[endsect] + +[section mpl sequence] + +This module provides adapters for __mpl__ sequences. Including the module +header makes all __mpl__ sequences fully conforming fusion sequences. + +[heading Header] + + #include <boost/fusion/adapted/mpl.hpp> + #include <boost/fusion/include/mpl.hpp> + +[heading Model of] + +* __forward_sequence__ (If the __mpl__ sequence is a forward sequence.) +* __bidirectional_sequence__ (If the __mpl__ sequence is a bidirectional sequence.) +* __random_access_sequence__ (If the __mpl__ sequence is a random access sequence.) + +[heading Example] + + mpl::vector_c<int, 123, 456> vec_c; + fusion::vector2<int, long> v(vec_c); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + + v = mpl::vector_c<int, 456, 789>(); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + +[heading See also] + +__mpl__ + +[endsect] + +[section boost::array] + +This module provides adapters for `boost::array`. Including the module +header makes `boost::array` a fully conforming __random_access_sequence__. + +[heading Header] + + #include <boost/fusion/adapted/boost_array.hpp> + #include <boost/fusion/include/boost_array.hpp> + +[heading Model of] + +* __random_access_sequence__ + +[heading Example] + + boost::array<int,3> arr = {{1,2,3}}; + + std::cout << *__begin__(arr) << std::endl; + std::cout << *__next__(__begin__(arr)) << std::endl; + std::cout << *__advance_c__<2>(__begin__(arr)) << std::endl; + std::cout << *__prior__(__end__(arr)) << std::endl; + std::cout << __at_c__<2>(arr) << std::endl; + +[heading See also] + +__boost_array_library__ + +[endsect] + +[section boost::tuple] +This module provides adapters for `boost::tuple`. Including the module +header makes `boost::tuple` a fully conforming __forward_sequence__. + +[heading Header] + + #include <boost/fusion/adapted/boost_tuple.hpp> + #include <boost/fusion/include/boost_tuple.hpp> + +[heading Model of] + +* __forward_sequence__ + +[heading Example] + + boost::tuple<int,std::string> example_tuple(101, "hello"); + std::cout << *boost::fusion::begin(example_tuple) << '\n'; + std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n'; + +[heading See also] + +__boost_tuple_library__ + +[endsect] + +[section:adapt_struct BOOST_FUSION_ADAPT_STRUCT] + +[heading Description] +BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the +necessary boilerplate to make an arbitrary struct a model of +__random_access_sequence__. + +[heading Synopsis] + BOOST_FUSION_ADAPT_STRUCT( + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Semantics] + +The above macro generates the necessary code to adapt `struct_name` +as a model of __random_access_sequence__. +The sequence of `(member_typeN, member_nameN)` +pairs declares the type and names of each of the struct members that are +part of the sequence. + +The macro should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_struct.hpp> + #include <boost/fusion/include/adapt_struct.hpp> + +[heading Example] + namespace demo + { + struct employee + { + std::string name; + int age; + }; + } + + // demo::employee is now a Fusion sequence + BOOST_FUSION_ADAPT_STRUCT( + demo::employee, + (std::string, name) + (int, age)) + +[endsect] + +[section:adapt_tpl_struct BOOST_FUSION_ADAPT_TPL_STRUCT] + +[heading Description] +BOOST_FUSION_ADAPT_TPL_STRUCT is a macro that can be used to generate all the +necessary boilerplate to make an arbitrary template struct a model of +__random_access_sequence__. + +[heading Synopsis] + BOOST_FUSION_ADAPT_TPL_STRUCT( + (template_param0)(template_param1)..., + (struct_name) (specialization_param0)(specialization_param1)..., + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Semantics] + +The above macro generates the necessary code to adapt `struct_name` or an +arbitrary specialization of `struct_name` as a model of +__random_access_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(specialization_param0)(specialization_param1)...` +declares the template parameters of the actual specialization of `struct_name` +that is adapted as a fusion sequence. +The sequence of `(member_typeN, member_nameN)` +pairs declares the type and names of each of the struct members that are +part of the sequence. + +The macro should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_struct.hpp> + #include <boost/fusion/include/adapt_struct.hpp> + +[heading Example] + namespace demo + { + template<typename Name, typename Age> + struct employee + { + Name name; + Age age; + }; + } + + // Any instantiated demo::employee is now a Fusion sequence + BOOST_FUSION_ADAPT_TPL_STRUCT( + (Name)(Age), + (demo::employee) (Name)(Age), + (Name, name) + (Age, age)) + +[endsect] + +[section:adapt_struct_named BOOST_FUSION_ADAPT_STRUCT_NAMED] + +[heading Description] +BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are +macros that can be used to generate all the necessary boilerplate to make an +arbitrary struct a model of __random_access_sequence__. The given struct is +adapted using the given name. + +[heading Synopsis] + BOOST_FUSION_ADAPT_STRUCT_NAMED( + struct_name, adapted_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + + BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( + struct_name, + (namespace0)(namespace1)..., + adapted_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Semantics] + +The above macros generate the necessary code to adapt `struct_name` +as a model of __random_access_sequence__ while using `adapted_name` as the +name of the adapted struct. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `adapted_name`. It yields to a fully qualified name for `adapted_name` of +`namespace0::namespace1::... adapted_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the adapted view is placed in the global namespace. +If no namespace sequence is given (i.e. `BOOST_FUSION_ADAPT_STRUCT_NAMED`), the +adapted view is placed in the namespace `boost::fusion::adapted`. +The sequence of `(member_typeN, member_nameN)` +pairs declares the type and names of each of the struct members that are +part of the sequence. + +The macros should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be converted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_struct_named.hpp> + #include <boost/fusion/include/adapt_struct_named.hpp> + +[heading Example] + namespace demo + { + struct employee + { + std::string name; + int age; + }; + } + + // boost::fusion::adapted::adapted_employee is now a Fusion sequence + // referring to demo::employee + BOOST_FUSION_ADAPT_STRUCT_NAMED( + demo::employee, adapted_employee, + (std::string, name) + (int, age)) + +[endsect] + +[section:adapt_assoc BOOST_FUSION_ADAPT_ASSOC_STRUCT] + +[heading Description] +BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all the +necessary boilerplate to make an arbitrary struct a model of +__random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + BOOST_FUSION_ADAPT_ASSOC_STRUCT( + struct_name, + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + +[heading Semantics] + +The above macro generates the necessary code to adapt `struct_name` +as a model of __random_access_sequence__ and __associative_sequence__. +The sequence of `(member_typeN, member_nameN, key_typeN)` +triples declares the type, name and key type of each of the struct members +that are part of the sequence. + +The macro should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> + #include <boost/fusion/include/adapt_assoc_struct.hpp> + +[heading Example] + namespace demo + { + struct employee + { + std::string name; + int age; + }; + } + + namespace keys + { + struct name; + struct age; + } + + // demo::employee is now a Fusion sequence. + // It is also an associative sequence with + // keys keys::name and keys::age present. + BOOST_FUSION_ADAPT_ASSOC_STRUCT( + demo::employee, + (std::string, name, keys::name) + (int, age, keys::age)) + +[endsect] + +[section:adapt_assoc_tpl_struct BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT] + +[heading Description] +BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT is a macro that can be used to generate all the +necessary boilerplate to make an arbitrary template struct a model of +__random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( + (template_param0)(template_param1)..., + (struct_name) (specialization_param0)(specialization_param1)..., + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + +[heading Semantics] + +The above macro generates the necessary code to adapt `struct_name` or an +arbitrary specialization of `struct_name` as a model of +__random_access_sequence__ and __associative_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(specialization_param0)(specialization_param1)...` +declares the template parameters of the actual specialization of `struct_name` +that is adapted as a fusion sequence. +The sequence of `(member_typeN, member_nameN, key_typeN)` +triples declares the type, name and key type of each of the struct members +that are part of the sequence. + +The macro should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> + #include <boost/fusion/include/adapt_assoc_struct.hpp> + +[heading Example] + namespace demo + { + template<typename Name, typename Age> + struct employee + { + Name name; + Age age; + }; + } + + namespace keys + { + struct name; + struct age; + } + + // Any instantiated demo::employee is now a Fusion sequence. + // It is also an associative sequence with + // keys keys::name and keys::age present. + BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( + (Name)(Age), + (demo::employee) (Name)(Age), + (Name, name, keys::name) + (Age, age, keys::age)) + +[endsect] + +[section:adapt_assoc_struct_named BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED] + +[heading Description] +BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS are +macros that can be used to generate all the necessary boilerplate to make an +arbitrary struct a model of __random_access_sequence__ and +__associative_sequence__. The given struct is adapted using the given name. + +[heading Synopsis] + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( + struct_name, adapted_name, + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( + struct_name, + (namespace0)(namespace1)..., + adapted_name, + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + +[heading Semantics] + +The above macros generate the necessary code to adapt `struct_name` +as a model of __random_access_sequence__ and __associative_sequence__ while +using `adapted_name` as the name of the adapted struct. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `adapted_name`. It yields to a fully qualified name for `adapted_name` of +`namespace0::namespace1::... adapted_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the adapted view is placed in the global namespace. +If no namespace sequence is given (i.e. `BOOST_FUSION_ADAPT_STRUCT_ASSOC_NAMED`), the +adapted view is placed in the namespace `boost::fusion::adapted`. +The sequence of `(member_typeN, member_nameN, key_typeN)` +triples declares the type, name and key type of each of the struct members +that are part of the sequence. + +The macros should be used at global scope, and `struct_name` should be the fully +namespace qualified name of the struct to be converted. + +[heading Header] + + #include <boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp> + #include <boost/fusion/include/adapt_assoc_struct_named.hpp> + +[heading Example] + namespace demo + { + struct employee + { + std::string name; + int age; + }; + } + + namespace keys + { + struct name; + struct age; + } + + // boost::fusion::adapted::adapted_employee is now a Fusion sequence + // referring to demo::employee + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( + demo::employee, adapted_employee, + (std::string, name, keys::name) + (int, age, keys::age)) + +[endsect] + +[section:adapt_adt BOOST_FUSION_ADAPT_ADT] + +BOOST_FUSION_ADAPT_ADT is a macro than can be used to generate all the +necessary boilerplate to adapt an arbitrary class type as a model of +__random_access_sequence__. + +[heading Synopsis] + + BOOST_FUSION_ADAPT_ADT( + type_name, + (attribute_type0, attribute_const_type0, get_expr0, set_expr0) + (attribute_type1, attribute_const_type1, get_expr1, set_expr1) + ... + ) + +[heading Expression Semantics] + +The above macro generates the necessary code to adapt `type_name` +as a model of __random_access_sequence__. +The sequence of +[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])] +quadruples declares the types, const types, get-expressions and set-expressions +of the elements that are part of the adapted fusion sequence. +[^get_expr['N]] is the expression that is invoked to get the ['N]th element +of an instance of `type_name`. This expression may access a variable named +`obj` of type `type_name&` or `type_name const&` which represents the underlying +instance of `type_name`. +[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types +that [^get_expr['N]] denotes to. +[^set_expr['N]] is the expression that is invoked to set the ['N]th element +of an instance of `type_name`. This expression may access variables named +`obj` of type `type_name&`, which represent the corresponding instance of +`type_name`, and `val` of an arbitrary const-qualified reference template type +parameter `Val`, which represents the right operand of the assignment +expression. + +The actual return type of fusion's intrinsic sequence access (meta-)functions +when in invoked with (an instance of) `type_name` is a proxy type. +This type is implicitly convertible to the attribute type via [^get_expr['N]] and +forwards assignment to the underlying element via [^set_expr['N]]. +The value type (that is the type returned by __result_of_value_of__, +__result_of_value_at__ and __result_of_value_at_c__) of the ['N]th element +is [^attribute_type['N]] with const-qualifier and reference removed. + +The macro should be used at global scope, and `type_name` should be the fully +namespace qualified name of the class type to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/adt/adapt_adt.hpp> + #include <boost/fusion/include/adapt_adt.hpp> + +[heading Example] + namespace demo + { + struct employee + { + private: + std::string name; + int age; + + public: + void set_name(std::string const& n) + { + name=n; + } + + void set_age(int a) + { + age=a; + } + + std::string const& get_name()const + { + return name; + } + + int get_age()const + { + return age; + } + }; + } + + BOOST_FUSION_ADAPT_ADT( + demo::employee, + (std::string const&, std::string const&, obj.get_name(), obj.set_name(val)) + (int, int, obj.get_age(), obj.set_age(val))) + + demo::employee e; + front(e)="Edward Norton"; + back(e)=41; + //Prints 'Edward Norton is 41 years old' + std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; + +[heading See also] + +__adt_attribute_proxy__ + +[endsect] + +[section:adapt_tpl_adt BOOST_FUSION_ADAPT_TPL_ADT] + +BOOST_FUSION_ADAPT_TPL_ADT is a macro than can be used to generate all the +necessary boilerplate to adapt an arbitrary template class type as a model of +__random_access_sequence__. + +[heading Synopsis] + + BOOST_FUSION_ADAPT_TPL_ADT( + (template_param0)(template_param1)..., + (type_name) (specialization_param0)(specialization_param1)..., + (attribute_type0, attribute_const_type0, get_expr0, set_expr0) + (attribute_type1, attribute_const_type1, get_expr1, set_expr1) + ... + ) + +[heading Expression Semantics] + +The above macro generates the necessary code to adapt `type_name` +or an arbitrary specialization of `type_name` +as a model of __random_access_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(specialization_param0)(specialization_param1)...` +declares the template parameters of the actual specialization of `type_name` +that is adapted as a fusion sequence. +The sequence of +[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])] +quadruples declares the types, const types, get-expressions and set-expressions +of the elements that are part of the adapted fusion sequence. +[^get_expr['N]] is the expression that is invoked to get the ['N]th element +of an instance of `type_name`. This expression may access a variable named +`obj` of type `type_name&` or `type_name const&` which represents the underlying +instance of `type_name`. +[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types +that [^get_expr['N]] denotes to. +[^set_expr['N]] is the expression that is invoked to set the ['N]th element +of an instance of `type_name`. This expression may access variables named +`obj` of type `type_name&`, which represent the corresponding instance of +`type_name`, and `val` of an arbitrary const-qualified reference template type +parameter `Val`, which represents the right operand of the assignment +expression. + +The actual return type of fusion's intrinsic sequence access (meta-)functions +when in invoked with (an instance of) `type_name` is a proxy type. +This type is implicitly convertible to the attribute type via [^get_expr['N]] and +forwards assignment to the underlying element via [^set_expr['N]]. +The value type (that is the type returned by __result_of_value_of__, +__result_of_value_at__ and __result_of_value_at_c__) of the ['N]th element +is [^attribute_type['N]] with const-qualifier and reference removed. + +The macro should be used at global scope, and `type_name` should be the fully +namespace qualified name of the template class type to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/adt/adapt_adt.hpp> + #include <boost/fusion/include/adapt_adt.hpp> + +[heading Example] + namespace demo + { + template<typename Name, typename Age> + struct employee + { + private: + Name name; + Age age; + + public: + void set_name(Name const& n) + { + name=n; + } + + void set_age(Age const& a) + { + age=a; + } + + Name const& get_name()const + { + return name; + } + + Age const& get_age()const + { + return age; + } + }; + } + + BOOST_FUSION_ADAPT_TPL_ADT( + (Name)(Age), + (demo::employee) (Name)(Age), + (Name const&, Name const&, obj.get_name(), obj.set_name(val)) + (Age const&, Age const&, obj.get_age(), obj.set_age(val))) + + demo::employee<std::string, int> e; + boost::fusion::front(e)="Edward Norton"; + boost::fusion::back(e)=41; + //Prints 'Edward Norton is 41 years old' + std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; + +[heading See also] + +__adt_attribute_proxy__ + +[endsect] + +[section:adapt_assoc_adt BOOST_FUSION_ADAPT_ASSOC_ADT] + +BOOST_FUSION_ADAPT_ASSOC_ADT is a macro than can be used to generate all the +necessary boilerplate to adapt an arbitrary class type as a model of +__random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + + BOOST_FUSION_ADAPT_ASSOC_ADT( + type_name, + (attribute_type0, attribute_const_type0, get_expr0, set_expr0, key_type0) + (attribute_type1, attribute_const_type1, get_expr1, set_expr1, key_type1) + ... + ) + +[heading Expression Semantics] + +The above macro generates the necessary code to adapt `type_name` +as a model of __random_access_sequence__ and __associative_sequence__. +The sequence of +[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])] +5-tuples declares the types, const types, get-expressions, set-expressions and key types +of the elements that are part of the adapted fusion sequence. +[^get_expr['N]] is the expression that is invoked to get the ['N]th element +of an instance of `type_name`. This expression may access a variable named +`obj` of type `type_name&` or `type_name const&` which represents the underlying +instance of `type_name`. +[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types +that [^get_expr['N]] denotes to. +[^set_expr['N]] is the expression that is invoked to set the ['N]th element +of an instance of `type_name`. This expression may access variables named +`obj` of type `type_name&`, which represent the corresponding instance of +`type_name`, and `val` of an arbitrary const-qualified reference template type +parameter `Val`, which represents the right operand of the assignment +expression. + +The actual return type of fusion's intrinsic sequence access (meta-)functions +when in invoked with (an instance of) `type_name` is a proxy type. +This type is implicitly convertible to the attribute type via [^get_expr['N]] and +forwards assignment to the underlying element via [^set_expr['N]]. +The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, +__result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element +is [^attribute_type['N]] with const-qualifier and reference removed. + +The macro should be used at global scope, and `type_name` should be the fully +namespace qualified name of the class type to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> + #include <boost/fusion/include/adapt_assoc_adt.hpp> + +[heading Example] + namespace demo + { + struct employee + { + private: + std::string name; + int age; + + public: + void set_name(std::string const& n) + { + name=n; + } + + void set_age(int a) + { + age=a; + } + + std::string const& get_name()const + { + return name; + } + + int get_age()const + { + return age; + } + }; + } + + namespace keys + { + struct name; + struct age; + } + + BOOST_FUSION_ADAPT_ASSOC_ADT( + demo::employee, + (std::string const&, std::string const&, obj.get_name(), obj.set_name(val), keys::name) + (int, int, obj.get_age(), obj.set_age(val), keys::age)) + + demo::employee e; + at_key<keys::name>(e)="Edward Norton"; + at_key<keys::age>(e)=41; + //Prints 'Edward Norton is 41 years old' + std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; + +[heading See also] + +__adt_attribute_proxy__ + +[endsect] + +[section:adapt_assoc_tpl_adt BOOST_FUSION_ADAPT_ASSOC_TPL_ADT] + +BOOST_FUSION_ADAPT_ASSOC_TPL_ADT is a macro than can be used to generate all the +necessary boilerplate to adapt an arbitrary template class type as a model of +__random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + + BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( + (template_param0)(template_param1)..., + (type_name) (specialization_param0)(specialization_param1)..., + (attribute_type0, attribute_const_type0, get_expr0, set_expr0, key_type0) + (attribute_type1, attribute_const_type1, get_expr1, set_expr1, key_type1) + ... + ) + +[heading Expression Semantics] + +The above macro generates the necessary code to adapt `type_name` +or an arbitrary specialization of `type_name` +as a model of __random_access_sequence__ and __associative_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(specialization_param0)(specialization_param1)...` +declares the template parameters of the actual specialization of `type_name` +that is adapted as a fusion sequence. +The sequence of +[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])] +5-tuples declares the types, const types, get-expressions, set-expressions and key types +of the elements that are part of the adapted fusion sequence. +[^get_expr['N]] is the expression that is invoked to get the ['N]th element +of an instance of `type_name`. This expression may access a variable named +`obj` of type `type_name&` or `type_name const&` which represents the underlying +instance of `type_name`. +[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types +that [^get_expr['N]] denotes to. +[^set_expr['N]] is the expression that is invoked to set the ['N]th element +of an instance of `type_name`. This expression may access variables named +`obj` of type `type_name&`, which represent the corresponding instance of +`type_name`, and `val` of an arbitrary const-qualified reference template type +parameter `Val`, which represents the right operand of the assignment +expression. + +The actual return type of fusion's intrinsic sequence access (meta-)functions +when in invoked with (an instance of) `type_name` is a proxy type. +This type is implicitly convertible to the attribute type via [^get_expr['N]] and +forwards assignment to the underlying element via [^set_expr['N]]. +The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, +__result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element +is [^attribute_type['N]] with const-qualifier and reference removed. + +The macro should be used at global scope, and `type_name` should be the fully +namespace qualified name of the template class type to be adapted. + +[heading Header] + + #include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> + #include <boost/fusion/include/adapt_assoc_adt.hpp> + +[heading Example] + namespace demo + { + template<typename Name, typename Age> + struct employee + { + private: + Name name; + Age age; + + public: + void set_name(Name const& n) + { + name=n; + } + + void set_age(Age const& a) + { + age=a; + } + + Name const& get_name()const + { + return name; + } + + Age const& get_age()const + { + return age; + } + }; + } + + namespace keys + { + struct name; + struct age; + } + + BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( + (Name)(Age), + (demo::employee) (Name)(Age), + (Name const&, Name const&, obj.get_name(), obj.set_name(val), keys::name) + (Age const&, Age const&, obj.get_age(), obj.set_age(val), keys::age)) + + demo::employee<std::string, int> e; + at_key<keys::name>(e)="Edward Norton"; + at_key<keys::age>(e)=41; + //Prints 'Edward Norton is 41 years old' + std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; + +[heading See also] + +__adt_attribute_proxy__ + +[endsect] + +[section:define_struct BOOST_FUSION_DEFINE_STRUCT] + +BOOST_FUSION_DEFINE_STRUCT is a macro that can be used to generate all the +necessary boilerplate to define and adapt an arbitrary struct as a model of +__random_access_sequence__. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_STRUCT( + (namespace0)(namespace1)..., + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[variablelist Notation + [[`str`] [An instance of `struct_name`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +The above macro generates the necessary code that defines and adapts `struct_name` +as a model of __random_access_sequence__. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `struct_name`. It yields to a fully qualified name for `struct_name` of +`namespace0::namespace1::... struct_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the struct is placed in the global namespace. +The sequence of `(member_typeN, member_nameN)` +pairs declares the type and names of each of the struct members that are +part of the sequence. + +The macro should be used at global scope. +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`struct_name()`] [Creates an instance of `struct_name` with default constructed elements.]] + [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] + [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] + [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] +] + +[heading Header] + + #include <boost/fusion/adapted/struct/define_struct.hpp> + #include <boost/fusion/include/define_struct.hpp> + +[heading Example] + + // demo::employee is a Fusion sequence + BOOST_FUSION_DEFINE_STRUCT( + (demo), employee, + (std::string, name) + (int, age)) + +[endsect] + +[section:define_tpl_struct BOOST_FUSION_DEFINE_TPL_STRUCT] + +[heading Description] + +BOOST_FUSION_DEFINE_TPL_STRUCT is a macro that can be used to generate all the +necessary boilerplate to define and adapt an arbitrary template struct as a +model of __random_access_sequence__. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_TPL_STRUCT( + (template_param0)(template_param1)..., + (namespace0)(namespace1)..., + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[variablelist Notation + [[`Str`] [An instantiated `struct_name`]] + [[`str`] [An instance of `Str`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +The above macro generates the necessary code that defines and adapts `struct_name` +as a model of __random_access_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `struct_name`. It yields to a fully qualified name for `struct_name` of +`namespace0::namespace1::... struct_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the struct is placed in the global namespace. +The sequence of `(member_typeN, member_nameN)` +pairs declares the type and names of each of the struct members that are +part of the sequence. + +The macro should be used at global scope. +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`Str()`] [Creates an instance of `Str` with default constructed elements.]] + [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] + [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] + [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] +] + +[heading Header] + + #include <boost/fusion/adapted/struct/define_struct.hpp> + #include <boost/fusion/include/define_struct.hpp> + +[heading Example] + + // Any instantiated demo::employee is a Fusion sequence + BOOST_FUSION_DEFINE_TPL_STRUCT( + (Name)(Age), (demo), employee, + (Name, name) + (Age, age)) + +[endsect] + +[section:define_struct_inline BOOST_FUSION_DEFINE_STRUCT_INLINE] + +[heading Description] + +BOOST_FUSION_DEFINE_STRUCT_INLINE is a macro that can be used to generate all +the necessary boilerplate to define and adapt an arbitrary struct as a model of +__random_access_sequence__. Unlike BOOST_FUSION_DEFINE_STRUCT, it can be used +at class or namespace scope. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_STRUCT_INLINE( + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Expression Semantics] + +The semantics of BOOST_FUSION_DEFINE_STRUCT_INLINE are identical to those of +BOOST_FUSION_DEFINE_STRUCT, with two differences: + +# BOOST_FUSION_DEFINE_STRUCT_INLINE can be used at class or namespace scope, and + thus does not take a namespace list parameter. +# The structure generated by BOOST_FUSION_DEFINE_STRUCT_INLINE has a base class, + and is thus not POD in C++03. + +[heading Header] + + #include <boost/fusion/adapted/struct/define_struct_inline.hpp> + #include <boost/fusion/include/define_struct_inline.hpp> + +[heading Example] + + // enclosing::employee is a Fusion sequence + class enclosing + { + BOOST_FUSION_DEFINE_STRUCT_INLINE( + employee, + (std::string, name) + (int, age)) + }; + + +[endsect] + +[section:define_tpl_struct_inline BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE] + +[heading Description] + +BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE is a macro that can be used to generate +all the necessary boilerplate to define and adapt an arbitrary template struct +as a model of __random_access_sequence__. Unlike BOOST_FUSION_DEFINE_TPL_STRUCT, +it can be used at class or namespace scope. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( + (template_param0)(template_param1)..., + struct_name, + (member_type0, member_name0) + (member_type1, member_name1) + ... + ) + +[heading Expression Semantics] + +The semantics of BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE are identical to those of +BOOST_FUSION_DEFINE_TPL_STRUCT, with two differences: + +# BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE can be used at class or namespace scope, + and thus does not take a namespace list parameter. +# The structure generated by BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE has a base + class, and is thus not POD in C++03. + +[heading Header] + + #include <boost/fusion/adapted/struct/define_struct_inline.hpp> + #include <boost/fusion/include/define_struct_inline.hpp> + +[heading Example] + + // Any instantiated enclosing::employee is a Fusion sequence + class enclosing + { + BOOST_FUSION_DEFINE_TPL_STRUCT( + (Name)(Age), employee, + (Name, name) + (Age, age)) + }; + +[endsect] + +[section:define_assoc_struct BOOST_FUSION_DEFINE_ASSOC_STRUCT] + +[heading Description] + +BOOST_FUSION_DEFINE_ASSOC_STRUCT is a macro that can be used to generate all the +necessary boilerplate to define and adapt an arbitrary struct as a model of +__random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_ASSOC_STRUCT( + (namespace0)(namespace1)..., + struct_name, + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + +[variablelist Notation + [[`str`] [An instance of `struct_name`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +The above macro generates the necessary code that defines and adapts `struct_name` +as a model of __random_access_sequence__ and __associative_sequence__. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `struct_name`. It yields to a fully qualified name for `struct_name` of +`namespace0::namespace1::... struct_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the struct is placed in the global namespace. +The sequence of `(member_typeN, member_nameN, key_typeN)` +triples declares the type, name and key type of each of the struct members +that are part of the sequence. + +The macro should be used at global scope. +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`struct_name()`] [Creates an instance of `struct_name` with default constructed elements.]] + [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] + [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] + [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] +] + +[heading Header] + + #include <boost/fusion/adapted/struct/define_assoc_struct.hpp> + #include <boost/fusion/include/define_assoc_struct.hpp> + +[heading Example] + + namespace keys + { + struct name; + struct age; + } + + // demo::employee is a Fusion sequence + BOOST_FUSION_DEFINE_ASSOC_STRUCT( + (demo), employee, + (std::string, name, keys::name) + (int, age, keys::age)) + +[endsect] + +[section:define_assoc_tpl_struct BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT] + +[heading Description] + +BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT is a macro that can be used to generate all +the necessary boilerplate to define and adapt an arbitrary template struct as a +model of __random_access_sequence__ and __associative_sequence__. + +[heading Synopsis] + + BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( + (template_param0)(template_param1)..., + (namespace0)(namespace1)..., + struct_name, + (member_type0, member_name0, key_type0) + (member_type1, member_name1, key_type1) + ... + ) + +[variablelist Notation + [[`Str`] [An instantiated `struct_name`]] + [[`str`] [An instance of `Str`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +The above macro generates the necessary code that defines and adapts +`struct_name` as a model of __random_access_sequence__ and +__associative_sequence__. +The sequence `(template_param0)(template_param1)...` declares the names of +the template type parameters used. +The sequence `(namespace0)(namespace1)...` declares the namespace +for `struct_name`. It yields to a fully qualified name for `struct_name` of +`namespace0::namespace1::... struct_name`. +If an empty namespace sequence is given (that is a macro that expands to +nothing), the struct is placed in the global namespace. +The sequence of `(member_typeN, member_nameN, key_typeN)` +triples declares the type, name and key type of each of the struct members +that are part of the sequence. + +The macro should be used at global scope. +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`Str()`] [Creates an instance of `Str` with default constructed elements.]] + [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] + [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] + [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] + [[`str.member_nameN`] [Access of struct member `member_nameN`]] +] + +[heading Header] + + #include <boost/fusion/adapted/struct/define_assoc_struct.hpp> + #include <boost/fusion/include/define_assoc_struct.hpp> + +[heading Example] + + namespace keys + { + struct name; + struct age; + } + + // Any instantiated demo::employee is a Fusion sequence + BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( + (Name)(Age), (demo), employee, + (Name, name, keys::name) + (Age, age, keys::age)) + +[endsect] + +[endsect] diff --git a/libs/fusion/doc/algorithm.qbk b/libs/fusion/doc/algorithm.qbk new file mode 100644 index 000000000..7402ba330 --- /dev/null +++ b/libs/fusion/doc/algorithm.qbk @@ -0,0 +1,2640 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2010 Christopher Schmidt + + Use, modification and distribution is 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) +===============================================================================/] +[section Algorithm] + +[heading Lazy Evaluation] + +Unlike __mpl__, Fusion algorithms are lazy[footnote Except for some +special cases such as __for_each__ and __copy__ which are inherently +imperative algorithms.] and non sequence-type preserving [footnote What +does that mean? It means that when you operate on a sequence through a +Fusion algorithm that returns a sequence, the sequence returned may not +be of the same class as the original]. This is by design. Runtime +efficiency is given a high priority. Like __mpl__, and unlike __stl__, +fusion algorithms are mostly functional in nature such that algorithms +are non mutating (no side effects). However, due to the high cost of +returning full sequences such as vectors and lists, /Views/ are returned +from Fusion algorithms instead. For example, the __transform__ algorithm +does not actually return a transformed version of the original sequence. +__transform__ returns a __transform_view__. This view holds a reference +to the original sequence plus the transform function. Iteration over the +__transform_view__ will apply the transform function over the sequence +elements on demand. This /lazy/ evaluation scheme allows us to chain as +many algorithms as we want without incurring a high runtime penalty. + +[heading Sequence Extension] + +The /lazy/ evaluation scheme where __algorithms__ return __views__ also +allows operations such as __push_back__ to be totally generic. In Fusion, +__push_back__ is actually a generic algorithm that works on all sequences. +Given an input sequence `s` and a value `x`, Fusion's __push_back__ +algorithm simply returns a __joint_view__: a view that holds a reference to +the original sequence `s` and the value `x`. Functions that were once +sequence specific and need to be implemented N times over N different +sequences are now implemented only once. That is to say that Fusion +sequences are cheaply extensible. + +To regain the original sequence, __conversion__ functions are provided. You +may use one of the __conversion__ functions to convert back to the original +sequence type. + +[heading Header] + + #include <boost/fusion/algorithm.hpp> + #include <boost/fusion/include/algorithm.hpp> + +[section Auxiliary] + +The auxiliary algorithms provide the utility algorithms for sequences. + +[heading Header] + + #include <boost/fusion/algorithm/auxiliary.hpp> + #include <boost/fusion/include/auxiliary.hpp> + +[section Functions] + +[section copy] + +[heading Description] +Copy a sequence `src` to a sequence `dest`. +It is also used to convert sequence into other. + +[heading Synopsis] + template <typename Seq1, typename Seq2> + void copy(Seq1 const& src, Seq2& dest); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`src`][A model of __forward_sequence__, all elements contained in the `src` sequence should be convertible into the element contained in the `dest` sequence.][Operation's argument]] + [[`dest`][A model of __forward_sequence__, `e2 = e1` is valid expression for each pair of elements `e1` of `src` and `e2` of `dest`.][Operation's argument]] +] + +[heading Expression Semantics] + __copy__(src, dest); + +[*Return type]: `void` + +[*Semantics]: `e2 = e1` for each element `e1` in `src` and `e2` in `dest`. + +[heading Complexity] +Linear, exactly `__result_of_size__<Sequence>::value`. + +[heading Header] + + #include <boost/fusion/algorithm/auxiliary/copy.hpp> + #include <boost/fusion/include/copy.hpp> + +[heading Example] + __vector__<int,int> vec(1,2); + __list__<int,int> ls; + __copy__(vec, ls); + assert(ls == __make_list__(1,2)); + +[endsect] + +[endsect] + +[endsect] + + +[section Iteration] + +The iteration algorithms provide the fundamental algorithms for traversing +a sequence repeatedly applying an operation to its elements. + +[heading Header] + + #include <boost/fusion/algorithm/iteration.hpp> + #include <boost/fusion/include/iteration.hpp> + +[section Functions] + +[template fold_desc[name result_of_name arg_desc seq_concept arg_id arg_type_id invoke_desc semantics_elements_desc example_arg_transform example_result I0 I1 IN] +[heading Description] +For a sequence `seq`, initial state `initial_state`, and binary function object +or function pointer `f`, [^[name]] returns the result of the repeated application of +binary `f` to the result of the previous `f` invocation (`inital_state` if it is +the first call) and [arg_desc] of `seq`. + +[def name_macro [name]] +[def result_of_name_macro [result_of_name]] +[heading Synopsis] + template< + typename Sequence, + typename State, + typename F + > + typename result_of_name_macro<Sequence, State const, F>::type name_macro( + Sequence& seq, State const& initial_state, F f); + + template< + typename Sequence, + typename State, + typename F + > + typename result_of_name_macro<Sequence const, State const, F>::type name_macro( + Sequence const& seq, State const& initial_state, F f); + +[def seq_concept_macro [seq_concept]] +[def arg_type_id_macro [arg_type_id]] +[def arg_id_macro [arg_id]] +[def invoke_desc_macro [invoke_desc]] +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of seq_concept_macro][Operation's argument]] + [[`initial_state`][Any type][Initial state]] + [[`f`][`f(s,arg_id_macro)` with return type `__boost_result_of_call__<F(S,arg_type_id_macro)>::type` for current state `s` of type `S`, and for each invoke_desc_macro][Operation's argument]] +] + +[heading Expression Semantics] + name_macro(seq, initial_state, f); + +[*Return type]: Any type + +[*Semantics]: Equivalent to [^f(... f(f(initial_state,[arg_id][I0]),[arg_id][I1]) ...[arg_id][IN])] where [^[arg_id]1 ...[arg_id]N] are [semantics_elements_desc]. + +[heading Complexity] +Linear, exactly `__result_of_size__<Sequence>::value` applications of `f`. + +[heading Header] + + #include <boost/fusion/algorithm/iteration/name_macro.hpp> + #include <boost/fusion/include/name_macro.hpp> + +[def example_result_macro [example_result]] +[def example_arg_transform_macro [example_arg_transform]] +[heading Example] + struct make_string + { + typedef std::string result_type; + + template<typename T> + std::string operator()(const std::string& str, const T& t) const + { + return str + boost::lexical_cast<std::string>(example_arg_transform_macro); + } + }; + ... + const __vector__<int,int> vec(1,2); + assert(name_macro(vec,std::string(""), make_string()) == example_result_macro); +] + +[section fold] +[fold_desc fold..__result_of_fold__..each element..__forward_sequence__..e..E..element `e` of type `E` in `seq`..the consecutive elements of `seq`..t.."12"..1..2..N] +[endsect] + +[section reverse_fold] +[fold_desc reverse_fold..__result_of_reverse_fold__..each element..__bidirectional_sequence__..e..E..element `e` of type `E` in `seq`..the consecutive elements of `seq`..t.."21"..N..N-1..1] +[endsect] + +[section iter_fold] +[fold_desc iter_fold..__result_of_iter_fold__..iterators on each element..__forward_sequence__..it..It..iterator `it` of type `It` on an element of `seq`..consecutive iterators on the elements of `seq`..__deref__(t).."12"..1..2..N] +[endsect] + +[section reverse_iter_fold] +[fold_desc reverse_iter_fold..__result_of_reverse_iter_fold__..iterators on each element..__bidirectional_sequence__..it..It..iterator `it` of type `It` on an element of `seq`..consecutive iterators on the elements of `seq`..__deref__(t).."21"..N..N-1..1] +[endsect] + +[section accumulate] +[fold_desc accumulate..__result_of_accumulate__..each element..__forward_sequence__..e..E..element `e` of type `E` in `seq`..the consecutive elements of `seq`..t.."12"..1..2..N] +[endsect] + +[section for_each] + +[heading Description] +Applies a unary function object to each element of a sequence. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_for_each__<Sequence, F>::type for_each( + Sequence& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `f(e)` must be a valid expression for each element `e` in `seq`][Operation's argument]] + [[`f`][A unary __reg_callable_obj__][Operation's argument]] +] + +[heading Expression Semantics] + __for_each__(seq, f); + +[*Return type]: `void` + +[*Semantics]: Calls `f(e)` for each element `e` in `seq`. + +[heading Complexity] +Linear, exactly `__result_of_size__<Sequence>::value` applications of `f`. + +[heading Header] + + #include <boost/fusion/algorithm/iteration/for_each.hpp> + #include <boost/fusion/include/for_each.hpp> + +[heading Example] + struct increment + { + template<typename T> + void operator()(T& t) const + { + ++t; + } + }; + ... + __vector__<int,int> vec(1,2); + __for_each__(vec, increment()); + assert(vec == __make_vector__(2,3)); + +[endsect] + +[endsect] + +[section Metafunctions] + +[template meta_fold_desc[name name_func seq_concept arg_id arg_type_id invoke_meta_desc] +[heading Description] +Returns the result type of [name_func]. + +[def name_macro [name]] +[heading Synopsis] + template< + typename Sequence, + typename State, + typename F> + struct name_macro + { + typedef __unspecified__ type; + }; + +[def seq_concept_macro [seq_concept]] +[def arg_type_id_macro [arg_type_id]] +[def arg_id_macro [arg_id]] +[def invoke_meta_desc_macro [invoke_meta_desc]] +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of seq_concept_macro] [The sequence to iterate]] + [[`State`] [Any type] [The initial state for the first application of `F`]] + [[`F`] [`__boost_result_of_call__<F(S,arg_type_id_macro)>::type` is the return type of `f(s,arg_id_macro)` with current state `s` of type `S`, and an invoke_meta_desc_macro][The operation to be applied on traversal]] +] + +[heading Expression Semantics] + name_macro<Sequence, State, F>::type + +[*Return type]: Any type + +[*Semantics]: Returns the result of applying [name_func] to a sequence of type +`Sequence`, with an initial state of type `State` and binary function object or +function pointer of type `F`. + +[heading Complexity] +Linear, exactly `__result_of_size__<Sequence>::value` applications of `F`. + +[heading Header] + + #include <boost/fusion/algorithm/iteration/name_macro.hpp> + #include <boost/fusion/include/name_macro.hpp> +] + +[section fold] +[meta_fold_desc fold..__fold__..__forward_sequence__..e..E..element `e` of type `E` in `seq`] +[endsect] + +[section reverse_fold] +[meta_fold_desc reverse_fold..__reverse_fold__..__bidirectional_sequence__..e..E..element `e` of type `E` in `seq`] +[endsect] + +[section iter_fold] +[meta_fold_desc iter_fold..__iter_fold__..__forward_sequence__..it..It..iterator `it` of type `It` on an element of `seq`] +[endsect] + +[section reverse_iter_fold] +[meta_fold_desc reverse_iter_fold..__reverse_iter_fold__..__bidirectional_sequence__..it..It..iterator `it` of type `It` on an element of `seq`] +[endsect] + +[section accumulate] +[meta_fold_desc accumulate..__accumulate__..__forward_sequence__..e..E..element `e` of type `E` in `seq`] +[endsect] + +[section for_each] +A metafunction returning the result type of applying __for_each__ to a sequence. The +return type of __for_each__ is always `void`. + +[heading Description] + +[heading Synopsis] + template< + typename Sequence, + typename F + > + struct for_each + { + typedef void type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`F`] [Any type] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_for_each__<Sequence, F>::type + +[*Return type]: `void`. + +[*Semantics]: Returns the return type of __for_each__ for a sequence of type `Sequence` and a unary function object `F`. +The return type is always `void`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/iteration/for_each.hpp> + #include <boost/fusion/include/for_each.hpp> + +[endsect] + +[endsect] + +[endsect] + +[section Query] +The query algorithms provide support for searching and analyzing sequences. + +[heading Header] + + #include <boost/fusion/algorithm/query.hpp> + #include <boost/fusion/include/query.hpp> + +[section Functions] + +[section any] + +[heading Description] +For a sequence `seq` and unary function object `f`, `any` returns true if `f` returns true for at least one element of `seq`. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_any__<Sequence,F>::type any( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `f(e)` must be a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]] + [[`f`][A unary function object][The search predicate]] +] + +[heading Expression semantics] + __any__(seq, f); + +[*Return type]: `bool` + +[*Semantics]: Returns true if and only if `f(e)` evaluates to `true` for some element `e` in `seq`. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/any.hpp> + #include <boost/fusion/include/any.hpp> + +[heading Example] + struct odd + { + template<typename T> + bool operator()(T t) const + { + return t % 2; + } + }; + ... + assert(__any__(__make_vector__(1,2), odd())); + assert(!__any__(__make_vector__(2,4), odd())); + +[endsect] + +[section all] + +[heading Description] +For a sequence `seq` and unary function object `f`, `all` returns true if `f` returns true for every element of `seq`. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_all__<Sequence,F>::type all( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for every element `e` in `seq`][The sequence to search]] + [[`f`][A unary function object][The search predicate]] +] + +[heading Expression Semantics] + __all__(seq, f); + +[*Return type]: `bool` + +[*Semantics]: Returns true if and only if `f(e)` evaluates to `true` for every element `e` in `seq`. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/all.hpp> + #include <boost/fusion/include/all.hpp> + +[heading Example] + struct odd + { + template<typename T> + bool operator()(T t) const + { + return t % 2; + } + }; + ... + assert(__all__(__make_vector__(1,3), odd())); + assert(!__all__(__make_vector__(1,2), odd())); + +[endsect] + +[section none] + +[heading Description] +For a sequence `seq` and unary function object `f`, `none` returns true if `f` returns false for every element of `seq`. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_none__<Sequence,F>::type none( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for every element `e` in `seq`][The sequence to search]] + [[`f`][A unary function object][The search predicate]] +] + +[heading Expression Semantics] + __none__(seq, f); + +[*Return type]: `bool` + +[*Semantics]: Returns true if and only if `f(e)` evaluates to `false` for every element `e` in `seq`. Result equivalent to `!any(seq, f)`. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/none.hpp> + #include <boost/fusion/include/none.hpp> + +[heading Example] + struct odd + { + template<typename T> + bool operator()(T t) const + { + return t % 2; + } + }; + ... + assert(__none__(__make_vector__(2,4), odd())); + assert(!__none__(__make_vector__(1,2), odd())); + +[endsect] + +[section find] + +[heading Description] +Finds the first element of a given type within a sequence. + +[heading Synopsis] + template< + typename T, + typename Sequence + > + __unspecified__ find(Sequence const& seq); + + template< + typename T, + typename Sequence + > + __unspecified__ find(Sequence& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][The sequence to search]] + [[`T`][Any type][The type to search for]] +] + +[heading Expression Semantics] + __find__<T>(seq) + +[*Return type]: A model of the same iterator category as the iterators of `seq`. + +[*Semantics]: Returns an iterator to the first element of `seq` of type `T`, or `__end__(seq)` if there is no such element. +Equivalent to `__find_if__<boost::is_same<_, T> >(seq)` + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/find.hpp> + #include <boost/fusion/include/find.hpp> + +[heading Example] + const __vector__<char,int> vec('a','0'); + assert(*__find__<int>(vec) == '0'); + assert(__find__<double>(vec) == __end__(vec)); + +[endsect] + +[section find_if] +Finds the first element within a sequence with a type for which a given __mpl_lambda_expression__ evaluates to +`boost::mpl::true_`. + +[heading Description] + +[heading Synopsis] + template< + typename F, + typename Sequence + > + __unspecified__ find_if(Sequence const& seq); + + template< + typename F, + typename Sequence + > + __unspecified__ find_if(Sequence& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][The sequence to search]] + [[`F`][A unary __mpl_lambda_expression__][The search predicate]] +] + +[heading Expression Semantics] + __find_if__<F>(seq) + +[*Return type]: An iterator of the same iterator category as the iterators of `seq`. + +[*Semantics]: Returns the first element of `seq` for which __mpl_lambda_expression__ `F` evaluates to `boost::mpl::true_`, +or `__end__(seq)` if there is no such element. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +#include <boost/fusion/algorithm/query/find_if.hpp> +#include <boost/fusion/include/find_if.hpp> + +[heading Example] + const __vector__<double,int> vec(1.0,2); + assert(*__find_if__<is_integral<mpl::_> >(vec) == 2); + assert(__find_if__<is_class<mpl::_> >(vec) == __end__(vec)); + +[endsect] + +[section count] + +[heading Description] +Returns the number of elements of a given type within a sequence. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + typename __result_of_count__<Sequence, T>::type count( + Sequence const& seq, T const& t); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `e == t` must be a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]] + [[`T`][Any type][The type to count]] +] + +[heading Expression Semantics] + __count__(seq, t); + +[*Return type]: `int` + +[*Semantics]: Returns the number of elements of type `T` and equal to `t` in `seq`. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/count.hpp> + #include <boost/fusion/include/count.hpp> + +[heading Example] + const __vector__<double,int,int> vec(1.0,2,3); + assert(__count__(vec,2) == 1); + +[endsect] + +[section count_if] + +[heading Description] +Returns the number of elements within a sequence with a type for which a given unary function object evaluates to +`true`. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_count_if__<Sequence, F>::type count_if( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]] + [[`f`][A unary function object][The search predicate]] +] + +[heading Expression Semantics] + __count_if__(seq, f) + +[*Return type]: `int` + +[*Semantics]: Returns the number of elements in `seq` where `f` evaluates to `true`. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/count_if.hpp> + #include <boost/fusion/include/count_if.hpp> + +[heading Example] + const __vector__<int,int,int> vec(1,2,3); + assert(__count_if__(vec,odd()) == 2); + +[endsect] + +[endsect] + +[section Metafunctions] + +[section any] + +[heading Description] +A metafunction returning the result type of __any__. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + struct any + { + typedef bool type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_any__<Sequence, F>::type + +[*Return type]: `bool`. + +[*Semantics]: Returns the return type of __any__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/query/any.hpp> + #include <boost/fusion/include/any.hpp> + +[endsect] + +[section all] + +[heading Description] +A metafunction returning the result type of __all__. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + struct all + { + typedef bool type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_all__<Sequence, F>::type + +[*Return type]: `bool`. + +[*Semantics]: Returns the return type of __all__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/query/all.hpp> + #include <boost/fusion/include/all.hpp> + +[endsect] + +[section none] + +[heading Description] +A metafunction returning the result type of __none__. + +[heading Synopsis] + template< + typename Sequence, + typename F + > + struct none + { + typedef bool type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_none__<Sequence, F>::type + +[*Return type]: `bool`. + +[*Semantics]: Returns the return type of __none__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/query/none.hpp> + #include <boost/fusion/include/none.hpp> + +[endsect] + +[section find] + +[heading Description] +Returns the result type of __find__, given the sequence and search types. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct find + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [Model of __forward_sequence__] [Operation's argument]] + [[`T`] [Any type] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_find__<Sequence, T>::type + +[*Return type]: A model of the same iterator category as the iterators of `Sequence`. + +[*Semantics]: Returns an iterator to the first element of type `T` in `Sequence`, or `__result_of_end__<Sequence>::type` if there is no such element. + +[heading Complexity] +Linear, at most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/find.hpp> + #include <boost/fusion/include/find.hpp> + +[endsect] + +[section find_if] + +[heading Description] +Returns the result type of __find_if__ given the sequence and predicate types. + +[heading Synopsis] + template< + typename Sequence, + typename Pred + > + struct find_if + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`Pred`] [A model of __mpl_lambda_expression__] [Operation's arguments]] +] + +[heading Expression Semantics] + __result_of_find_if__<Sequence, Pred>::type + +[*Return type]: A model of the same iterator category as the iterators of `Sequence`. + +[*Semantics]: Returns an iterator to the first element in `Sequence` for which `Pred` evaluates to true. Returns `__result_of_end__<Sequence>::type` if there is no such element. + +[heading Complexity] +Linear. At most `__result_of_size__<Sequence>::value` comparisons. + +[heading Header] + + #include <boost/fusion/algorithm/query/find_if.hpp> + #include <boost/fusion/include/find_if.hpp> + +[endsect] + +[section count] + +[heading Description] +A metafunction that returns the result type of `count` given the sequence and search types. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct count + { + typedef int type; + }; + +[table Parameters + [[Parameter] [Requirement] [heading Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`T`] [Any type] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_count__<T>::type + +[*Return type]: `int`. + +[*Semantics]: Returns the return type of __count__. The return type is always `int`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/query/count.hpp> + #include <boost/fusion/include/count.hpp> + +[endsect] + +[section count_if] + +[heading Description] +A metafunction that returns the result type of `count_if` given the sequence and predicate types. + +[heading Synopsis] + template< + typename Sequence, + typename Pred + > + struct count_if + { + typedef int type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]] + [[`Pred`] [A unary function object] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_count_if__<Sequence, Pred>::type + +[*Return type]: `int`. + +[*Semantics]: Returns the return type of __count_if__. The return type is always `int`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/query/count_if.hpp> + #include <boost/fusion/include/count_if.hpp> + +[endsect] + +[endsect] + +[endsect] + +[section Transformation] +The transformation algorithms create new sequences out of existing sequences by performing some sort of transformation. In reality the new sequences are views onto the data in the original sequences. + +[note As the transformation algorithms return views onto their input arguments, +it is important that the lifetime of the input arguments is greater than the +period during which you wish to use the results.] + +[heading Header] + + #include <boost/fusion/algorithm/transformation.hpp> + #include <boost/fusion/include/transformation.hpp> + +[section Functions] + +[section filter] + +[heading Description] +For a given sequence, filter returns a new sequences containing only the elements of a specified type. + +[heading Synopsis] + template< + typename T, + typename Sequence + > + typename __result_of_filter__<Sequence const, T>::type filter(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][The type to retain]] +] + +[heading Expression Semantics] + __filter__<T>(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing all the elements of `seq` of type `T`. +Equivalent to `__filter_if__<boost::same_type<_, T> >(seq)`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/filter.hpp> + #include <boost/fusion/include/filter.hpp> + +[heading Example] + const __vector__<int,int,long,long> vec(1,2,3,4); + assert(__filter__<int>(vec) == __make_vector__(1,2)); + +[endsect] + +[section filter_if] + +[heading Description] +For a given sequence, __filter_if__ returns a new sequences containing +only the elements with types for which a given __mpl_lambda_expression__ evaluates to `boost::mpl::true_`. + +[heading Synopsis] + template< + typename Pred, + typename Sequence + > + typename __result_of_filter_if__<Sequence const, Pred>::type filter_if(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`Pred`][A unary __mpl_lambda_expression__][The predicate to filter by]] +] + +[heading Expression Semantics] + __filter_if__<Pred>(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing all the elements of `seq` with types for which `Pred` evaluates +to `boost::mpl::true_`. The order of the retained elements is the same as in the original sequence. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/filter_if.hpp> + #include <boost/fusion/include/filter_if.hpp> + +[heading Example] + const __vector__<int,int,double,double> vec(1,2,3.0,4.0); + assert(__filter_if__<is_integral<mpl::_> >(vec) == __make_vector__(1,2)); + +[endsect] + +[section transform] + +[heading Description] +For a sequence `seq` and function object or function pointer `f`, `transform` returns a new sequence +with elements created by applying `f(e)` to each element of `e` of `seq`. + +[heading Unary version synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_transform__<Sequence const, F>::type transform( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`f`][`f(e)` is a valid expression for each element `e` of `seq`. `__boost_result_of_call__<F(E)>::type` is the return type of `f` when called with a value of each element type `E`.][Transformation function]] +] + +[heading Expression Semantics] + __transform__(seq, f); + +[*Return type]: A model of __forward_sequence__ + +[*Semantics]: Returns a new sequence, containing the return values of `f(e)` for each element `e` within `seq`. + +[heading Binary version synopsis] + template< + typename Sequence1, + typename Sequence2, + typename F + > + typename __result_of_transform__<Sequence1 const, Sequence2 const, F>::type transform( + Sequence1 const& seq1, Sequence2 const& seq2, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq1`][A model of __forward_sequence__][Operation's argument]] + [[`seq2`][A model of __forward_sequence__][Operation's argument]] + [[`f`][`f(e1,e2)` is a valid expression for each pair of elements `e1` of `seq1` and `e2` of `seq2`. `__boost_result_of_call__<F(E1,E2)>::type` is the return type of `f` when called with elements of type `E1` and `E2`][Transformation function]] +] + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence, containing the return values of `f(e1, e2)` for each pair of elements `e1` and `e2` within `seq1` and `seq2` respectively. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/transform.hpp> + #include <boost/fusion/include/transform.hpp> + +[heading Example] + struct triple + { + typedef int result_type; + + int operator()(int t) const + { + return t * 3; + }; + }; + ... + assert(__transform__(__make_vector__(1,2,3), triple()) == __make_vector__(3,6,9)); + +[endsect] + +[section replace] + +[heading Description] +Replaces each value within a sequence of a given type and value with a new value. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + typename __result_of_replace__<Sequence const, T>::type replace( + Sequence const& seq, T const& old_value, T const& new_value); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__, `e == old_value` is a valid expression, convertible to `bool`, for each element `e` in `seq` with type convertible to `T`][Operation's argument]] + [[`old_value`][Any type][Value to replace]] + [[`new_value`][Any type][Replacement value]] +] + +[heading Expression Semantics] + __replace__(seq, old_value, new_value); + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence with all the values of `seq` with `new_value` assigned to elements with the same type and equal to `old_value`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/replace.hpp> + #include <boost/fusion/include/replace.hpp> + +[heading Example] + assert(__replace__(__make_vector__(1,2), 2, 3) == __make_vector__(1,3)); + +[endsect] + +[section replace_if] + +[heading Description] +Replaces each element of a given sequence for which an unary function object evaluates to `true` replaced with +a new value. + +[heading Synopsis] + template< + typename Sequence, + typename F, + typename T> + typename __result_of_replace_if__<Sequence const, F, T>::type replace_if( + Sequence const& seq, F f, T const& new_value); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`f`][A function object for which `f(e)` is a valid expression, convertible to `bool`, for each element `e` in `seq`][Operation's argument]] + [[`new_value`][Any type][Replacement value]] +] + +[heading Expression Semantics] + __replace_if__(seq, f, new_value); + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence with all the elements of `seq`, +with `new_value` assigned to each element for which `f` evaluates to `true`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/replace_if.hpp> + #include <boost/fusion/include/replace_if.hpp> + +[heading Example] + struct odd + { + template<typename T> + bool operator()(T t) const + { + return t % 2; + } + }; + ... + assert(__replace_if__(__make_vector__(1,2), odd(), 3) == __make_vector__(3,2)); + +[endsect] + +[section remove] + +[heading Description] +Returns a new sequence, with all the elements of the original sequence, except those of a given type. + +[heading Synopsis] + template< + typename T, + typename Sequence + > + typename __result_of_remove__<Sequence const, T>::type replace(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][Type to remove]] +] + +[heading Expression Semantics] + __remove__<T>(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, except +those of type `T`. Equivalent to `__remove_if__<boost::is_same<_,T> >(seq)`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/remove.hpp> + #include <boost/fusion/include/remove.hpp> + +[heading Example] + const __vector__<int,double> vec(1,2.0); + assert(__remove__<double>(vec) == __make_vector__(1)); + +[endsect] + +[section remove_if] + +[heading Description] +Returns a new sequence, containing all the elements of the original except those where a given unary +function object evaluates to `true`. + +[heading Synopsis] + template< + typename Pred, + typename Sequence + > + typename __result_of_remove_if__<Sequence const, Pred>::type remove_if(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`Pred`][A model of unary __mpl_lambda_expression__][Removal predicate]] +] + +[heading Expression Semantics] + __remove_if__<Pred>(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, except +those elements with types for which `Pred` evaluates to `boost::mpl::true_`. +Equivalent to `__filter__<boost::mpl::not_<Pred> >(seq)`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/remove_if.hpp> + #include <boost/fusion/include/remove_if.hpp> + +[heading Example] + const __vector__<int,double> vec(1,2.0); + assert(__remove_if__<is_floating_point<mpl::_> >(vec) == __make_vector__(1)); + +[endsect] + +[section reverse] + +[heading Description] +Returns a new sequence with the elements of the original in reverse order. + +[heading Synposis] + template< + typename Sequence + > + typename __result_of_reverse__<Sequence const>::type reverse(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __bidirectional_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __reverse__(seq); + +[*Return type]: + +* A model of __bidirectional_sequence__ if `seq` is a __bidirectional_sequence__ +else, __random_access_sequence__ if `seq` is a __random_access_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence containing all the elements of `seq` in reverse order. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/reverse.hpp> + #include <boost/fusion/include/reverse.hpp> + +[heading Example] + assert(__reverse__(__make_vector__(1,2,3)) == __make_vector__(3,2,1)); + +[endsect] + +[section clear] + +[heading Description] +__clear__ returns an empty sequence. + +[heading Synposis] + template< + typename Sequence + > + typename __result_of_clear__<Sequence const>::type clear(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __clear__(seq); + +[*Return type]: A model of __forward_sequence__. + +[*Expression Semantics]: Returns a sequence with no elements. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/clear.hpp> + #include <boost/fusion/include/clear.hpp> + +[heading Example] + assert(__clear__(__make_vector__(1,2,3)) == __make_vector__()); + +[endsect] + +[section erase] + +[heading Description] +Returns a new sequence, containing all the elements of the original except those at a specified iterator, or +between two iterators. + +[heading Synposis] + template< + typename Sequence, + typename First + > + typename __result_of_erase__<Sequence const, First>::type erase( + Sequence const& seq, First const& it1); + + template< + typename Sequence, + typename First, + typename Last + > + typename __result_of_erase__<Sequence const, First, Last>::type erase( + Sequence const& seq, First const& it1, Last const& it2); + +[table Parameters + [[Parameters][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`it1`][A model of __forward_iterator__][Iterator into `seq`]] + [[`it2`][A model of __forward_iterator__][Iterator into `seq` after `it1`]] +] + +[heading Expression Semantics] + __erase__(seq, pos); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq` except the element at `pos`. + + __erase__(seq, first, last); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, with all the elements of `seq`, in their original order, except those +in the range [`first`,`last`). + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/erase.hpp> + #include <boost/fusion/include/erase.hpp> + +[heading Example] + const __vector__<int, double, char> vec(1, 2.0, 'c'); + assert(__erase__(vec, __next__(__begin__(vec))) == __make_vector__(1, 'c')); + assert(__erase__(vec, __next__(__begin__(vec)), __end__(vec)) == __make_vector__(1)); + +[endsect] + +[section erase_key] + +[heading Description] +For an [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ `seq`, +returns a [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ containing +all the elements of the original except those with a given key. + +[heading Synposis] + template< + typename Key, + typename Sequence + > + typename __result_of_erase_key__<Sequence const, Key>::type erase_key(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__ and __associative_sequence__][Operation's argument]] + [[`Key`][Any type][Key to erase]] +] + +[heading Expression Semantics] + __erase_key__<Key>(seq); + +[*Return type]: A model of __forward_sequence__ and __associative_sequence__. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, except those with key `Key`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/erase_key.hpp> + #include <boost/fusion/include/erase_key.hpp> + +[heading Example] + assert(__erase_key__<int>(__make_map__<int, long>('a', 'b')) == __make_map__<long>('b')); + +[endsect] + +[section insert] + +[heading Description] +Returns a new sequence with all the elements of the original, an a new element inserted the +position described by a given iterator. + +[heading Synposis] + template< + typename Sequence, + typename Pos, + typename T + > + typename __result_of_insert__<Sequence const, Pos, T>::type insert( + Sequence const& seq, Pos const& pos, T const& t); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`pos`][A model of __forward_iterator__][The position to insert at]] + [[`t`][Any type][The value to insert]] +] + +[heading Expression Semantics] + __insert__(seq, p, t); + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, and a new element with the +type and value of `t` inserted at iterator `pos`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/insert.hpp> + #include <boost/fusion/include/insert.hpp> + +[heading Example] + const __vector__<int,int> vec(1,2); + assert(__insert__(vec, __next__(__begin__(vec)), 3) == __make_vector__(1,3,2)); + +[endsect] + +[section insert_range] + +[heading Description] +Returns a new sequence with another sequence inserted at a specified iterator. + +[heading Synposis] + template< + typename Sequence, + typename Pos, + typename Range + > + typename __result_of_insert_range__<Sequence const, Pos, Range>::type insert_range( + Sequence const& seq, Pos const& pos, Range const& range); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`pos`][A model of __forward_iterator__][The position to insert at]] + [[`range`][A model of __forward_sequence__][Range to insert]] +] + +[heading Expression Semantics] + __insert_range__(seq, pos, range); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and the elements of +`range` inserted at iterator `pos`. All elements retaining their ordering from the orignal sequences. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/insert_range.hpp> + #include <boost/fusion/include/insert_range.hpp> + +[heading Example] + const __vector__<int,int> vec(1,2); + assert(__insert_range__(vec, __next__(__begin__(vec)), __make_vector__(3,4)) == __make_vector__(1,3,4,2)); + +[endsect] + +[section join] + +[heading Description] +Takes 2 sequences and returns a sequence containing the elements of the first followed by the elements of the second. + +[heading Synopsis] + template< + typename LhSequence, + typename RhSequence> + typename __result_of_join__<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`lhs`][A model of __forward_sequence__][Operation's argument]] + [[`rhs`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __join__(lhs, rhs); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `lhs` and `rhs` implement the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing all the elements of `lhs` followed by all the elements of `rhs`. The order of the elements is preserved. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/join.hpp> + #include <boost/fusion/include/join.hpp> + +[heading Example] + __vector__<int,char> v1(1, 'a'); + __vector__<int,char> v2(2, 'b'); + assert(__join__(v1, v2) == __make_vector__(1,'a',2,'b')); + +[endsect] + +[section zip] + +[heading Description] +Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences. + +[heading Synopsis] + template< + typename Sequence1, + typename Sequence2, + ... + typename SequenceN + > + typename __result_of_zip__<Sequence1, Sequence2, ... SequenceN>::type + zip(Sequence1 const& seq1, Sequence2 const& seq2, ... SequenceN const& seqN); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq1` to `seqN`][Each sequence is a model of __forward_sequence__.][Operation's argument]] +] + +[heading Expression Semantics] + __zip__(seq1, seq2, ... seqN); + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a sequence containing tuples of elements from sequences `seq1` to `seqN`. For example, applying zip to tuples `(1, 2, 3)` and `('a', 'b', 'c')` would return `((1, 'a'),(2, 'b'),(3, 'c'))` + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/zip.hpp> + #include <boost/fusion/include/zip.hpp> + +[heading Example] + __vector__<int,char> v1(1, 'a'); + __vector__<int,char> v2(2, 'b'); + assert(__zip__(v1, v2) == __make_vector__(__make_vector__(1, 2),__make_vector__('a', 'b')); + +[endsect] + +[section pop_back] + +[heading Description] +Returns a new sequence, with the last element of the original removed. + +[heading Synopsis] + template< + typename Sequence + > + typename __result_of_pop_back__<Sequence const>::type pop_back(Sequence const& seq); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __pop_back__(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence containing all the elements of `seq`, except the last element. The elements in the new sequence are in the same order as they were in `seq`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/pop_back.hpp> + #include <boost/fusion/include/pop_back.hpp> + +[heading Example] + assert(___pop_back__(__make_vector__(1,2,3)) == __make_vector__(1,2)); + +[endsect] + +[section pop_front] + +[heading Description] +Returns a new sequence, with the first element of the original removed. + +[heading Synopsis] + template< + typename Sequence + > + typename __result_of_pop_front__<Sequence const>::type pop_front(Sequence const& seq); + + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __pop_front__(seq); + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence containing all the elements of `seq`, except the first element. The elements in the new sequence are in the same order as they were in `seq`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/pop_front.hpp> + #include <boost/fusion/include/pop_front.hpp> + +[heading Example] + assert(__pop_front__(__make_vector__(1,2,3)) == __make_vector__(2,3)); + +[endsect] + +[section push_back] + +[heading Description] +Returns a new sequence with an element added at the end. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + typename __result_of_push_back__<Sequence, T>::type push_back( + Sequence const& seq, T const& t); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`t`][Any type][The value to add to the end]] +] + +[heading Expression Semantics] + __push_back__(seq, t); + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and new element `t` appended to the end. The elements are in the same order as they were in `seq`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/push_back.hpp> + #include <boost/fusion/include/push_back.hpp> + +[heading Example] + assert(__push_back__(__make_vector__(1,2,3),4) == __make_vector__(1,2,3,4)); + +[endsect] + +[section push_front] + +[heading Description] +Returns a new sequence with an element added at the beginning. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + typename __result_of_push_front__<Sequence, T>::type push_front( + Sequence const& seq, T const& t); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`t`][Any type][The value to add to the beginning]] +] + +[heading Expression Semantics] + __push_back__(seq, t); + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and new element `t` appended to the beginning. The elements are in the same order as they were in `seq`. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/push_front.hpp> + #include <boost/fusion/include/push_front.hpp> + +[heading Example] + assert(__push_front__(__make_vector__(1,2,3),0) == __make_vector__(0,1,2,3)); + +[endsect] + +[endsect] + +[section Metafunctions] + +[section filter] + +[heading Description] +Returns the result type of __filter__ given the sequence type and type to retain. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct filter + { + typedef __unspecified__ type; + }; + +[table Parameter + [[Parameter] [Requirement] [Description]] + [[`Sequence`][A model of __forward_sequence__] [Operation's argument]] + [[`T`][Any type][Type to retain]] +] + +[heading Expression Semantics] + __result_of_filter__<Sequence, T>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing the elements of `Sequence` that are of type `T`. Equivalent to `__result_of_filter_if__<Sequence, boost::is_same<mpl::_, T> >::type`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/filter.hpp> + #include <boost/fusion/include/filter.hpp> + +[endsect] + +[section filter_if] + +[heading Description] +Returns the result type of __filter_if__ given the sequence and unary __mpl_lambda_expression__ predicate type. + +[heading Synopsis] + template< + typename Sequence, + typename Pred + > + struct filter_if + { + typedef __unspecified__ type; + }; + +[table Parameter + [[Parameter] [Requirement] [Description]] + [[`Sequence`][A model of __forward_sequence__] [Operation's argument]] + [[`Pred`][A unary __mpl_lambda_expression__][Type to retain]] +] + +[heading Expression Semantics] + __result_of_filter_if__<Sequence, Pred>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing the elements of `Sequence` for which `Pred` evaluates to `boost::mpl::true_`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/filter_if.hpp> + #include <boost/fusion/include/filter_if.hpp> + +[endsect] + +[section transform] + +[heading Description] +For a sequence `seq` and function object or function pointer `f`, `transform` returns a new sequence +with elements created by applying `f(e)` to each element of `e` of `seq`. + +[heading Unary version synopsis] + template< + typename Sequence, + typename F + > + typename __result_of_transform__<Sequence const, F>::type transform( + Sequence const& seq, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq`][A model of __forward_sequence__][Operation's argument]] + [[`f`][`f(e)` is a valid expression for each element `e` of `seq`. `__boost_result_of_call__<F(E)>::type` is the return type of `f` when called with a value of each element type `E`.][Transformation function]] +] + +[heading Expression Semantics] + __transform__(seq, f); + +[*Return type]: + +* A model of __forward_sequence__ +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence, containing the return values of `f(e)` for each element `e` within `seq`. + +[heading Binary version synopsis] + template< + typename Sequence1, + typename Sequence2, + typename F + > + typename __result_of_transform__<Sequence1 const, Sequence2 const, F>::type transform( + Sequence1 const& seq1, Sequence2 const& seq2, F f); + +[table Parameters + [[Parameter][Requirement][Description]] + [[`seq1`][A model of __forward_sequence__][Operation's argument]] + [[`seq2`][A model of __forward_sequence__][Operation's argument]] + [[`f`][`f(e1,e2)` is a valid expression for each pair of elements `e1` of `seq1` and `e2` of `seq2`. `__boost_result_of_call__<F(E1,E2)>::type` is the return type of `f` when called with elements of type `E1` and `E2`][Transformation function]] +] + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence, containing the return values of `f(e1, e2)` for each pair of elements `e1` and `e2` within `seq1` and `seq2` respectively. + +[heading Complexity] +Constant. Returns a view which is lazily evaluated. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/transform.hpp> + #include <boost/fusion/include/transform.hpp> + +[heading Example] + struct triple + { + typedef int result_type; + + int operator()(int t) const + { + return t * 3; + }; + }; + ... + assert(__transform__(__make_vector__(1,2,3), triple()) == __make_vector__(3,6,9)); + +[endsect] + +[section replace] + +[heading Description] +Returns the result type of __replace__, given the types of the input sequence and element to replace. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct replace + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][The type of the search and replacement objects]] +] + +[heading Expression Semantics] + __result_of_replace__<Sequence,T>::type + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns the return type of __replace__. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/replace.hpp> + #include <boost/fusion/include/replace.hpp> + +[endsect] + +[section replace_if] + +[heading Description] +Returns the result type of __replace_if__, given the types of the sequence, __poly_func_obj__ predicate and replacement object. + +[heading Synopsis] + template< + typename Sequence, + typename F, + typename T> + struct replace_if + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`F`][A model of unary __poly_func_obj__][Replacement predicate]] + [[`T`][Any type][The type of the replacement object]] +] + +[heading Expression Semantics] + __result_of_replace_if__<Sequence,F,T>::type + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns the return type of __replace_if__. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/replace_if.hpp> + #include <boost/fusion/include/replace_if.hpp> + +[endsect] + +[section remove] + +[heading Description] +Returns the result type of __remove__, given the sequence and removal types. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct remove + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][Remove elements of this type]] +] + +[heading Expression Semantics] + __result_of_remove__<Sequence, T>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing the elements of `Sequence` not of type `T`. Equivalent to `__result_of_replace_if__<Sequence, boost::is_same<mpl::_, T> >::type`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/remove.hpp> + #include <boost/fusion/include/remove.hpp> + +[endsect] + +[section remove_if] + +[heading Description] +Returns the result type of __remove_if__, given the input sequence and unary __mpl_lambda_expression__ predicate types. + +[heading Synopsis] + template< + typename Sequence, + typename Pred + > + struct remove_if + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`Pred`][A model of unary __mpl_lambda_expression__][Remove elements which evaluate to `boost::mpl::true_`]] +] + +[heading Expression Semantics] + __result_of_remove_if__<Sequence, Pred>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing the elements of `Sequence` for which `Pred` evaluates to `boost::mpl::false_`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/remove_if.hpp> + #include <boost/fusion/include/remove_if.hpp> + +[endsect] + +[section reverse] + +[heading Description] +Returns the result type of __reverse__, given the input sequence type. + +[heading Synopsis] + template< + typename Sequence + > + struct reverse + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __bidirectional_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_reverse__<Sequence>::type + +[*Return type]: + +* A model of __bidirectional_sequence__ if `Sequence` is a __bidirectional_sequence__ +else, __random_access_sequence__ if `Sequence` is a __random_access_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence with the elements in the reverse order to `Sequence`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/reverse.hpp> + #include <boost/fusion/include/reverse.hpp> + +[endsect] + +[section clear] + +[heading Description] +Returns the result type of __clear__, given the input sequence type. + +[heading Synopsis] + template< + typename Sequence + > + struct clear + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][Any type][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_clear__<Sequence>::type + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns an empty sequence. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/clear.hpp> + #include <boost/fusion/include/clear.hpp> + +[endsect] + +[section erase] +Returns the result type of __erase__, given the input sequence and range delimiting iterator types. + +[heading Description] + +[heading Synopsis] + template< + typename Sequence, + typename It1, + typename It2 = __unspecified__> + struct erase + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`It1`][A model of __forward_iterator__][Operation's argument]] + [[`It2`][A model of __forward_iterator__][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_erase__<Sequence, It1>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a new sequence with the element at `It1` removed. + + __result_of_erase__<Sequence, It1, It2>::type + +[*Return type]: A model of __forward_sequence__. + +[*Semantics]: Returns a new sequence with the elements between `It1` and `It2` removed. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/erase.hpp> + #include <boost/fusion/include/erase.hpp> + +[endsect] + +[section erase_key] + +[heading Description] +Returns the result type of __erase_key__, given the sequence and key types. + +[heading Synopsis] + template< + typename Sequence, + typename Key + > + struct erase_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__ and __associative_sequence__][Operation's argument]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + __result_of_erase_key__<Sequence, Key>::type + +[*Return type]: A model of __forward_sequence__ and __associative_sequence__. + +[*Semantics]: Returns a sequence with the elements of `Sequence`, except those with key `Key`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/erase_key.hpp> + #include <boost/fusion/include/erase_key.hpp> + +[endsect] + +[section insert] + +[heading Description] +Returns the result type of __insert__, given the sequence, position iterator and insertion types. + +[heading Synopsis] + template< + typename Sequence, + typename Position, + typename T + > + struct insert + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`Position`][A model of __forward_iterator__][Operation's argument]] + [[`T`][Any type][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_insert__<Sequence, Position, T>::type + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a sequence with an element of type `T` inserted at position `Position` in `Sequence`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/insert.hpp> + #include <boost/fusion/include/insert.hpp> + +[endsect] + +[section insert_range] + +[heading Description] +Returns the result type of __insert_range__, given the input sequence, position iterator and insertion range types. + +[heading Synopsis] + template< + typename Sequence, + typename Position, + typename Range + > + struct insert_range + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`Position`][A model of __forward_iterator__][Operation's argument]] + [[`Range`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_insert_range__<Sequence, Position, Range>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence with the elements of `Range` inserted at position `Position` into `Sequence`. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/insert_range.hpp> + #include <boost/fusion/include/insert_range.hpp> + +[endsect] + +[section join] + +[heading Description] +Returns the result of joining 2 sequences, given the sequence types. + +[heading Synopsis] + template< + typename LhSequence, + typename RhSequence + > + struct join + { + typedef __unspecified__ type; + }; + +[heading Expression Semantics] + __result_of_join__<LhSequence, RhSequence>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `LhSequence` amd `RhSequence` implement the __associative_sequence__ model. + +[*Semantics]: Returns a sequence containing the elements of `LhSequence` followed by the elements of `RhSequence`. The order of the elements in the 2 sequences is preserved. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/join.hpp> + #include <boost/fusion/include/join.hpp> + +[endsect] + +[section zip] + +[heading Description] +Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences. + +[heading Synopsis] + template< + typename Sequence1, + typename Sequence2, + ... + typename SequenceN + > + struct zip + { + typedef __unspecified__ type; + }; + +[heading Expression Semantics] + __result_of_zip__<Sequence1, Sequence2, ... SequenceN>::type + +[*Return type]: A model of the most restrictive traversal category of sequences `Sequence1` to `SequenceN`. + +[*Semantics]: Return a sequence containing tuples of elements from each sequence. For example, applying zip to tuples `(1, 2, 3)` and `('a', 'b', 'c')` would return `((1, 'a'),(2, 'b'),(3, 'c'))` + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/zip.hpp> + #include <boost/fusion/include/zip.hpp> + +[endsect] + +[section pop_back] + +[heading Description] +Returns the result type of __pop_back__, given the input sequence type. + +[heading Synopsis] + template< + typename Sequence + > + struct pop_back + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_pop_back__<Sequence>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence with all the elements of `Sequence` except the last element. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/pop_back.hpp> + #include <boost/fusion/include/pop_back.hpp> + +[endsect] + +[section pop_front] + +[heading Description] +Returns the result type of __pop_front__, given the input sequence type. + +[heading Synopsis] + template< + typename Sequence + > + struct pop_front + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_pop_front__<Sequence>::type + +[*Return type]: + +* A model of __forward_sequence__. +* A model of __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[*Semantics]: Returns a sequence with all the elements of `Sequence` except the first element. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/pop_front.hpp> + #include <boost/fusion/include/pop_front.hpp> + +[endsect] + +[section push_back] + +[heading Description] +Returns the result type of __push_back__, given the types of the input sequence and element to push. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct push_back + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_push_back__<Sequence, T>::type + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a sequence with the elements of `Sequence` and an element of type `T` added to the end. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/push_back.hpp> + #include <boost/fusion/include/push_back.hpp> + +[endsect] + +[section push_front] + +[heading Description] +Returns the result type of __push_front__, given the types of the input sequence and element to push. + +[heading Synopsis] + template< + typename Sequence, + typename T + > + struct push_front + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter][Requirement][Description]] + [[`Sequence`][A model of __forward_sequence__][Operation's argument]] + [[`T`][Any type][Operation's argument]] +] + +[heading Expression Semantics] + __result_of_push_front__<Sequence, T>::type + +[*Return type]: + +* A model of __forward_sequence__. + +[*Semantics]: Returns a sequence with the elements of `Sequence` and an element of type `T` added to the beginning. + +[heading Complexity] +Constant. + +[heading Header] + + #include <boost/fusion/algorithm/transformation/push_front.hpp> + #include <boost/fusion/include/push_front.hpp> + +[endsect] + +[endsect] + +[endsect] + +[endsect] diff --git a/libs/fusion/doc/changelog.qbk b/libs/fusion/doc/changelog.qbk new file mode 100644 index 000000000..91406c7b6 --- /dev/null +++ b/libs/fusion/doc/changelog.qbk @@ -0,0 +1,48 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2006 Tobias Schwinger + Copyright (C) 2010 Christopher Schmidt + + Use, modification and distribution is 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) +===============================================================================/] +[section Change log] + +This section summarizes significant changes to the Fusion library. + +* Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman) +* Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman) +* Feb 15, 2007: Added functional module. (Tobias Schwinger) +* April 2, 2007: Added struct adapter. (Joel de Guzman) +* May 8, 2007: Added associative struct adapter. (Dan Marsden) +* Dec 20, 2007: Removed `boost::variant` support. After thorough + investigation, I think now that the move to make variant a + fusion sequence is rather quirky. A variant will always + have a size==1 regardless of the number of types it can contain + and there's no way to know at compile time what it contains. + Iterating over its types is simply wrong. All these imply that + the variant is *not* a fusion sequence. (Joel de Guzman) +* Oct 12, 2009: The accumulator is the first argument to the functor of + __fold__ and __accumulate__. (Christopher Schmidt) +* Oct 30, 2009: Added support for associative iterators and views. (Christopher + Schmidt) +* March 1, 2010: Added __adapt_struct_named__ and __adapt_struct_named_ns__ + (Hartmut Kaiser) +* April 4, 2010: Added __array__ support, __adapt_tpl_struct__, + __adapt_assoc_tpl_struct__, __adapt_assoc_struct_named__ and + __adapt_assoc_struct_named_ns__ (Christopher Schmidt) +* April 5, 2010: Added __define_struct__, __define_tpl_struct__, + __define_assoc_struct__ and __define_assoc_tpl_struct__ (Christopher Schmidt) +* June 18, 2010: Added __reverse_fold__, __iter_fold__ and __reverse_iter_fold__ + (Christopher Schmidt) +* October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__, + __adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman, + Hartmut Kaiser and Christopher Schmidt) +* August 29, 2011: Added support for segmented sequences and iterators (Eric Niebler) +* September 16, 2011: Added preprocessed files (using wave) to speed up + compilation (Joel de Guzman) +* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman) + +[endsect] diff --git a/libs/fusion/doc/container.qbk b/libs/fusion/doc/container.qbk new file mode 100644 index 000000000..e8408d9dd --- /dev/null +++ b/libs/fusion/doc/container.qbk @@ -0,0 +1,2142 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Container] + +Fusion provides a few predefined sequences out of the box. These +/containers/ actually hold heterogenously typed data; unlike +__views__. These containers are more or less counterparts of those in __stl__. + +[heading Header] + + #include <boost/fusion/container.hpp> + #include <boost/fusion/include/container.hpp> + +[section vector] + +[heading Description] + +`vector` is a __random_access_sequence__ of heterogenous typed data +structured as a simple `struct` where each element is held as a member +variable. `vector` is the simplest of the Fusion sequence container (a +vector with N elements is just a struct with N members), and in many +cases the most efficient. + +[heading Header] + + #include <boost/fusion/container/vector.hpp> + #include <boost/fusion/include/vector.hpp> + #include <boost/fusion/container/vector/vector_fwd.hpp> + #include <boost/fusion/include/vector_fwd.hpp> + + // numbered forms + #include <boost/fusion/container/vector/vector10.hpp> + #include <boost/fusion/include/vector10.hpp> + #include <boost/fusion/container/vector/vector20.hpp> + #include <boost/fusion/include/vector20.hpp> + #include <boost/fusion/container/vector/vector30.hpp> + #include <boost/fusion/include/vector30.hpp> + #include <boost/fusion/container/vector/vector40.hpp> + #include <boost/fusion/include/vector40.hpp> + #include <boost/fusion/container/vector/vector50.hpp> + #include <boost/fusion/include/vector50.hpp> + +[heading Synopsis] + +[*Numbered forms] + + struct vector0; + + template <typename T0> + struct vector1; + + template <typename T0, typename T1> + struct vector2; + + template <typename T0, typename T1, typename T2> + struct vector3; + + ... + + template <typename T0, typename T1, typename T2..., typename TN> + struct vectorN; + +[*Variadic form] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct vector; + +The numbered form accepts the exact number of elements. Example: + + vector3<int, char, double> + +The variadic form accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, where +`FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that +defaults to `10`. Example: + + vector<int, char, double> + +You may define the preprocessor constant `FUSION_MAX_VECTOR_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [__unspecified__]] +] + +[heading Model of] + +* __random_access_sequence__ + +[variablelist Notation + [[`v`] [Instance of `vector`]] + [[`V`] [A `vector` type]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`V()`] [Creates a vector with default constructed elements.]] + [[`V(e0, e1,... en)`] [Creates a vector with elements `e0`...`en`.]] + [[`V(s)`] [Copy constructs a vector from a __forward_sequence__, `s`.]] + [[`v = s`] [Assigns to a vector, `v`, from a __forward_sequence__, `s`.]] +] + +[heading Example] + + vector<int, float> v(12, 5.5f); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + +[endsect] + +[section cons] + +[heading Description] + +`cons` is a simple __forward_sequence__. It is a lisp style recursive list +structure where `car` is the /head/ and `cdr` is the /tail/: usually +another cons structure or `nil`: the empty list. Fusion's __list__ is built +on top of this more primitive data structure. It is more efficient than +__vector__ when the target sequence is constructed piecemeal (a data at a +time). The runtime cost of access to each element is peculiarly constant +(see __recursive_inline__). + +[heading Header] + + #include <boost/fusion/container/list/cons.hpp> + #include <boost/fusion/include/cons.hpp> + +[heading Synopsis] + + template <typename Car, typename Cdr = nil> + struct cons; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Car`] [Head type] [ ]] + [[`Cdr`] [Tail type] [`nil`]] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`nil`] [An empty `cons`]] + [[`C`] [A `cons` type]] + [[`l`, `l2`] [Instances of `cons`]] + [[`car`] [An arbitrary data]] + [[`cdr`] [Another `cons` list]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`nil()`] [Creates an empty list.]] + [[`C()`] [Creates a cons with default constructed elements.]] + [[`C(car)`] [Creates a cons with `car` head and default constructed tail.]] + [[`C(car, cdr)`] [Creates a cons with `car` head and `cdr` tail.]] + [[`C(s)`] [Copy constructs a cons from a __forward_sequence__, `s`.]] + [[`l = s`] [Assigns to a cons, `l`, from a __forward_sequence__, `s`.]] + [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__<N>(l)` is provided for convenience and compatibility +with the original __tuple__ library, despite `cons` being a +__forward_sequence__ only (`at` is supposed to be a +__random_access_sequence__ requirement). The runtime complexity of __at__ is +constant (see __recursive_inline__).] + +[heading Example] + + cons<int, cons<float> > l(12, cons<float>(5.5f)); + std::cout << __at_c__<0>(l) << std::endl; + std::cout << __at_c__<1>(l) << std::endl; + +[endsect] + +[section list] + +[heading Description] + +`list` is a __forward_sequence__ of heterogenous typed data built on top of +__cons__. It is more efficient than __vector__ when the target sequence is +constructed piecemeal (a data at a time). The runtime cost of access to +each element is peculiarly constant (see __recursive_inline__). + +[heading Header] + + #include <boost/fusion/container/list.hpp> + #include <boost/fusion/include/list.hpp> + #include <boost/fusion/container/list/list_fwd.hpp> + #include <boost/fusion/include/list_fwd.hpp> + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct list; + +The variadic class interface accepts `0` to `FUSION_MAX_LIST_SIZE` +elements, where `FUSION_MAX_LIST_SIZE` is a user definable predefined +maximum that defaults to `10`. Example: + + list<int, char, double> + +You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [__unspecified__]] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`L`] [A `list` type]] + [[`l`] [An instance of `list`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`L()`] [Creates a list with default constructed elements.]] + [[`L(e0, e1,... en)`] [Creates a list with elements `e0`...`en`.]] + [[`L(s)`] [Copy constructs a list from a __forward_sequence__, `s`.]] + [[`l = s`] [Assigns to a list, `l`, from a __forward_sequence__, `s`.]] + [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__<n>(l)` is provided for convenience and compatibility +with the original __tuple__ library, despite `list` being a +__forward_sequence__ only (__at__ is supposed to be a +__random_access_sequence__ requirement). The runtime complexity of __at__ is +constant (see __recursive_inline__).] + +[heading Example] + + list<int, float> l(12, 5.5f); + std::cout << __at_c__<0>(l) << std::endl; + std::cout << __at_c__<1>(l) << std::endl; + +[endsect] + +[section deque] + +[heading Description] + +`deque` is a simple __bidirectional_sequence__ that supports +constant-time insertion and removal of elements at both ends. Like the +__list__ and __cons__, `deque` is more efficient than __vector__ +(especially at compile time) when the target sequence is constructed +piecemeal (a data at a time, e.g. when constructing expression +templates). Like the __list__ and __cons__, runtime cost of access to +each element is peculiarly constant (see __recursive_inline__). + +Element insertion and removal are done by special `deque` helper classes +__front_extended_deque__ and __back_extended_deque__. + +[heading Header] + + #include <boost/fusion/container/deque.hpp> + #include <boost/fusion/include/deque.hpp> + #include <boost/fusion/container/list/deque_fwd.hpp> + #include <boost/fusion/include/deque_fwd.hpp> + +[heading Synopsis] + + template <typename ...Elements> + struct deque; + +For C++11 compilers, the variadic class interface has no upper bound. + +For C++03 compilers, the variadic class interface accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. Example: + + deque<int, char, double> + +You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Elements`] [Element types] [ ]] +] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `deque` type]] + [[`d`, `d2`] [Instances of `deque`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D()`] [Creates a deque with default constructed elements.]] + [[`D(e0, e1,... en)`] [Creates a deque with elements `e0`...`en`.]] + [[`D(s)`] [Copy constructs a deque from a __forward_sequence__, `s`.]] + [[`d = s`] [Assigns to a deque, `d`, from a __forward_sequence__, `s`.]] + [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__<N>(d)` is provided for convenience, despite +`deque` being a __bidirectional_sequence__ only (`at` is supposed to be +a __random_access_sequence__ requirement). The runtime complexity of +__at__ is constant (see __recursive_inline__). `deque` element access +utilizes operator overloading with argument dependent lookup (ADL) of +the proper element getter function given a static constant index +parameter. Interestingly, with modern C++ compilers, this lookup is very +fast and rivals recursive template instantiations in compile time-speed, +so much so that `deque` relies on ADL for all element access (indexing) +as well as iteration.] + +[heading Example] + + deque<int, float> d(12, 5.5f); + std::cout << __at_c__<0>(d) << std::endl; + std::cout << __at_c__<1>(d) << std::endl; + +[endsect] + +[section front_extended_deque] + +[heading Description] + +`front_extended_deque` allows a __deque__ to be front extended. It shares +the same properties as the __deque__. + +[heading Header] + + See __deque__ + +[heading Synopsis] + + template <typename Deque, typename T> + struct front_extended_deque; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Deque`] [Deque type] [ ]] + [[`T`] [Element type] [ ]] +] + +[blurb __note__ `Deque` can be a __deque__, a __front_extended_deque__ or a +__back_extended_deque__] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `front_extended_deque` type]] + [[`e`] [Heterogeneous value]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is +not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D(d, e)`] [Extend `d` prepending `e` to its front.]] + [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ See __deque__ for further details.] + +[heading Example] + + typedef deque<int, float> initial_deque; + initial_deque d(12, 5.5f); + front_extended_deque<initial_deque, int> d2(d, 999); + std::cout << __at_c__<0>(d2) << std::endl; + std::cout << __at_c__<1>(d2) << std::endl; + std::cout << __at_c__<2>(d2) << std::endl; + +[endsect] + +[section back_extended_deque] + +[heading Description] + +`back_extended_deque` allows a __deque__ to be back extended. It shares +the same properties as the __deque__. + +[heading Header] + + See __deque__ + +[heading Synopsis] + + template <typename Deque, typename T> + struct back_extended_deque; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Deque`] [Deque type] [ ]] + [[`T`] [Element type] [ ]] +] + +[blurb __note__ `Deque` can be a __deque__, a __back_extended_deque__ or a +__back_extended_deque__] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`D`] [A `back_extended_deque` type]] + [[`e`] [Heterogeneous value]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is +not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`D(d, e)`] [Extend `d` prepending `e` to its back.]] + [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ See __deque__ for further details.] + +[heading Example] + + typedef deque<int, float> initial_deque; + initial_deque d(12, 5.5f); + back_extended_deque<initial_deque, int> d2(d, 999); + std::cout << __at_c__<0>(d2) << std::endl; + std::cout << __at_c__<1>(d2) << std::endl; + std::cout << __at_c__<2>(d2) << std::endl; + +[endsect] + +[section set] + +[heading Description] + +set is an __associative_sequence__ of heteregenous typed data elements. +Type identity is used to impose an equivalence relation on keys. The +element's type is its key. A set may contain at most one element for each +key. Membership testing and element key lookup has constant runtime +complexity (see __overloaded_functions__). + +[heading Header] + + #include <boost/fusion/container/set.hpp> + #include <boost/fusion/include/set.hpp> + #include <boost/fusion/container/set/set_fwd.hpp> + #include <boost/fusion/include/set_fwd.hpp> + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct set; + +The variadic class interface accepts `0` to `FUSION_MAX_SET_SIZE` elements, +where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that +defaults to `10`. Example: + + set<int, char, double> + +You may define the preprocessor constant `FUSION_MAX_SET_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_SET_SIZE 20 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [__unspecified__]] +] + +[heading Model of] + +* __associative_sequence__ +* __forward_sequence__ + +[variablelist Notation + [[`S`] [A `set` type]] + [[`s`] [An instance of `set`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`S()`] [Creates a set with default constructed elements.]] + [[`S(e0, e1,... en)`] [Creates a set with elements `e0`...`en`.]] + [[`S(fs)`] [Copy constructs a set from a __forward_sequence__ `fs`.]] + [[`s = fs`] [Assigns to a set, `s`, from a __forward_sequence__ `fs`.]] +] + +[heading Example] + + typedef set<int, float> S; + S s(12, 5.5f); + std::cout << __at_key__<int>(s) << std::endl; + std::cout << __at_key__<float>(s) << std::endl; + std::cout << __result_of_has_key__<S, double>::value << std::endl; + +[endsect] + +[section map] + +[heading Description] + +map is an __associative_sequence__ of heteregenous typed data elements. +Each element is a key/data pair (see __fusion_pair__) where the key has no +data (type only). Type identity is used to impose an equivalence relation +on keys. A map may contain at most one element for each key. Membership +testing and element key lookup has constant runtime complexity (see +__overloaded_functions__). + +[heading Header] + + #include <boost/fusion/container/map.hpp> + #include <boost/fusion/include/map.hpp> + #include <boost/fusion/container/map/map_fwd.hpp> + #include <boost/fusion/include/map_fwd.hpp> + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct map; + +The variadic class interface accepts `0` to `FUSION_MAX_MAP_SIZE` elements, +where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that +defaults to `10`. Example: + + map<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > + +You may define the preprocessor constant `FUSION_MAX_MAP_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [__unspecified__]] +] + +[heading Model of] + +* __associative_sequence__ +* __forward_sequence__ + +[variablelist Notation + [[`M`] [A `map` type]] + [[`m`] [An instance of `map`]] + [[`e0`...`en`] [Heterogeneous key/value pairs (see __fusion_pair__)]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`M()`] [Creates a map with default constructed elements.]] + [[`M(e0, e1,... en)`] [Creates a map with element pairs `e0`...`en`.]] + [[`M(s)`] [Copy constructs a map from a __forward_sequence__ `s`.]] + [[`m = s`] [Assigns to a map, `m`, from a __forward_sequence__ `s`.]] +] + +[heading Example] + + typedef map< + __pair__<int, char> + , __pair__<double, std::string> > + map_type; + + map_type m( + __fusion_make_pair__<int>('X') + , __fusion_make_pair__<double>("Men")); + + std::cout << __at_key__<int>(m) << std::endl; + std::cout << __at_key__<double>(m) << std::endl; + +[endsect] + +[section Generation] + +These are the functions that you can use to generate various forms of +__containers__ from elemental values. + +[heading Header] + + #include <boost/fusion/container/generation.hpp> + #include <boost/fusion/include/generation.hpp> + +[section Functions] + +[section make_list] + +[heading Description] + +Create a __list__ from one or more values. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + typename __result_of_make_list__<T0, T1,... TN>::type + make_list(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where +`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_list`]] +] + +[heading Expression Semantics] + + make_list(x0, x1,... xN); + +[*Return type]: __result_of_make_list__`<T0, T1,... TN>::type` + +[*Semantics]: Create a __list__ from `x0, x1,... xN`. + +[heading Header] + + #include <boost/fusion/container/generation/make_list.hpp> + #include <boost/fusion/include/make_list.hpp> + +[heading Example] + + make_list(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_cons] + +[heading Description] + +Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). + +[heading Synopsis] + + template <typename Car> + typename __result_of_make_cons__<Car>::type + make_cons(Car const& car); + + template <typename Car, typename Cdr> + typename __result_of_make_cons__<Car, Cdr>::type + make_cons(Car const& car, Cdr const& cdr); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`car`] [Instance of `Car`] [The list's head]] + [[`cdr`] [Instance of `Cdr`] [The list's tail (optional)]] +] + +[heading Expression Semantics] + + make_cons(car, cdr); + +[*Return type]: __result_of_make_cons__`<Car, Cdr>::type` or +__result_of_make_cons__`<Car>::type` + +[*Semantics]: Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). + +[heading Header] + + #include <boost/fusion/container/generation/make_cons.hpp> + #include <boost/fusion/include/make_cons.hpp> + +[heading Example] + + make_cons('x', make_cons(123)) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_vector] + +[heading Description] + +Create a __vector__ from one or more values. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + typename __result_of_make_vector__<T0, T1,... TN>::type + make_vector(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, +where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_vector`]] +] + +[heading Expression Semantics] + + make_vector(x0, x1,... xN); + +[*Return type]: __result_of_make_vector__`<T0, T1,... TN>::type` + +[*Semantics]: Create a __vector__ from `x0, x1,... xN`. + +[heading Header] + + #include <boost/fusion/container/generation/make_vector.hpp> + #include <boost/fusion/include/make_vector.hpp> + +[heading Example] + + make_vector(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_deque] + +[heading Description] + +Create a __deque__ from one or more values. + +[heading Synopsis] + + template <typename ...Elements> + typename __result_of_make_deque__<Elements...>::type + make_deque(Elements const&... elements); + +For C++11 compilers, the variadic function interface has no upper bound. + +For C++11 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Description] [Description]] + [[`elements`] [Instances of `Elements`] [The arguments to `make_deque`]] +] + +[heading Expression Semantics] + + make_deque(elements...); + +[*Return type]: __result_of_make_deque__`<Elements...>::type` + +[*Semantics]: Create a __deque__ from `elements...`. + +[heading Header] + + #include <boost/fusion/container/generation/make_deque.hpp> + #include <boost/fusion/include/make_deque.hpp> + +[heading Example] + + make_deque(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_set] + +[heading Description] + +Create a __set__ from one or more values. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + typename __result_of_make_set__<T0, T1,... TN>::type + make_set(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_SET_SIZE` elements, +where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_SET_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_SET_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_set`]] +] + +[heading Expression Semantics] + + make_set(x0, x1,... xN); + +[*Return type]: __result_of_make_set__`<T0, T1,... TN>::type` + +[*Semantics]: Create a __set__ from `x0, x1,... xN`. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/generation/make_set.hpp> + #include <boost/fusion/include/make_set.hpp> + +[heading Example] + + make_set(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_map] + +[heading Description] + +Create a __map__ from one or more key/data pairs. + +[heading Synopsis] + + template < + typename K0, typename K1,... typename KN + , typename T0, typename T1,... typename TN> + typename __result_of_make_map__<K0, K0,... KN, T0, T1,... TN>::type + make_map(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, +where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [The key types] [Keys associated with `x0, x1,... xN`]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_map`]] +] + +[heading Expression Semantics] + + make_map<K0, K1,... KN>(x0, x1,... xN); + +[*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type` + +[*Semantics]: Create a __map__ from `K0, K1,... KN` keys and +`x0, x1,... xN` data. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/generation/make_map.hpp> + #include <boost/fusion/include/make_map.hpp> + +[heading Example] + + make_map<int, double>('X', "Men") + +[heading See also] + +__note_boost_ref__, __fusion_pair__ + +[endsect] + +[section Tiers] + +Tiers are sequences, where all elements are non-const reference types. They +are constructed with a call to a couple of /tie/ function templates. The +succeeding sections document the various /tier/ flavors. + +* __list_tie__ +* __vector_tie__ +* __map_tie__ +* __deque_tie__ + +Example: + + int i; char c; double d; + ... + __vector_tie__(i, c, a); + +The __vector_tie__ function creates a __vector__ of type +`__vector__<int&, char&, double&>`. The same result could be achieved with the call +__make_vector__(__boost_ref_call__(i), __boost_ref_call__(c), __boost_ref_call__(a)) +[footnote see __boost_ref__ for details about `ref`]. + +A /tie/ can be used to 'unpack' another tuple into variables. E.g.: + + int i; char c; double d; + __vector_tie__(i, c, d) = __make_vector__(1,'a', 5.5); + std::cout << i << " " << c << " " << d; + +This code prints 1 a 5.5 to the standard output stream. A sequence +unpacking operation like this is found for example in ML and Python. It is +convenient when calling functions which return sequences. + +[heading Ignore] + +There is also an object called /ignore/ which allows you to ignore an +element assigned by a sequence. The idea is that a function may return a +sequence, only part of which you are interested in. For example: + + char c; + __vector_tie__(ignore, c) = __make_vector__(1, 'a'); + +[endsect] + +[section list_tie] + +[heading Description] + +Constructs a tie using a __list__ sequence. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + __list__<T0&, T1&,... TN&> + list_tie(T0& x0, T1& x1... TN& xN); + +The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where +`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `list_tie`]] +] + +[heading Expression Semantics] + + list_tie(x0, x1,... xN); + +[*Return type]: __list__<T0&, T1&,... TN&> + +[*Semantics]: Create a __list__ of references from `x0, x1,... xN`. + +[heading Header] + + #include <boost/fusion/container/generation/list_tie.hpp> + #include <boost/fusion/include/list_tie.hpp> + +[heading Example] + + int i = 123; + double d = 123.456; + list_tie(i, d) + +[endsect] + +[section vector_tie] + +[heading Description] + +Constructs a tie using a __vector__ sequence. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + __vector__<T0&, T1&,... TN&> + vector_tie(T0& x0, T1& x1... TN& xN); + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, +where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `vector_tie`]] +] + +[heading Expression Semantics] + + vector_tie(x0, x1,... xN); + +[*Return type]: __vector__<T0&, T1&,... TN&> + +[*Semantics]: Create a __vector__ of references from `x0, x1,... xN`. + +[heading Header] + + #include <boost/fusion/container/generation/vector_tie.hpp> + #include <boost/fusion/include/vector_tie.hpp> + +[heading Example] + + int i = 123; + double d = 123.456; + vector_tie(i, d) + +[endsect] + +[section map_tie] + +[heading Description] + +Constructs a tie using a __map__ sequence. + +[heading Synopsis] + + template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN> + __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> > + map_tie(D0& d0, D1& d1... DN& dN); + +The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, +where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that +defaults to `10`, and a corresponding number of key types. +You may define the preprocessor constant `FUSION_MAX_MAP_SIZE` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type][The key types associated with each of the `x1,x2,...,xN` values]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `map_tie`]] +] + +[heading Expression Semantics] + + map_tie<K0, K1,... KN>(x0, x1,... xN); + +[*Return type]: __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> > + +[*Semantics]: Create a __map__ of references from `x0, x1,... xN` with keys `K0, K1,... KN` + +[heading Header] + + #include <boost/fusion/container/generation/map_tie.hpp> + #include <boost/fusion/include/map_tie.hpp> + +[heading Example] + + struct int_key; + struct double_key; + ... + int i = 123; + double d = 123.456; + map_tie<int_key, double_key>(i, d) + +[endsect] + +[section deque_tie] + +[heading Description] + +Constructs a tie using a __deque__ sequence. + +[heading Synopsis] + + template <typename ...Elements> + __deque__<Elements&...> + deque_tie(Elements&... elements); + +For C++11 compilers, the variadic function interface has no upper bound. + +For C++03 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Description] [Description]] + [[`elements`] [Instances of `Elements`] [The arguments to `deque_tie`]] +] + +[heading Expression Semantics] + + deque_tie(elements...); + +[*Return type]: __deque__<Elements&...> + +[*Semantics]: Create a __deque__ of references from `elements...`. + +[heading Header] + + #include <boost/fusion/container/generation/deque_tie.hpp> + #include <boost/fusion/include/deque_tie.hpp> + +[heading Example] + + int i = 123; + double d = 123.456; + deque_tie(i, d) + +[endsect] + +[endsect] + +[section MetaFunctions] + +[section make_list] + +[heading Description] + +Returns the result type of __make_list__. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + struct make_list; + +The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where +`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [Template arguments to `make_list`]] +] + +[heading Expression Semantics] + + result_of::make_list<T0, T1,... TN>::type + +[*Return type]: A __list__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __list__ from `T0, T1,... TN`. + +[heading Header] + + #include <boost/fusion/container/generation/make_list.hpp> + #include <boost/fusion/include/make_list.hpp> + +[heading Example] + + result_of::make_list<int, const char(&)[7], double>::type + +[endsect] + +[section make_cons] + +[heading Description] + +Returns the result type of __make_cons__. + +[heading Synopsis] + + template <typename Car, typename Cdr = nil> + struct make_cons; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Car`] [Any type] [The list's head type]] + [[`Cdr`] [A `cons`] [The list's tail type (optional)]] +] + +[heading Expression Semantics] + + result_of::make_cons<Car, Cdr>::type + +[*Return type]: A __cons__ with head element, `Car`, of type converted +following the rules for __element_conversion__, and tail, `Cdr`. + +[*Semantics]: Create a __cons__ from `Car` (/head/) and optional `Cdr` (/tail/). + +[heading Header] + + #include <boost/fusion/container/generation/make_cons.hpp> + #include <boost/fusion/include/make_cons.hpp> + +[heading Example] + + result_of::make_cons<char, result_of::make_cons<int>::type>::type + +[endsect] + +[section make_vector] + +[heading Description] + +Returns the result type of __make_vector__. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + struct make_vector; + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, +where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [Template arguments to `make_vector`]] +] + +[heading Expression Semantics] + + result_of::make_vector<T0, T1,... TN>::type + +[*Return type]: A __vector__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __vector__ from `T0, T1,... TN`. + +[heading Header] + + #include <boost/fusion/container/generation/make_list.hpp> + #include <boost/fusion/include/make_list.hpp> + +[heading Example] + + result_of::make_vector<int, const char(&)[7], double>::type + +[endsect] + +[section make_deque] + +[heading Description] + +Returns the result type of __make_deque__. + +[heading Synopsis] + + template <typename ...Elements> + struct make_deque; + +For C++11 compilers, the variadic template interface has no upper bound. + +For C++03 The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE` +elements, where `FUSION_MAX_DEQUE_SIZE` is a user definable predefined +maximum that defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_DEQUE_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Elements`] [Variadic template types] [Template arguments to `make_deque`]] +] + +[heading Expression Semantics] + + result_of::make_deque<Elements...>::type + +[*Return type]: A __deque__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __deque__ from `Elements...`. + +[heading Header] + + #include <boost/fusion/container/generation/make_deque.hpp> + #include <boost/fusion/include/make_deque.hpp> + +[heading Example] + + result_of::make_deque<int, const char(&)[7], double>::type + +[endsect] + +[section make_set] + +[heading Description] + +Returns the result type of __make_set__. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + struct make_set; + +The variadic function accepts `0` to `FUSION_MAX_SET_SIZE` elements, +where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_SET_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_SET_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `make_set`]] +] + +[heading Expression Semantics] + + result_of::make_set<T0, T1,... TN>::type + +[*Return type]: A __set__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __set__ from `T0, T1,... TN`. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/generation/make_set.hpp> + #include <boost/fusion/include/make_set.hpp> + +[heading Example] + + result_of::make_set<int, char, double>::type + +[endsect] + +[section make_map] + +[heading Description] + +Returns the result type of __make_map__. + +[heading Synopsis] + + template < + typename K0, typename K1,... typename KN + , typename T0, typename T1,... typename TN> + struct make_map; + +The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, +where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type] [Keys associated with `T0, T1,... TN`]] + [[`T0, T1,... TN`] [Any type] [Data associated with keys `K0, K1,... KN`]] +] + +[heading Expression Semantics] + + resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type; + +[*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type` + +[*Semantics]: A __map__ with __fusion_pair__ elements where the +`second_type` is converted following the rules for __element_conversion__. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/generation/make_map.hpp> + #include <boost/fusion/include/make_map.hpp> + +[heading Example] + + result_of::make_map<int, double, char, double>::type + +[heading See also] + +__fusion_pair__ + +[endsect] + +[section list_tie] + +[heading Description] + +Returns the result type of __list_tie__. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + struct list_tie; + +The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where +`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults +to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `list_tie`]] +] + +[heading Expression Semantics] + + result_of::list_tie<T0, T1,... TN>::type; + +[*Return type]: __list__<T0&, T1&,... TN&> + +[*Semantics]: Create a __list__ of references from `T0, T1,... TN`. + +[heading Header] + + #include <boost/fusion/container/generation/list_tie.hpp> + #include <boost/fusion/include/list_tie.hpp> + +[heading Example] + + result_of::list_tie<int, double>::type + +[endsect] + +[section vector_tie] + +[heading Description] + +Returns the result type of __vector_tie__. + +[heading Synopsis] + + template <typename T0, typename T1,... typename TN> + struct vector_tie; + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, +where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `vector_tie`]] +] + +[heading Expression Semantics] + + result_of::vector_tie<T0, T1,... TN>::type; + +[*Return type]: __vector__<T0&, T1&,... TN&> + +[*Semantics]: Create a __vector__ of references from `T0, T1,... TN`. + +[heading Header] + + #include <boost/fusion/container/generation/vector_tie.hpp> + #include <boost/fusion/include/vector_tie.hpp> + +[heading Example] + + result_of::vector_tie<int, double>::type + +[endsect] + +[section deque_tie] + +[heading Description] + +Returns the result type of __deque_tie__. + +[heading Synopsis] + + template <typename ...Elements> + struct deque_tie; + +For C++11 compilers, the variadic template interface has no upper bound. + +For C++03 compilers, the variadic function accepts `0` to +`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a +user definable predefined maximum that defaults to `10`. You may define +the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any +Fusion header to change the default. Example: + + #define FUSION_MAX_DEQUE_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Elements`] [Variadic template types] [Template arguments to `deque_tie`]] +] + +[heading Expression Semantics] + + result_of::deque_tie<Elements...>::type; + +[*Return type]: __deque__<Elements&...> + +[*Semantics]: Create a __deque__ of references from `Elements...`. + +[heading Header] + + #include <boost/fusion/container/generation/deque_tie.hpp> + #include <boost/fusion/include/deque_tie.hpp> + +[heading Example] + + result_of::deque_tie<int, double>::type + +[endsect] + +[section map_tie] + +[heading Description] + +Returns the result type of __map_tie__. + +[heading Synopsis] + + template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN> + struct map_tie; + +The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, +where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that +defaults to `10`. You may define the preprocessor constant +`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type] [The key types for `map_tie`]] + [[`D0, D1,... DN`] [Any type] [The arguments types for `map_tie`]] +] + +[heading Expression Semantics] + + result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type; + +[*Return type]: __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> > + +[*Semantics]: Create a __map__ of references from `D0, D1,... DN` with keys `K0, K1,... KN` + +[heading Header] + + #include <boost/fusion/container/generation/map_tie.hpp> + #include <boost/fusion/include/map_tie.hpp> + +[heading Example] + + struct int_key; + struct double_key; + ... + result_of::map_tie<int_key, double_key, int, double>::type + +[endsect] + +[endsect] + +[endsect] + +[section Conversion] + +All fusion sequences can be converted to one of the __containers__ types +using one of these conversion functions. + +[heading Header] + + #include <boost/fusion/include/convert.hpp> + +[section Functions] + +[section as_list] + +[heading Description] + +Convert a fusion sequence to a __list__. + +[heading Synopsis] + + template <typename Sequence> + typename result_of::as_list<Sequence>::type + as_list(Sequence& seq); + + template <typename Sequence> + typename result_of::as_list<Sequence const>::type + as_list(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_list(seq); + +[*Return type]: __result_of_as_list__`<Sequence>::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __list__. + +[heading Header] + + #include <boost/fusion/container/list/convert.hpp> + #include <boost/fusion/include/as_list.hpp> + +[heading Example] + + as_list(__make_vector__('x', 123, "hello")) + +[endsect] + +[section as_vector] + +[heading Description] + +Convert a fusion sequence to a __vector__. + +[heading Synopsis] + + template <typename Sequence> + typename result_of::as_vector<Sequence>::type + as_vector(Sequence& seq); + + template <typename Sequence> + typename result_of::as_vector<Sequence const>::type + as_vector(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_vector(seq); + +[*Return type]: __result_of_as_vector__`<Sequence>::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __vector__. + +[heading Header] + + #include <boost/fusion/container/vector/convert.hpp> + #include <boost/fusion/include/as_vector.hpp> + +[heading Example] + + as_vector(__make_list__('x', 123, "hello")) + +[endsect] + +[section as_deque] + +[heading Description] + +Convert a fusion sequence to a __deque__. + +[heading Synopsis] + + template <typename Sequence> + typename result_of::as_deque<Sequence>::type + as_deque(Sequence& seq); + + template <typename Sequence> + typename result_of::as_deque<Sequence const>::type + as_deque(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_deque(seq); + +[*Return type]: __result_of_as_deque__`<Sequence>::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __deque__. + +[heading Header] + + #include <boost/fusion/container/deque/convert.hpp> + #include <boost/fusion/include/as_deque.hpp> + +[heading Example] + + as_deque(__make_vector__('x', 123, "hello")) + +[endsect] + +[section as_set] + +[heading Description] + +Convert a fusion sequence to a __set__. + +[heading Synopsis] + + template <typename Sequence> + typename result_of::as_set<Sequence>::type + as_set(Sequence& seq); + + template <typename Sequence> + typename result_of::as_set<Sequence const>::type + as_set(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_set(seq); + +[*Return type]: __result_of_as_set__`<Sequence>::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __set__. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/set/convert.hpp> + #include <boost/fusion/include/as_set.hpp> + +[heading Example] + + as_set(__make_vector__('x', 123, "hello")) + +[endsect] + +[section as_map] + +[heading Description] + +Convert a fusion sequence to a __map__. + +[heading Synopsis] + + template <typename Sequence> + typename result_of::as_map<Sequence>::type + as_map(Sequence& seq); + + template <typename Sequence> + typename result_of::as_map<Sequence const>::type + as_map(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_map(seq); + +[*Return type]: __result_of_as_map__`<Sequence>::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __map__. + +[*Precondition]: The elements of the sequence are assumed to be +__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. + +[heading Header] + + #include <boost/fusion/container/map/convert.hpp> + #include <boost/fusion/include/as_map.hpp> + +[heading Example] + + as_map(__make_vector__( + __fusion_make_pair__<int>('X') + , __fusion_make_pair__<double>("Men"))) + +[endsect] + +[endsect] + +[section Metafunctions] + +[section as_list] + +[heading Description] + +Returns the result type of __as_list__. + +[heading Synopsis] + + template <typename Sequence> + struct as_list; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]] +] + +[heading Expression Semantics] + + result_of::as_list<Sequence>::type; + +[*Return type]: A __list__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __list__. + +[heading Header] + + #include <boost/fusion/container/list/convert.hpp> + #include <boost/fusion/include/as_list.hpp> + +[heading Example] + + result_of::as_list<__vector__<char, int> >::type + +[endsect] + +[section as_vector] + +[heading Description] + +Returns the result type of __as_vector__. + +[heading Synopsis] + + template <typename Sequence> + struct as_vector; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_vector<Sequence>::type; + +[*Return type]: A __vector__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __vector__. + +[heading Header] + + #include <boost/fusion/container/vector/convert.hpp> + #include <boost/fusion/include/as_vector.hpp> + +[heading Example] + + result_of::as_vector<__list__<char, int> >::type + +[endsect] + +[section as_deque] + +[heading Description] + +Returns the result type of __as_deque__. + +[heading Synopsis] + + template <typename Sequence> + struct as_deque; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]] +] + +[heading Expression Semantics] + + result_of::as_deque<Sequence>::type; + +[*Return type]: A __deque__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __deque__. + +[heading Header] + + #include <boost/fusion/container/deque/convert.hpp> + #include <boost/fusion/include/as_deque.hpp> + +[heading Example] + + result_of::as_deque<__vector__<char, int> >::type + +[endsect] + +[section as_set] + +[heading Description] + +Returns the result type of __as_set__. + +[heading Synopsis] + + template <typename Sequence> + struct as_set; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_set<Sequence>::type; + +[*Return type]: A __set__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __set__. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include <boost/fusion/container/set/convert.hpp> + #include <boost/fusion/include/as_set.hpp> + +[heading Example] + + result_of::as_set<__vector__<char, int> >::type + +[endsect] + +[section as_map] + +[heading Description] + +Returns the result type of __as_map__. + +[heading Synopsis] + + template <typename Sequence> + struct as_map; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_map<Sequence>::type; + +[*Return type]: A __map__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __map__. + +[*Precondition]: The elements of the sequence are assumed to be +__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. + +[heading Header] + + #include <boost/fusion/container/map/convert.hpp> + #include <boost/fusion/include/as_map.hpp> + +[heading Example] + + result_of::as_map<__vector__< + __fusion_pair__<int, char> + , __fusion_pair__<double, std::string> > >::type + +[endsect] + +[endsect] + +[endsect] + +[endsect] diff --git a/libs/fusion/doc/extension.qbk b/libs/fusion/doc/extension.qbk new file mode 100644 index 000000000..354bc13e7 --- /dev/null +++ b/libs/fusion/doc/extension.qbk @@ -0,0 +1,490 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Extension] + +[section:ext_full The Full Extension Mechanism] + +The Fusion library is designed to be extensible, new sequences types can easily +be added. In fact, the library support for `std::pair`, `boost::array` and __mpl__ +sequences is entirely provided using the extension mechanism. + +The process for adding a new sequence type to Fusion is: + +# Enable the __tag_dispatching__ mechanism used by Fusion for your sequence type +# Design an iterator type for the sequence +# Provide specialized behaviour for the intrinsic operations of the new Fusion sequence + +[heading Our example] + +In order to illustrate enabling a new sequence type for use with Fusion, we +are going to use the type: + + namespace example + { + struct example_struct + { + std::string name; + int age; + example_struct( + const std::string& n, + int a) + : name(n), age(a) + {} + }; + } + +We are going to pretend that this type has been provided by a 3rd party +library, and therefore cannot be modified. We shall work through all the +necessary steps to enable `example_struct` to serve as an __associative_sequence__ +as described in the __quick_start__ guide. + +[heading Enabling Tag Dispatching] + +The Fusion extensibility mechanism uses __tag_dispatching__ to call the +correct code for a given sequence type. In order to exploit the tag +dispatching mechanism we must first declare a new tag type for the +mechanism to use. For example: + + namespace example { + struct example_sequence_tag; // Only definition needed + } + +Next we need to enable the `traits::tag_of` metafunction to return our newly chosen +tag type for operations involving our sequence. This is done by specializing +`traits::tag_of` for our sequence type. + + #include <boost/fusion/support/tag_of_fwd.hpp> + #include <boost/fusion/include/tag_of_fwd.hpp> + + namespace boost { namespace fusion { namespace traits { + template<> + struct tag_of<example_struct> + { + typedef example::example_sequence_tag type; + }; + }}} + +`traits::tag_of` also has a second template argument, +that can be used in conjuction with `boost::enable_if` to provide tag +support for groups of related types. This feature is not necessary +for our sequence, but for an example see the code in: + + #include <boost/fusion/adapted/array/tag_of.hpp> + #include <boost/fusion/include/tag_of.hpp> + +[heading Designing a suitable iterator] + +We need an iterator to describe positions, and provide access to +the data within our sequence. As it is straightforward to do, +we are going to provide a random access iterator in our example. + +We will use a simple design, in which the 2 members of +`example_struct` are given numbered indices, 0 for `name` and +1 for `age` respectively. + + template<typename Struct, int Pos> + struct example_struct_iterator + : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> > + { + BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3); + typedef Struct struct_type; + typedef boost::mpl::int_<Pos> index; + typedef boost::fusion::random_access_traversal_tag category; + + example_struct_iterator(Struct& str) + : struct_(str) {} + + Struct& struct_; + }; + +A quick summary of the details of our iterator: + +# The iterator is parameterized by the type it is iterating over, and the index of the current element. +# The typedefs `struct_type` and `index` provide convenient access to information we will need later in + the implementation. +# The typedef `category` allows the `traits::__category_of__` metafunction to establish + the traversal category of the iterator. +# The constructor stores a reference to the `example_struct` being iterated over. + +We also need to enable __tag_dispatching__ for our iterator type, with another specialization of +`traits::tag_of`. + +In isolation, the iterator implementation is pretty dry. Things should become clearer as we +add features to our implementation. + +[heading A first couple of instructive features] + +To start with, we will get the __result_of_value_of__ metafunction working. To +do this, we provide a specialization of the `boost::fusion::extension::value_of_impl` template for +our iterator's tag type. + + template<> + struct value_of_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 0> > + { + typedef std::string type; + }; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 1> > + { + typedef int type; + }; + }; + +The implementation itself is pretty simple, it just uses 2 partial specializations to +provide the type of the 2 different members of `example_struct`, based on the index of the iterator. + +To understand how `value_of_impl` is used by the library we will look at the implementation of __result_of_value_of__: + + template <typename Iterator> + struct value_of + : extension::value_of_impl<typename detail::tag_of<Iterator>::type>:: + template apply<Iterator> + {}; + +So __result_of_value_of__ uses __tag_dispatching__ to select an __mpl_metafunction_class__ +to provide its functionality. You will notice this pattern throughout the +implementation of Fusion. + +Ok, lets enable dereferencing of our iterator. In this case we must provide a suitable +specialization of `deref_impl`. + + template<> + struct deref_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 0> > + { + typedef typename mpl::if_< + is_const<Struct>, std::string const&, std::string&>::type type; + + static type + call(example::example_struct_iterator<Struct, 0> const& it) + { + return it.struct_.name; + } + }; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 1> > + { + typedef typename mpl::if_< + is_const<Struct>, int const&, int&>::type type; + + static type + call(example::example_struct_iterator<Struct, 1> const& it) + { + return it.struct_.age; + } + }; + }; + } + +The use of `deref_impl` is very similar to that of `value_of_impl`, but it also +provides some runtime functionality this time via the `call` static member function. +To see how `deref_impl` is used, lets have a look at the implementation of __deref__: + + namespace result_of + { + template <typename Iterator> + struct __deref__ + : extension::deref_impl<typename detail::tag_of<Iterator>::type>:: + template apply<Iterator> + {}; + } + + template <typename Iterator> + typename result_of::deref<Iterator>::type + __deref__(Iterator const& i) + { + typedef result_of::deref<Iterator> deref_meta; + return deref_meta::call(i); + } + +So again __result_of_deref__ uses __tag_dispatching__ in exactly the +same way as the __result_of_value_of__ implementation. The runtime functionality used +by __deref__ is provided by the `call` static function of the selected +__mpl_metafunction_class__. + +The actual implementation of `deref_impl` is slightly more complex than that of `value_of_impl`. +We also need to implement the `call` function, which returns a reference +to the appropriate member of the underlying sequence. We also require a little +bit of metaprogramming to return `const` references if the underlying sequence +is const. + +[note Although there is a fair amount of left to do to produce a fully fledged +Fusion sequence, __result_of_value_of__ and __deref__ illustrate all the signficant concepts +required. The remainder of the process is very repetitive, simply requiring +implementation of a suitable `xxxx_impl` for each feature `xxxx`. +] + +[heading Implementing the remaining iterator functionality] + +Ok, now we have seen the way __result_of_value_of__ and __deref__ work, everything else will work + in pretty much the same way. Lets start with forward iteration, +by providing a `next_impl`: + + template<> + struct next_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply + { + typedef typename Iterator::struct_type struct_type; + typedef typename Iterator::index index; + typedef example::example_struct_iterator<struct_type, index::value + 1> type; + + static type + call(Iterator const& i) + { + return type(i.struct_); + } + }; + }; + +This should be very familiar from our `deref_impl` implementation, we will be +using this approach again and again now. Our design is simply to increment +the `index` counter to move on to the next element. The various other iterator +manipulations we need to perform will all just involve simple calculations +with the `index` variables. + +We also need to provide a suitable `equal_to_impl` so that iterators can be +correctly compared. A __bidirectional_iterator__ will also need an implementation of `prior_impl`. For a +__random_access_iterator__ `distance_impl` and `advance_impl` also need to be provided +in order to satisfy the necessary complexity guarantees. As our iterator is +a __random_access_iterator__ we will have to implement all of these functions. + +Full implementations of `prior_impl`, `advance_impl`, `distance_impl` and `equal_to_impl` are +provided in the example code. + +[heading Implementing the intrinsic functions of the sequence] + +In order that Fusion can correctly identify our sequence as a Fusion sequence, we +need to enable `is_sequence` for our sequence type. As usual we just create +an `impl` type specialized for our sequence tag: + + template<> + struct is_sequence_impl<example::example_sequence_tag> + { + template<typename T> + struct apply : mpl::true_ {}; + }; + +We've some similar formalities to complete, providing `category_of_impl` so Fusion +can correctly identify our sequence type, and `is_view_impl` so Fusion can correctly +identify our sequence as not being a __view__ type. Implementations are +provide in the example code. + +Now we've completed some formalities, on to more interesting features. Lets get +__begin__ working so that we can get an iterator to start accessing the data in +our sequence. + + template<> + struct begin_impl<example::example_sequence_tag> + { + template<typename Sequence> + struct apply + { + typedef example::example_struct_iterator<Sequence, 0> type; + + static type + call(Sequence& seq) + { + return type(seq); + } + }; + }; + +The implementation uses the same ideas we have applied throughout, in this case +we are just creating one of the iterators we developed earlier, pointing to the +first element in the sequence. The implementation of __end__ is very similar, and +is provided in the example code. + +For our __random_access_sequence__ we will also need to implement `size_impl`, +`value_at_impl` and `at_impl`. + +[heading Enabling our type as an associative sequence] + +In order for `example_struct` to serve as an associative forward sequence, +we need to adapt the traversal category of our sequence and our iterator +accordingly and enable 3 intrinsic sequence lookup features, __at_key__, +__value_at_key__ and __has_key__. We also need to enable 3 iterator lookup +features, __result_of_key_of__, __result_of_value_of_data__ and __deref_data__. + +To implement `at_key_impl` we need to associate the `fields::name` and `fields::age` +types described in the __quick_start__ guide with the appropriate members of `example_struct`. +Our implementation is as follows: + + template<> + struct at_key_impl<example::example_sequence_tag> + { + template<typename Sequence, typename Key> + struct apply; + + template<typename Sequence> + struct apply<Sequence, fields::name> + { + typedef typename mpl::if_< + is_const<Sequence>, + std::string const&, + std::string&>::type type; + + static type + call(Sequence& seq) + { + return seq.name; + }; + }; + + template<typename Sequence> + struct apply<Sequence, fields::age> + { + typedef typename mpl::if_< + is_const<Sequence>, + int const&, + int&>::type type; + + static type + call(Sequence& seq) + { + return seq.age; + }; + }; + }; + +Its all very similar to the implementations we've seen previously, +such as `deref_impl` and `value_of_impl`. Instead of identifying +the members by index or position, we are now selecting them using +the types `fields::name` and `fields::age`. The implementations of +the other functions are equally straightforward, and are provided in +the example code. + +[heading Summary] + +We've now worked through the entire process for adding a new random +access sequence and we've also enabled our type to serve as an associative +sequence. The implementation was slightly longwinded, but followed +a simple repeating pattern. + +The support for `std::pair`, __mpl__ sequences, and `boost::array` all +use the same approach, and provide additional examples of the approach +for a variety of types. + +[endsect] + +[section Sequence Facade] + +[heading Description] +The __sequence_facade__ template provides an intrusive mechanism for +producing a conforming Fusion sequence. + +[heading Synopsis] + template<typename Derived, typename TravesalTag, typename IsView = mpl::false_> + struct sequence_facade; + +[heading Usage] +The user of __sequence_facade__ derives his sequence type from a specialization of __sequence_facade__ and passes the derived sequence type as the first template parameter. The second template parameter should be the traversal category of the sequence being implemented. The 3rd parameter should be set to `mpl::true_` if the sequence is a view. + +The user must the implement the key expressions required by their sequence type. + +[table Parameters +[[Name][Description]] +[[`sequence`, `Seq`][A type derived from __sequence_facade__]] +[[`N`][An __mpl_integral_constant__]] +] + +[table Key Expressions +[[Expression][Result]] +[[`sequence::template begin<Seq>::type`][The type of an iterator to the beginning of a sequence of type `Seq`]] +[[`sequence::template begin<Seq>::call(seq)`][An iterator to the beginning of sequence `seq`]] +[[`sequence::template end<Seq>::type`][The type of an iterator to the end of a sequence of type `Seq`]] +[[`sequence::template end<Seq>::call(seq)`][An iterator to the end of sequence `seq`]] +[[`sequence::template size<Seq>::type`][The size of a sequence of type `Seq` as an __mpl_integral_constant__]] +[[`sequence::template size<Seq>::call(seq)`][The size of sequence `seq`]] +[[`sequence::template empty<Seq>::type`][Returns `mpl::true_` if `Seq` has zero elements, `mpl::false_` otherwise.]] +[[`sequence::template empty<Seq>::call`][Returns a type convertible to `bool` that evaluates to true if the sequence is empty, else, evaluates to false. ]] +[[`sequence::template at<Seq, N>::type`][The type of element `N` in a sequence of type `Seq`]] +[[`sequence::template at<Seq, N>::call(seq)`][Element `N` in sequence `seq`]] +[[`sequence::template value_at<Sequence, N>::type`][The type of the `N`th element in a sequence of type `Seq`]] +] + +[heading Include] + + #include <boost/fusion/sequence/sequence_facade.hpp> + #include <boost/fusion/include/sequence_facade.hpp> + +[heading Example] +A full working example using __sequence_facade__ is provided in triple.cpp in the extension examples. + +[endsect] + +[section Iterator Facade] + +[heading Description] +The __iterator_facade__ template provides an intrusive mechanism for +producing a conforming Fusion iterator. + +[heading Synopsis] + + template<typename Derived, typename TravesalTag> + struct iterator_facade; + +[heading Usage] +The user of iterator_facade derives his iterator type from a specialization of iterator_facade and passes the derived iterator type as the first template parameter. The second template parameter should be the traversal category of the iterator being implemented. + +The user must the implement the key expressions required by their iterator type. + +[table Parameters +[[Name][Description]] +[[`iterator`, `It`, `It1`, `It2`][A type derived from __iterator_facade__]] +[[`N`][An __mpl_integral_constant__]] +] + +[table Key Expressions +[[Expression][Result][Default]] +[[`iterator::template value_of<It>::type`][The element stored at iterator position `It`][None]] +[[`iterator::template deref<It>::type`][The type returned when dereferencing an iterator of type `It`][None]] +[[`iterator::template deref<It>::call(it)`][Dereferences iterator `it`][None]] +[[`iterator::template next<It>::type`][The type of the next element from `It`][None]] +[[`iterator::template next<It>::call(it)`][The next iterator after `it`][None]] +[[`iterator::template prior<It>::type`][The type of the next element from `It`][None]] +[[`iterator::template prior<It>::call(it)`][The next iterator after `it`][None]] +[[`iterator::template advance<It, N>::type`][The type of an iterator advanced `N` elements from `It`][Implemented in terms of `next` and `prior`]] +[[`iterator::template advance<It, N>::call(it)`][An iterator advanced `N` elements from `it`][Implemented in terms of `next` and `prior`]] +[[`iterator::template distance<It1, It2>::type`][The distance between iterators of type `It1` and `It2` as an __mpl_integral_constant__][None]] +[[`iterator::template distance<It1, It2>::call(it1, it2)`][The distance between iterator `it1` and `it2`][None]] +[[`iterator::template equal_to<It1, It2>::type`][Returns `mpl::true_` if `It1` is equal to `It2`, `mpl::false_` otherwise.][`boost::same_type<It1, It2>::type`]] +[[`iterator::template equal_to<It1, It2>::call(it1, it2)`][Returns a type convertible to `bool` that evaluates to `true` if `It1` is equal to `It2`, `false` otherwise.][`boost::same_type<It1, It2>::type()`]] +[[`iterator::template key_of<It>::type`][The key type associated with the element from `It`][None]] +[[`iterator::template value_of_data<It>::type`][The type of the data property associated with the element from `It`][None]] +[[`iterator::template deref_data<It>::type`][The type that will be returned by dereferencing the data property of the element from `It`][None]] +[[`iterator::template deref_data<It>::call(it)`][Deferences the data property associated with the element referenced by `it`][None]] +] + +[heading Header] + + #include <boost/fusion/iterator/iterator_facade.hpp> + #include <boost/fusion/include/iterator_facade.hpp> + +[heading Example] +A full working example using __iterator_facade__ is provided in triple.cpp in the extension examples. + +[endsect] + +[endsect] + diff --git a/libs/fusion/doc/functional.qbk b/libs/fusion/doc/functional.qbk new file mode 100644 index 000000000..d6b60b0c0 --- /dev/null +++ b/libs/fusion/doc/functional.qbk @@ -0,0 +1,1402 @@ +[/============================================================================== + Copyright (C) 2006 Tobias Schwinger + + Use, modification and distribution is 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) +===============================================================================/] +[section Functional] + +Components to call functions and function objects and to make Fusion code +callable through a function object interface. + +[heading Header] + + #include <boost/fusion/functional.hpp> + +[heading Fused and unfused forms] + +What is a function call? + + f (a,b,c) + +It is a name and a tuple written next to each other, left-to-right. + +Although the C++ syntax does not allow to replace [^(a,b,c)] with some Fusion +__sequence__, introducing yet another function provides a solution: + + invoke(f,my_sequence) + +Alternatively it is possible to apply a simple transformation to [^f] in order +to achieve the same effect: + + f tuple <=> ``f'`` (tuple) + +Now, [^f'] is an unary function that takes the arguments to `f` as a tuple; +[^f'] is the /fused/ form of `f`. +Reading the above equivalence right-to-left to get the inverse transformation, +`f` is the /unfused/ form of [^f']. + +[heading Calling functions and function objects] + +Having generic C++ code call back arbitrary functions provided by the client +used to be a heavily repetitive task, as different functions can differ in +arity, invocation syntax and other properties that might be part of the type. +Transporting arguments as Fusion sequences and factoring out the invocation +makes Fusion algorithms applicable to function arguments and also reduces +the problem to one invocation syntax and a fixed arity (instead of an arbitrary +number of arbitrary arguments times several syntactic variants times additional +properties). + +Transforming an unfused function into its fused counterpart allows n-ary +calls from an algorithm that invokes an unary __poly_func_obj__ with +__sequence__ arguments. + +The library provides several function templates to invoke different kinds of +functions and adapters to transform them into fused form, respectively. +Every variant has a corresponding generator function template that returns +an adapter instance for the given argument. + +Constructors can be called applying __boost_func_factory__. + +[heading Making Fusion code callable through a function object interface] + +Transforming a fused function into its unfused counterpart allows to create +function objects to accept arbitrary calls. In other words, an unary function +object can be implemented instead of (maybe heavily overloaded) function +templates or function call operators. + +The library provides both a strictly typed and a generic variant for this +transformation. The latter should be used in combination with +__boost_func_forward__ to attack __the_forwarding_problem__. + +Both variants have a corresponding generator function template that returns an +adapter instance for the given argument. + +[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ] + +[section Concepts] + + +[section:callable Callable Object] + +[heading Description] + +A pointer to a function, a pointer to member function, a pointer to member +data, or a class type whose objects can appear immediately to the left of a +function call operator. + +[heading Models] +* function pointer types +* member (function or data) pointer types +* all kinds of function objects + +[heading Examples] + + & a_free_function + & a_class::a_static_member_function + & a_class::a_nonstatic_data_member + & a_class::a_nonstatic_member_function + std::less<int>() + // using namespace boost; + bind(std::less<int>(), _1, 5) + lambda::_1 += lambda::_2; + fusion::__make_fused_function_object__(std::less<int>()) + + +[endsect] + + +[section:reg_callable Regular Callable Object] + +[heading Description] + +A non-member-pointer __callable_obj__ type: A pointer to a function or a class +type whose objects can appear immediately to the left of a function call operator. + +[heading Refinement of] +* __callable_obj__ + +[variablelist Notation + [[`F`][A possibly const qualified Deferred Callable Object type]] + [[`f`][An object or reference to an object of type F]] + [[`A1 ...AN`][Argument types]] + [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]] +] + +[heading Expression requirements] + +[table + [[Expression][Return Type][Runtime Complexity]] + [[`f(a1, ...aN)`][Unspecified][Unspecified]] +] + +[heading Models] +* function pointer types +* all kinds of function objects + +[heading Examples] + + & a_free_function + & a_class::a_static_member_function + std::less<int>() + // using namespace boost; + bind(std::less<int>(), _1, 5) + lambda::_1 += lambda::_2; + fusion::__make_fused_function_object__(std::less<int>()) + +[endsect] + + +[section:def_callable Deferred Callable Object] + +[heading Description] + +__callable_obj__ types that work with __boost_result_of__ to determine the +result of a call. + +[heading Refinement of] +* __callable_obj__ + +[blurb note Once C++ supports the [^decltype] keyword, all models of +__callable_obj__ will also be models of __def_callable_obj__, because +function objects won't need client-side support for `result_of`. +] + +[variablelist Notation + [[`F`][A possibly const qualified Deferred Callable Object type]] + [[`A1 ...AN`][Argument types]] + [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]] + [[`T1 ...TN`][`T`i is `A`i `&` if `a`i is an __lvalue__, same as `A`i, otherwise]] +] + +[heading Expression requirements] + +[table + [[Expression][Type]] + [[__boost_result_of_call__`< F(T1 ...TN) >::type`][Result of a call with `A1 ...AN`-typed arguments]] +] + +[heading Models] +* __poly_func_obj__ types +* member (function or data) pointer types + +[heading Examples] + + & a_free_function + & a_class::a_static_member_function + & a_class::a_nonstatic_data_member + & a_class::a_nonstatic_member_function + std::less<int>() + // using namespace boost; + bind(std::less<int>(), _1, 5) + // Note: Boost.Lambda expressions don't work with __boost_result_of__ + fusion::__make_fused_function_object__(std::less<int>()) + +[endsect] + + +[section:poly Polymorphic Function Object] + +[heading Description] + +A non-member-pointer __def_callable_obj__ type. + +[heading Refinement of] +* __reg_callable_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`F`][A possibly const-qualified Polymorphic Function Object type]] + [[`f`][An object or reference to an object of type F]] + [[`A1 ...AN`][Argument types]] + [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]] + [[`T1 ...TN`][`T`i is `A`i `&` if `a`i is an __lvalue__, same as `A`i, otherwise]] +] + +[heading Expression requirements] + +[table + [[Expression][Return Type][Runtime Complexity]] + [[`f(a1, ...aN)`][`result_of< F(T1, ...TN) >::type`][Unspecified]] +] + +[heading Models] +* function pointers +* function objects of the Standard Library +* all Fusion __functional_adapters__ + +[heading Examples] + + & a_free_function + & a_class::a_static_member_function + std::less<int>() + // using namespace boost; + bind(std::less<int>(), _1, 5) + // Note: Boost.Lambda expressions don't work with __boost_result_of__ + fusion::__make_fused_function_object__(std::less<int>()) + +[endsect] + + +[endsect] + +[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ] + +[section Invocation] + +[section Functions] + +[section invoke] + +[heading Description] + +Calls a __def_callable_obj__ with the arguments from a __sequence__. + +The first template parameter can be specialized explicitly to avoid copying +and/or to control the const qualification of a function object. + +If the target function is a pointer to a class members, the corresponding +object can be specified as a reference, pointer, or smart pointer. +In case of the latter, a freestanding [^get_pointer] function must be +defined (Boost provides this function for [^std::auto_ptr] and +__boost_shared_ptr_call__). + +Constructors can be called applying __boost_func_factory__. + +[heading Synopsis] + template< + typename Function, + class Sequence + > + typename __result_of_invoke__<Function, Sequence>::type + invoke(Function f, Sequence & s); + + template< + typename Function, + class Sequence + > + typename __result_of_invoke__<Function, Sequence const>::type + invoke(Function f, Sequence const & s); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [A __def_callable_obj__] [The function to call.]] + [[`s`] [A __forward_sequence__] [The arguments.]] +] + +[heading Expression Semantics] + + invoke(f,s); + +[*Return type]: Return type of `f` when invoked with the elements in `s` as its +arguments. + +[*Semantics]: Invokes `f` with the elements in `s` as arguments and returns +the result of the call expression. + +[heading Header] + + #include <boost/fusion/functional/invocation/invoke.hpp> + +[heading Example] + __std_plus_doc__<int> add; + assert(invoke(add,__make_vector__(1,1)) == 2); + +[heading See also] +* __invoke_procedure__ +* __invoke_function_object__ +* __result_of_invoke__ +* __fused__ +* __make_fused__ + +[endsect] + +[section:invoke_proc invoke_procedure] + +[heading Description] + +Calls a __callable_obj__ with the arguments from a __sequence__. The result +of the call is ignored. + +The first template parameter can be specialized explicitly to avoid copying +and/or to control the const qualification of a function object. + +For pointers to class members corresponding object can be specified as +a reference, pointer, or smart pointer. In case of the latter, a freestanding +[^get_pointer] function must be defined (Boost provides this function for +[^std::auto_ptr] and __boost_shared_ptr_call__). + +The target function must not be a pointer to a member object (dereferencing +such a pointer without returning anything does not make sense, so it isn't +implemented). + +[heading Synopsis] + template< + typename Function, + class Sequence + > + typename __result_of_invoke_procedure__<Function, Sequence>::type + invoke_procedure(Function f, Sequence & s); + + template< + typename Function, + class Sequence + > + typename __result_of_invoke_procedure__<Function, Sequence const>::type + invoke_procedure(Function f, Sequence const & s); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __callable_obj__] [The function to call.]] + [[`s`] [Model of __forward_sequence__] [The arguments.]] +] + +[heading Expression Semantics] + + invoke_procedure(f,s); + +[*Return type]: `void` + +[*Semantics]: Invokes `f` with the elements in `s` as arguments. + +[heading Header] + + #include <booost/fusion/functional/invocation/invoke_procedure.hpp> + +[heading Example] + __vector__<int,int> v(1,2); + using namespace boost::lambda; + invoke_procedure(_1 += _2, v); + assert(__front__(v) == 3); + +[heading See also] +* __invoke__ +* __invoke_function_object__ +* __result_of_invoke_procedure__ +* __fused_procedure__ +* __make_fused_procedure__ + +[endsect] + +[section:invoke_fobj invoke_function_object] + +[heading Description] + +Calls a __poly_func_obj__ with the arguments from a __sequence__. + +The first template parameter can be specialized explicitly to avoid copying +and/or to control the const qualification of a function object. + +Constructors can be called applying __boost_func_factory__. + +[heading Synopsis] + template< + typename Function, + class Sequence + > + typename __result_of_invoke_function_object__<Function, Sequence>::type + invoke_function_object(Function f, Sequence & s); + + template< + typename Function, + class Sequence + > + typename __result_of_invoke_function_object__<Function, Sequence const>::type + invoke_function_object(Function f, Sequence const & s); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __poly_func_obj__] [The function object to call.]] + [[`s`] [Model of __forward_sequence__] [The arguments.]] +] + +[heading Expression Semantics] + + invoke_function_object(f,s); + +[*Return type]: Return type of `f` when invoked with the elements in `s` as its +arguments. + +[*Semantics]: Invokes `f` with the elements in `s` as arguments and returns the +result of the call expression. + +[heading Header] + + #include <boost/fusion/functional/invocation/invoke_function_object.hpp> + +[heading Example] + struct sub + { + template <typename Sig> + struct result; + + template <class Self, typename T> + struct result< Self(T,T) > + { typedef typename remove_reference<T>::type type; }; + + template<typename T> + T operator()(T lhs, T rhs) const + { + return lhs - rhs; + } + }; + + void try_it() + { + sub f; + assert(f(2,1) == invoke_function_object(f,__make_vector__(2,1))); + } + +[heading See also] +* __invoke__ +* __invoke_procedure__ +* __result_of_invoke_function_object__ +* __fused_function_object__ +* __make_fused_function_object__ + +[endsect] + +[endsect] [/ Functions] + +[section Metafunctions] + +[section invoke] + +[heading Description] +Returns the result type of __invoke__. + +[heading Synopsis] + namespace result_of + { + template< + typename Function, + class Sequence + > + struct invoke + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __invoke__ +* __fused__ + +[endsect] + +[section:invoke_proc invoke_procedure] + +[heading Description] +Returns the result type of __invoke_procedure__. + +[heading Synopsis] + namespace result_of + { + template< + typename Function, + class Sequence + > + struct invoke_procedure + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __invoke_procedure__ +* __fused_procedure__ + +[endsect] + +[section:invoke_fobj invoke_function_object] + +[heading Description] +Returns the result type of __invoke_function_object__. + +[heading Synopsis] + namespace result_of + { + template< + class Function, + class Sequence + > + struct invoke_function_object + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __invoke_function_object__ +* __fused_function_object__ + +[endsect] + +[endsect] [/ Metafunctions ] + +[section Limits] + +[heading Header] + + #include <boost/fusion/functional/invocation/limits.hpp> + +[heading Macros] + +The following macros can be defined to change the maximum arity. +The default is 6. + +* BOOST_FUSION_INVOKE_MAX_ARITY +* BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY +* BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY + +[endsect] + +[endsect] [/ Invocation ] + +[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ] + +[section:adapters Adapters] + +Function object templates to transform a particular target function. + +[section fused] + +[heading Description] + +An unary __poly_func_obj__ adapter template for __def_callable_obj__ target +functions. It takes a __forward_sequence__ that contains the arguments for the +target function. + +The type of the target function is allowed to be const qualified or a +reference. Const qualification is preserved and propagated appropriately +(in other words, only const versions of [^operator()] can be used for a +target function object that is const or, if the target function object +is held by value, the adapter is const - these semantics have nothing to +do with the const qualification of a member function, which is referring +to the type of object pointed to by [^this] which is specified with the +first element in the sequence passed to the adapter). + +If the target function is a pointer to a class members, the corresponding +object can be specified as a reference, pointer, or smart pointer. +In case of the latter, a freestanding [^get_pointer] function must be +defined (Boost provides this function for [^std::auto_ptr] and +__boost_shared_ptr_call__). + +[heading Header] + + #include <boost/fusion/functional/adapter/fused.hpp> + +[heading Synopsis] + template <typename Function> + class fused; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Function`] [A __def_callable_obj__] []] +] + +[heading Model of] + +* __poly_func_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`R`] [A possibly const qualified __def_callable_obj__ type or reference type thereof]] + [[`r`] [An object convertible to `R`]] + [[`s`] [A __sequence__ of arguments that are accepted by `r`]] + [[`f`] [An instance of `fused<R>`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`fused<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]] + [[`fused<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]] + [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]] +] + +[heading Example] + fused< __std_plus_doc__<long> > f; + assert(f(__make_vector__(1,2l)) == 3l); + +[heading See also] + +* __fused_procedure__ +* __fused_function_object__ +* __invoke__ +* __make_fused__ +* __deduce__ + +[endsect] + +[section fused_procedure] + +[heading Description] + +An unary __poly_func_obj__ adapter template for __callable_obj__ target +functions. It takes a __forward_sequence__ that contains the arguments for +the target function. + +The result is discared and the adapter's return type is `void`. + +The type of the target function is allowed to be const qualified or a +reference. Const qualification is preserved and propagated appropriately +(in other words, only const versions of [^operator()] can be used for a +target function object that is const or, if the target function object +is held by value, the adapter is const - these semantics have nothing to +do with the const qualification of a member function, which is referring +to the type of object pointed to by [^this] which is specified with the +first element in the sequence passed to the adapter). + +If the target function is a pointer to a members function, the corresponding +object can be specified as a reference, pointer, or smart pointer. +In case of the latter, a freestanding [^get_pointer] function must be +defined (Boost provides this function for [^std::auto_ptr] and +__boost_shared_ptr_call__). + +The target function must not be a pointer to a member object (dereferencing +such a pointer without returning anything does not make sense, so this case +is not implemented). + +[heading Header] + + #include <boost/fusion/functional/adapter/fused_procedure.hpp> + +[heading Synopsis] + template <typename Function> + class fused_procedure; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Function`] [__callable_obj__ type] []] +] + +[heading Model of] + +* __poly_func_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`R`] [A possibly const qualified __callable_obj__ type or reference type thereof]] + [[`r`] [An object convertible to `R`]] + [[`s`] [A __sequence__ of arguments that are accepted by `r`]] + [[`f`] [An instance of `fused<R>`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`fused_procedure<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]] + [[`fused_procedure<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]] + [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]] +] + +[heading Example] + template<class SequenceOfSequences, class Func> + void n_ary_for_each(SequenceOfSequences const & s, Func const & f) + { + __for_each__(__zip_view__<SequenceOfSequences>(s), + fused_procedure<Func const &>(f)); + } + + void try_it() + { + __vector__<int,float> a(2,2.0f); + __vector__<int,float> b(1,1.5f); + using namespace boost::lambda; + n_ary_for_each(__vector_tie__(a,b), _1 -= _2); + assert(a == __make_vector__(1,0.5f)); + } + +[heading See also] + +* __fused__ +* __fused_function_object__ +* __invoke_procedure__ +* __make_fused_procedure__ + +[endsect] + +[section fused_function_object] + +[heading Description] + +An unary __poly_func_obj__ adapter template for a __poly_func_obj__ target +function. It takes a __forward_sequence__ that contains the arguments for the +target function. + +The type of the target function is allowed to be const qualified or a +reference. Const qualification is preserved and propagated appropriately +(in other words, only const versions of [^operator()] can be used for an +target function object that is const or, if the target function object +is held by value, the adapter is const). + +[heading Header] + + #include <boost/fusion/functional/adapter/fused_function_object.hpp> + +[heading Synopsis] + template <class Function> + class fused_function_object; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Function`] [__poly_func_obj__ type] []] +] + +[heading Model of] + +* __poly_func_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`R`] [A possibly const qualified __poly_func_obj__ type or reference type thereof]] + [[`r`] [An object convertible to `R`]] + [[`s`] [A __sequence__ of arguments that are accepted by `r`]] + [[`f`] [An instance of `fused<R>`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`fused_function_object<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]] + [[`fused_function_object<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]] + [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]] +] + +[heading Example] + template<class SeqOfSeqs, class Func> + typename __result_of_transform__< zip_view<SeqOfSeqs> const, + fused_function_object<Func const &> >::type + n_ary_transform(SeqOfSeqs const & s, Func const & f) + { + return __transform__(zip_view<SeqOfSeqs>(s), + fused_function_object<Func const &>(f)); + } + + struct sub + { + template <typename Sig> + struct result; + + template <class Self, typename T> + struct result< Self(T,T) > + { typedef typename remove_reference<T>::type type; }; + + template<typename T> + T operator()(T lhs, T rhs) const + { + return lhs - rhs; + } + }; + + void try_it() + { + __vector__<int,float> a(2,2.0f); + __vector__<int,float> b(1,1.5f); + __vector__<int,float> c(1,0.5f); + assert(c == n_ary_transform(__vector_tie__(a,b), sub())); + } + +[heading See also] + +* __fused__ +* __fused_procedure__ +* __invoke_function_object__ +* __make_fused_function_object__ +* __deduce__ + +[endsect] + + +[section unfused] + +[heading Description] + +An n-ary __poly_func_obj__ adapter template for an unary __poly_func_obj__ +target function. When called, its arguments are bundled to a +__random_access_sequence__ of references that is passed to the target function +object. + +The nullary overload of the call operator can be removed by setting the +second template parameter to `false`, which is very useful if the result type +computation would result in a compile error, otherwise (nullary call +operator's prototypes can't be templates and thus are instantiated as early +as the class template). + +Only __lvalue__ arguments are accepted. To overcome this limitation, apply +__boost_func_forward__. + +The type of the target function is allowed to be const qualified or a +reference. Const qualification is preserved and propagated appropriately. +In other words, only const versions of [^operator()] can be used if +the target function object is const - or, in case the target function +object is held by value, the adapter is const. + +[heading Header] + + #include <boost/fusion/functional/adapter/unfused.hpp> + +[heading Synopsis] + template <class Function, bool AllowNullary = true> + class unfused; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Function`] [A unary __poly_func_obj__] []] + [[`AllowNullary`] [Boolean constant] [true]] +] + +[heading Model of] + +* __poly_func_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`F`] [A possibly const qualified, unary __poly_func_obj__ type or reference type thereof]] + [[`f`] [An object convertible to `F`]] + [[`UL`] [The type `unfused<F>`]] + [[`ul`] [An instance of `UL`, initialized with `f`]] + [[`a0`...`aN`] [Arguments to `ul`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`UL(f)`] [Creates a fused function as described above, initializes the target function with `f`.]] + [[`UL()`] [Creates a fused function as described above, attempts to use `F`'s default constructor.]] + [[`ul(a0`...`aN)`] [Calls `f` with a __sequence__ that contains references to the arguments `a0`...`aN`.]] +] + +[heading Example] + struct fused_incrementer + { + template <class Seq> + struct result + { + typedef void type; + }; + + template <class Seq> + void operator()(Seq const & s) const + { + __for_each__(s,++boost::lambda::_1); + } + }; + + void try_it() + { + unfused<fused_incrementer> increment; + int a = 2; char b = 'X'; + increment(a,b); + assert(a == 3 && b == 'Y'); + } + +[heading See also] +* __unfused_typed__ +* __make_unfused__ + +[endsect] + +[section unfused_typed] + +[heading Description] + +An n-ary __poly_func_obj__ adapter template for an unary __poly_func_obj__ +target function. When called, its arguments are bundled to a +__random_access_sequence__ that is passed to the target function object. + +The call operators of esulting function objects are strictly typed +(in other words, non-templatized) with the types from a __sequence__. + +The type of the target function is allowed to be const qualified or a +reference. Const qualification is preserved and propagated appropriately +(in other words, only const versions of [^operator()] can be used if +the target function object is const - or, in case the target function object +is held by value, the adapter is const). + +[blurb __note__ For Microsoft Visual C++ 7.1 (Visual Studio 2003) the detection +of the Function Object's const qualification easily causes an internal error. +Therefore the adapter is always treated as if it was const. ] + +[blurb __tip__ If the type sequence passed to this template contains +non-reference elements, the element is copied only once - the call operator's +signature is optimized automatically to avoid by-value parameters.] + +[heading Header] + + #include <boost/fusion/functional/adapter/unfused_typed.hpp> + +[heading Synopsis] + template <class Function, class Sequence> + class unfused_typed; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Function`] [A unary __poly_func_obj__] []] + [[`Sequence`] [A __sequence__] []] +] + +[heading Model of] + +* __poly_func_obj__ +* __def_callable_obj__ + +[variablelist Notation + [[`F`] [A possibly const qualified, unary __poly_func_obj__ type or reference type thereof]] + [[`f`] [An object convertible to `F`]] + [[`S`] [A __sequence__ of parameter types]] + [[`UT`] [The type `unfused_typed<F,S>`]] + [[`ut`] [An instance of `UT`, initialized with `f`]] + [[`a0`...`aN`] [Arguments to `ut`, convertible to the types in `S`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`UT(f)`] [Creates a fused function as described above, initializes the target function with `f`.]] + [[`UT()`] [Creates a fused function as described above, attempts to use `F`'s default constructor.]] + [[`ut(a0`...`aN)`] [Calls `f` with an instance of `S` (or a subsequence of `S` starting at the first element, + if fewer arguments are given and the overload hasn't been disabled) initialized with + `a0`...`aN`.]] +] + +[heading Example] + struct add_assign // applies operator+= + { + typedef void result_type; // for simplicity + + template <typename T> + void operator()(T & lhs, T const & rhs) const + { + lhs += rhs; + } + }; + + template <class Tie> + class fused_parallel_adder + { + Tie tie_dest; + public: + explicit fused_parallel_adder(Tie const & dest) + : tie_dest(dest) + { } + + typedef void result_type; + + template <class Seq> + void operator()(Seq const & s) const + { + for_each( zip(tie_dest,s), fused<add_assign>() ); + } + }; + + // accepts a tie and creates a typed function object from it + struct fused_parallel_adder_maker + { + template <typename Sig> + struct result; + + template <class Self, class Seq> + struct result< Self(Seq) > + { + typedef typename remove_reference<Seq>::type seq; + + typedef unfused_typed< fused_parallel_adder<seq>, + typename mpl::transform<seq, remove_reference<_> >::type > type; + }; + + template <class Seq> + typename result< void(Seq) >::type operator()(Seq const & tie) + { + return typename result< void(Seq) >::type( + fused_parallel_adder<Seq>(tie) ); + } + }; + unfused<fused_parallel_adder_maker> parallel_add; + + void try_it() + { + int a = 2; char b = 'X'; + // the second call is strictly typed with the types deduced from the + // first call + parallel_add(a,b)(3,2); + parallel_add(a,b)(3); + parallel_add(a,b)(); + assert(a == 8 && b == 'Z'); + } + +[heading See also] +* __unfused__ +* __deduce__ +* __deduce_sequence__ + +[endsect] + +[section Limits] + +[heading Header] + + #include <boost/fusion/functional/adapter/limits.hpp> + +[heading Macros] + +The following macros can be defined to change the maximum arity. +The value used for these macros must not exceed `FUSION_MAX_VECTOR_SIZE`. +The default is 6. + +* BOOST_FUSION_UNFUSED_MAX_ARITY +* BOOST_FUSION_UNFUSED_TYPE_MAX_ARITY + +[endsect] + +[endsect] [/ Adapters] + +[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ] + +[section Generation] + +[section Functions] + +[section:mk_fused make_fused] + +[heading Description] +Creates a __fused__ adapter for a given __def_callable_obj__. The usual +__element_conversion__ is applied to the target function. + +[heading Synopsis] + template <typename F> + inline typename __result_of_make_fused__<F>::type + make_fused(F const & f); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __def_callable_obj__] [The function to transform.]] +] + +[heading Expression Semantics] + + make_fused(f); + +[*Return type]: A specialization of __fused__. + +[*Semantics]: Returns a __fused__ adapter for `f`. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused.hpp> + #include <boost/fusion/include/make_fused.hpp> + +[heading Example] + float sub(float a, float b) { return a - b; } + + void try_it() + { + __vector__<int,float> a(2,2.0f); + __vector__<int,float> b(1,1.5f); + __vector__<float,float> c(1.0f,0.5f); + assert(c == __transform__(__zip__(a,b), make_fused(& sub))); + assert(c == __transform__(__zip__(a,b), make_fused(__std_minus_doc__<float>()))); + } + +[heading See also] +* __fused__ +* __deduce__ +* __result_of_make_fused__ + +[endsect] + +[section:mk_fused_proc make_fused_procedure] + +[heading Description] +Creates a __fused_procedure__ adapter for a given __def_callable_obj__. +The usual __element_conversion__ applied to the target function. + +[heading Synopsis] + template <typename F> + inline typename __result_of_make_fused_procedure__<F>::type + make_fused_procedure(F const & f); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __callable_obj__] [The function to transform.]] +] + +[heading Expression Semantics] + + make_fused_procedure(f); + +[*Return type]: A specialization of __fused_procedure__. + +[*Semantics]: Returns a __fused_procedure__ adapter for `f`. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused_procedure.hpp> + #include <boost/fusion/include/make_fused_procedure.hpp> + +[heading Example] + __vector__<int,int,int> v(1,2,3); + using namespace boost::lambda; + make_fused_procedure(_1 += _2 - _3)(v); + assert(__front__(v) == 0); + +[heading See also] +* __fused_procedure__ +* __deduce__ +* __result_of_make_fused_procedure__ + +[endsect] + +[section:mk_fused_fobj make_fused_function_object] + +[heading Description] +Creates a __fused_function_object__ adapter for a given __def_callable_obj__. +The usual __element_conversion__ is applied to the target function. + +[heading Synopsis] + template <typename F> + inline typename __result_of_make_fused_function_object__<F>::type + make_fused_function_object(F const & f); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __poly_func_obj__] [The function to transform.]] +] + +[heading Expression Semantics] + + make_fused_function_object(f); + +[*Return type]: A specialization of __fused_function_object__. + +[*Semantics]: Returns a __fused_function_object__ adapter for `f`. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused_function_object.hpp> + #include <boost/fusion/include/make_fused_function_object.hpp> + +[heading Example] + struct sub + { + template <typename Sig> + struct result; + + template <class Self, typename T> + struct result< Self(T,T) > + { typedef typename remove_reference<T>::type type; }; + + template<typename T> + T operator()(T lhs, T rhs) const + { + return lhs - rhs; + } + }; + + void try_it() + { + __vector__<int,float> a(2,2.0f); + __vector__<int,float> b(1,1.5f); + __vector__<int,float> c(1,0.5f); + assert(c == __transform__(__zip__(a,b), make_fused_function_object(sub()))); + } + +[heading See also] +* __fused_function_object__ +* __deduce__ +* __result_of_make_fused_function_object__ + +[endsect] + +[section:mk_unfused make_unfused] + +[heading Description] +Creates a __unfused__ adapter for a given, unary __poly_func_obj__. +The usual __element_conversion__ is applied to the target function. + +[heading Synopsis] + template <typename F> + inline typename __result_of_make_unfused__<F>::type + make_unfused(F const & f); + +[heading Parameters] +[table + [[Parameter] [Requirement] [Description]] + [[`f`] [Model of __poly_func_obj__] [The function to transform.]] +] + +[heading Expression Semantics] + + make_unfused(f); + +[*Return type]: A specialization of __unfused__. + +[*Semantics]: Returns a __unfused__ adapter for `f`. + +[heading Header] + + #include <boost/fusion/functional/generation/make_unfused.hpp> + #include <boost/fusion/include/make_unfused.hpp> + +[heading Example] + struct fused_incrementer + { + template <class Seq> + struct result + { + typedef void type; + }; + + template <class Seq> + void operator()(Seq const & s) const + { + __for_each__(s,++boost::lambda::_1); + } + }; + + void try_it() + { + int a = 2; char b = 'X'; + make_unfused(fused_incrementer())(a,b); + assert(a == 3 && b == 'Y'); + } + +[heading See also] +* __unfused__ +* __deduce__ +* __result_of_make_unfused__ + +[endsect] + +[endsect] [/ Functions] + +[section Metafunctions] + +[section:mk_fused make_fused] + +[heading Description] +Returns the result type of __make_fused__. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused.hpp> + #include <boost/fusion/include/make_fused.hpp> + +[heading Synopsis] + namespace result_of + { + template<typename Function> + struct make_fused + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __make_fused__ + +[endsect] + +[section:mk_fused_proc make_fused_procedure] + +[heading Description] +Returns the result type of __make_fused_procedure__. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused_procedure.hpp> + #include <boost/fusion/include/make_fused_procedure.hpp> + +[heading Synopsis] + namespace result_of + { + template<typename Function> + struct make_fused_procedure + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __make_fused_procedure__ + +[endsect] + +[section:mk_fused_fobj make_fused_function_object] + +[heading Description] +Returns the result type of __make_fused_function_object__. + +[heading Header] + + #include <boost/fusion/functional/generation/make_fused_function_object.hpp> + #include <boost/fusion/include/make_fused_function_object.hpp> + +[heading Synopsis] + namespace result_of + { + template<typename Function> + struct make_fused_function_object + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __make_fused_function_object__ + +[endsect] + +[section:mk_unfused make_unfused] + +[heading Description] +Returns the result type of __make_unfused__. + +[heading Header] + + #include <boost/fusion/functional/generation/make_unfused.hpp> + #include <boost/fusion/include/make_unfused.hpp> + +[heading Synopsis] + namespace result_of + { + template<typename Function> + struct make_unfused + { + typedef __unspecified__ type; + }; + } + +[heading See also] +* __make_unfused__ + +[endsect] + +[endsect] [/ Metafunctions] + +[endsect] [/ Generation] + +[endsect] [/ Functional ] diff --git a/libs/fusion/doc/fusion.qbk b/libs/fusion/doc/fusion.qbk new file mode 100644 index 000000000..ce4e59736 --- /dev/null +++ b/libs/fusion/doc/fusion.qbk @@ -0,0 +1,353 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2010 Christopher Schmidt + + Use, modification and distribution is 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) +===============================================================================/] +[library Fusion + [quickbook 1.3] + [version 2.1] + [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]] + [copyright 2001 2002 2003 2004 2005 2006 2011 2012 Joel de Guzman, Dan Marsden, Tobias Schwinger] + [purpose Statically Typed Heterogeneous Data Structures and Algorithms] + [license + 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]) + ] +] + +[def __note__ [$images/note.png]] +[def __alert__ [$images/alert.png]] +[def __tip__ [$images/tip.png]] +[def __caution__ [$images/caution.png]] + +[def __spirit__ [@http://spirit.sourceforge.net Spirit]] +[def __phoenix__ [@http://boost.org/libs/spirit/phoenix/index.html Phoenix]] +[def __mpl__ [@http://www.boost.org/libs/mpl/index.html MPL]] +[def __stl__ [@http://en.wikipedia.org/wiki/Standard_Template_Library STL]] +[def __tuple__ [@http://www.boost.org/libs/tuple/doc/tuple_users_guide.html Boost.Tuple]] +[def __tr1__tuple__ [@http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf TR1 Tuple]] +[def __boost_tools__ [@http://www.boost.org/tools/index.html Boost Tools]] +[def __spirit_list__ [@https://lists.sourceforge.net/lists/listinfo/spirit-general Spirit Mailing List]] +[def __spirit_general__ [@news://news.gmane.org/gmane.comp.spirit.general Spirit General NNTP news portal]] +[def __gmane__ [@http://www.gmane.org Gmane]] +[def __mlist_archive__ [@http://news.gmane.org/gmane.comp.parsers.spirit.general]] +[def __jaakko_jarvi__ [@http://www.boost.org/people/jaakko_jarvi.htm Jaakko Jarvi]] +[def __david_abrahams__ [@http://www.boost.org/people/dave_abrahams.htm David Abrahams]] +[def __the_forwarding_problem__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm The Forwarding Problem]] + +[def __boost_any__ [@http://boost.org/doc/html/any.html Boost.Any]] +[def __new_iterator_concepts__ [@http://boost.org/libs/iterator/doc/new-iter-concepts.html New Iterator Concepts]] +[def __boost_array_library__ [@http://www.boost.org/doc/html/array.html Boost.Array Library]] +[def __boost_variant_library__ [@http://www.boost.org/doc/html/variant.html Boost.Variant Library]] +[def __boost_tuple_library__ [@http://www.boost.org/libs/tuple/doc/tuple_users_guide.html Boost.Tuple Library]] +[def __boost_ref__ [@http://www.boost.org/doc/html/ref.html Boost.Ref]] +[def __boost_ref_call__ [@http://www.boost.org/doc/html/ref.html `ref`]] +[def __boost_result_of__ [@http://www.boost.org/libs/utility/utility.htm#result_of Boost.ResultOf]] +[def __boost_result_of_call__ [@http://www.boost.org/libs/utility/utility.htm#result_of `boost::result_of`]] +[def __boost_enable_if__ [@http://www.boost.org/libs/utility/enable_if.html Boost.EnableIf utility]] +[def __boost_shared_ptr_call__ [@http://www.boost.org/libs/smart_ptr/shared_ptr.htm `boost::shared_ptr`]] +[def __boost_func_forward__ [@http://www.boost.org/libs/functional/forward/doc/html/index.html Boost.Functional/Forward]] +[def __boost_func_factory__ [@http://www.boost.org/libs/functional/factory/doc/html/index.html Boost.Functional/Factory]] +[def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]] +[def __std_plus_doc__ [@http://www.sgi.com/tech/stl/plus.html `std::plus`]] +[def __std_minus_doc__ [@http://www.sgi.com/tech/stl/minus.html `std::minus`]] + +[def __mpl_integral_constant__ [@http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html MPL Integral Constant]] +[def __mpl_boolean_constant__ [@http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html MPL Boolean Constant]] +[def __mpl_metafunction_class__ [@http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html MPL Metafunction Class]] +[def __mpl_lambda_expression__ [@http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html MPL Lambda Expression]] + +[def __lvalue__ LValue] +[def __unspecified__ /unspecified/] + +[def __support__ [link fusion.support Support]] +[def __is_sequence__ [link fusion.support.is_sequence `is_sequence`]] +[def __is_view__ [link fusion.support.is_view `is_view`]] +[def __tag_of__ [link fusion.support.tag_of `tag_of`]] +[def __category_of__ [link fusion.support.category_of `category_of`]] +[def __deduce__ [link fusion.support.deduce `deduce`]] +[def __deduce_sequence__ [link fusion.support.deduce_sequence `deduce_sequence`]] +[def __fusion_pair__ [link fusion.support.pair `fusion::pair`]] +[def __pair__ [link fusion.support.pair `pair`]] +[def __fusion_make_pair__ [link fusion.support.pair `make_pair`]] + +[def __iterator__ [link fusion.iterator Iterator]] +[def __iterator_concepts__ [link fusion.iterator.concepts Iterator Concepts]] +[def __forward_iterator__ [link fusion.iterator.concepts.forward_iterator Forward Iterator]] +[def __bidirectional_iterator__ [link fusion.iterator.concepts.bidirectional_iterator Bidirectional Iterator]] +[def __random_access_iterator__ [link fusion.iterator.concepts.random_access_iterator Random Access Iterator]] +[def __associative_iterator__ [link fusion.iterator.concepts.associative_iterator Associative Iterator]] + +[def __next__ [link fusion.iterator.functions.next `next`]] +[def __prior__ [link fusion.iterator.functions.prior `prior`]] +[def __advance__ [link fusion.iterator.functions.advance `advance`]] +[def __advance_c__ [link fusion.iterator.functions.advance_c `advance_c`]] +[def __distance__ [link fusion.iterator.functions.distance `distance`]] +[def __deref__ [link fusion.iterator.functions.deref `deref`]] +[def __deref_data__ [link fusion.iterator.functions.deref_data `deref_data`]] + +[def __result_of_next__ [link fusion.iterator.metafunctions.next `result_of::next`]] +[def __result_of_prior__ [link fusion.iterator.metafunctions.prior `result_of::prior`]] +[def __result_of_equal_to__ [link fusion.iterator.metafunctions.equal_to `result_of::equal_to`]] +[def __result_of_advance__ [link fusion.iterator.metafunctions.advance `result_of::advance`]] +[def __result_of_advance_c__ [link fusion.iterator.metafunctions.advance_c `result_of::advance_c`]] +[def __result_of_distance__ [link fusion.iterator.metafunctions.distance `result_of::distance`]] +[def __result_of_deref__ [link fusion.iterator.metafunctions.deref `result_of::deref`]] +[def __result_of_value_of__ [link fusion.iterator.metafunctions.value_of `result_of::value_of`]] +[def __result_of_key_of__ [link fusion.iterator.metafunctions.key_of `result_of::key_of`]] +[def __result_of_value_of_data__ [link fusion.iterator.metafunctions.value_of_data `result_of::value_of_data`]] +[def __result_of_deref_data__ [link fusion.iterator.metafunctions.deref_data `result_of::deref_data`]] + +[def __sequence__ [link fusion.sequence Sequence]] +[def __sequence_concepts__ [link fusion.sequence.concepts Sequence Concepts]] +[def __traversal_concept__ [link fusion.sequence.concepts.traversal Sequence Traversal Concept]] +[def __associativity_concept__ [link fusion.sequence.concepts.associativity Sequence Associativity Concept]] +[def __forward_sequence__ [link fusion.sequence.concepts.forward_sequence Forward Sequence]] +[def __bidirectional_sequence__ [link fusion.sequence.concepts.bidirectional_sequence Bidirectional Sequence]] +[def __random_access_sequence__ [link fusion.sequence.concepts.random_access_sequence Random Access Sequence]] +[def __associative_sequence__ [link fusion.sequence.concepts.associative_sequence Associative Sequence]] + +[def __containers__ [link fusion.container Container]] +[def __vector__ [link fusion.container.vector `vector`]] +[def __cons__ [link fusion.container.cons `cons`]] +[def __list__ [link fusion.container.list `list`]] +[def __deque__ [link fusion.container.deque `deque`]] +[def __front_extended_deque__ [link fusion.container.front_extended_deque `front_extended_deque`]] +[def __back_extended_deque__ [link fusion.container.back_extended_deque `back_extended_deque`]] +[def __set__ [link fusion.container.set `set`]] +[def __map__ [link fusion.container.map `map`]] + +[def __view__ [link fusion.view View]] +[def __views__ [link fusion.view Views]] +[def __single_view__ [link fusion.view.single_view `single_view`]] +[def __filter_view__ [link fusion.view.filter_view `filter_view`]] +[def __iterator_range__ [link fusion.view.iterator_range `iterator_range`]] +[def __joint_view__ [link fusion.view.joint_view `joint_view`]] +[def __transform_view__ [link fusion.view.transform_view `transform_view`]] +[def __reverse_view__ [link fusion.view.reverse_view `reverse_view`]] +[def __zip_view__ [link fusion.view.zip_view `zip_view`]] + +[def __array__ [link fusion.adapted.array array]] +[def __std_pair__ [link fusion.adapted.std__pair `std::pair`]] +[def __boost_array__ [link fusion.adapted.boost__array `boost::array`]] +[def __mpl_sequence__ [link fusion.adapted.mpl_sequence mpl sequence]] +[def __adapt_tpl_struct__ [link fusion.adapted.adapt_tpl_struct `BOOST_FUSION_ADAPT_TPL_STRUCT`]] +[def __adapt_struct_named__ [link fusion.adapted.adapt_struct_named `BOOST_FUSION_ADAPT_STRUCT_NAMED`]] +[def __adapt_struct_named_ns__ [link fusion.adapted.adapt_struct_named `BOOST_FUSION_ADAPT_STRUCT_NAMED_NS`]] +[def __adapt_assoc_tpl_struct__ [link fusion.adapted.adapt_assoc_tpl_struct `BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT`]] +[def __adapt_assoc_struct_named__ [link fusion.adapted.adapt_assoc_struct_named `BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED`]] +[def __adapt_assoc_struct_named_ns__ [link fusion.adapted.adapt_assoc_struct_named `BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS`]] +[def __adapt_adt__ [link fusion.adapted.adapt_adt `BOOST_FUSION_ADAPT_ADT`]] +[def __adapt_tpl_adt__ [link fusion.adapted.adapt_tpl_adt `BOOST_FUSION_ADAPT_TPL_ADT`]] +[def __adapt_assoc_adt__ [link fusion.adapted.adapt_assoc_adt `BOOST_FUSION_ADAPT_ASSOC_ADT`]] +[def __adapt_assoc_tpl_adt__ [link fusion.adapted.adapt_assoc_tpl_adt `BOOST_FUSION_ADAPT_ASSOC_TPL_ADT`]] +[def __define_struct__ [link fusion.adapted.define_struct `BOOST_FUSION_DEFINE_STRUCT`]] +[def __define_tpl_struct__ [link fusion.adapted.define_tpl_struct `BOOST_FUSION_DEFINE_TPL_STRUCT`]] +[def __define_assoc_struct__ [link fusion.adapted.define_assoc_struct `BOOST_FUSION_DEFINE_ASSOC_STRUCT`]] +[def __define_assoc_tpl_struct__ [link fusion.adapted.define_assoc_tpl_struct `BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT`]] + +[def __intrinsic__ [link fusion.sequence.intrinsic Intrinsic]] +[def __intrinsics__ [link fusion.sequence.intrinsic Intrinsics]] +[def __begin__ [link fusion.sequence.intrinsic.functions.begin `begin`]] +[def __result_of_begin__ [link fusion.sequence.intrinsic.metafunctions.begin `result_of::begin`]] +[def __end__ [link fusion.sequence.intrinsic.functions.end `end`]] +[def __result_of_end__ [link fusion.sequence.intrinsic.metafunctions.end `result_of::end`]] +[def __size__ [link fusion.sequence.intrinsic.functions.size `size`]] +[def __result_of_size__ [link fusion.sequence.intrinsic.metafunctions.size `result_of::size`]] +[def __empty__ [link fusion.sequence.intrinsic.functions.empty `empty`]] +[def __result_of_empty__ [link fusion.sequence.intrinsic.metafunctions.empty `result_of::empty`]] +[def __front__ [link fusion.sequence.intrinsic.functions.front `front`]] +[def __result_of_front__ [link fusion.sequence.intrinsic.metafunctions.front `result_of::front`]] +[def __back__ [link fusion.sequence.intrinsic.functions.back `back`]] +[def __result_of_back__ [link fusion.sequence.intrinsic.metafunctions.back `result_of::back`]] +[def __at__ [link fusion.sequence.intrinsic.functions.at `at`]] +[def __result_of_at__ [link fusion.sequence.intrinsic.metafunctions.at `result_of::at`]] +[def __at_c__ [link fusion.sequence.intrinsic.functions.at_c `at_c`]] +[def __result_of_at_c__ [link fusion.sequence.intrinsic.metafunctions.at_c `result_of::at_c`]] +[def __at_key__ [link fusion.sequence.intrinsic.functions.at_key `at_key`]] +[def __result_of_at_key__ [link fusion.sequence.intrinsic.metafunctions.at_key `result_of::at_key`]] +[def __has_key__ [link fusion.sequence.intrinsic.functions.has_key `has_key`]] +[def __result_of_has_key__ [link fusion.sequence.intrinsic.metafunctions.has_key `result_of::has_key`]] +[def __result_of_value_at__ [link fusion.sequence.intrinsic.metafunctions.value_at `result_of::value_at`]] +[def __result_of_value_at_c__ [link fusion.sequence.intrinsic.metafunctions.value_at_c `result_of::value_at_c`]] +[def __result_of_value_at_key__ [link fusion.sequence.intrinsic.metafunctions.value_at_key `result_of::value_at_key`]] + +[def __conversion__ [link fusion.container.conversion.functions Conversion]] +[def __result_of_conversion__ [link fusion.container.conversion.metafunctions Conversion Metafunctions]] +[def __as_vector__ [link fusion.container.conversion.functions.as_vector `as_vector`]] +[def __result_of_as_vector__ [link fusion.container.conversion.metafunctions.as_vector `result_of::as_vector`]] +[def __as_list__ [link fusion.container.conversion.functions.as_list `as_list`]] +[def __result_of_as_list__ [link fusion.container.conversion.metafunctions.as_list `result_of::as_list`]] +[def __as_set__ [link fusion.container.conversion.functions.as_set `as_set`]] +[def __result_of_as_set__ [link fusion.container.conversion.metafunctions.as_set `result_of::as_set`]] +[def __as_map__ [link fusion.container.conversion.functions.as_map `as_map`]] +[def __result_of_as_map__ [link fusion.container.conversion.metafunctions.as_map `result_of::as_map`]] + +[def __generation__ [link fusion.container.generation.functions Generation]] +[def __result_of_generation__ [link fusion.container.generation.metafunctions Generation Metafunctions]] +[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]] +[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]] +[def __vector_tie__ [link fusion.container.generation.functions.vector_tie `vector_tie`]] +[def __map_tie__ [link fusion.container.generation.functions.vector_tie `map_tie`]] +[def __result_of_vector_tie__ [link fusion.container.generation.metafunctions.vector_tie `result_of::vector_tie`]] +[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]] +[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]] +[def __make_cons__ [link fusion.container.generation.functions.make_cons `make_cons`]] +[def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]] +[def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]] +[def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]] +[def __make_deque__ [link fusion.container.generation.functions.make_deque `make_deque`]] +[def __result_of_make_deque__ [link fusion.container.generation.metafunctions.make_deque `result_of::make_deque`]] +[def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]] +[def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]] +[def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]] +[def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]] +[def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]] +[def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]] +[def __deque_tie__ [link fusion.container.generation.functions.deque_tie `deque_tie`]] +[def __result_of_deque_tie__ [link fusion.container.generation.metafunctions.deque_tie `result_of::deque_tie`]] + +[def __out__ [link fusion.sequence.operator.i_o.out out]] +[def __in__ [link fusion.sequence.operator.i_o.in in]] +[def __eq__ [link fusion.sequence.operator.comparison.equal equal]] +[def __neq__ [link fusion.sequence.operator.comparison.not_equal not equal]] +[def __lt__ [link fusion.sequence.operator.comparison.less_than less than]] +[def __lte__ [link fusion.sequence.operator.comparison.less_than_equal less than equal]] +[def __gt__ [link fusion.sequence.operator.comparison.greater_than greater than]] +[def __gte__ [link fusion.sequence.operator.comparison.greater_than_equal greater than equal]] + +[def __algorithm__ [link fusion.algorithm Algorithm]] +[def __algorithms__ [link fusion.algorithm Algorithms]] +[def __copy__ [link fusion.algorithm.auxiliary.functions.copy `copy`]] +[def __fold__ [link fusion.algorithm.iteration.functions.fold `fold`]] +[def __result_of_fold__ [link fusion.algorithm.iteration.metafunctions.fold `result_of::fold`]] +[def __reverse_fold__ [link fusion.algorithm.iteration.functions.reverse_fold `reverse_fold`]] +[def __result_of_reverse_fold__ [link fusion.algorithm.iteration.metafunctions.reverse_fold `result_of::reverse_fold`]] +[def __iter_fold__ [link fusion.algorithm.iteration.functions.iter_fold `iter_fold`]] +[def __result_of_iter_fold__ [link fusion.algorithm.iteration.metafunctions.iter_fold `result_of::iter_fold`]] +[def __reverse_iter_fold__ [link fusion.algorithm.iteration.functions.reverse_iter_fold `reverse_iter_fold`]] +[def __result_of_reverse_iter_fold__ [link fusion.algorithm.iteration.metafunctions.reverse_iter_fold `result_of::reverse_iter_fold`]] +[def __accumulate__ [link fusion.algorithm.iteration.functions.accumulate `accumulate`]] +[def __result_of_accumulate__ [link fusion.algorithm.iteration.metafunctions.accumulate `result_of::accumulate`]] +[def __for_each__ [link fusion.algorithm.iteration.functions.for_each `for_each`]] +[def __result_of_for_each__ [link fusion.algorithm.iteration.metafunctions.for_each `result_of::for_each`]] +[def __any__ [link fusion.algorithm.query.functions.any `any`]] +[def __result_of_any__ [link fusion.algorithm.query.metafunctions.any `result_of::any`]] +[def __all__ [link fusion.algorithm.query.functions.all `all`]] +[def __result_of_all__ [link fusion.algorithm.query.metafunctions.all `result_of::all`]] +[def __none__ [link fusion.algorithm.query.functions.none `none`]] +[def __result_of_none__ [link fusion.algorithm.query.metafunctions.none `result_of::none`]] +[def __find__ [link fusion.algorithm.query.functions.find `find`]] +[def __result_of_find__ [link fusion.algorithm.query.metafunctions.find `result_of::find`]] +[def __find_if__ [link fusion.algorithm.query.functions.find_if `find_if`]] +[def __result_of_find_if__ [link fusion.algorithm.query.metafunctions.find_if `result_of::find_if`]] +[def __count__ [link fusion.algorithm.query.functions.count `count`]] +[def __result_of_count__ [link fusion.algorithm.query.metafunctions.count `result_of::count`]] +[def __count_if__ [link fusion.algorithm.query.functions.count_if `count_if`]] +[def __result_of_count_if__ [link fusion.algorithm.query.metafunctions.count_if `result_of::count_if`]] +[def __filter__ [link fusion.algorithm.transformation.functions.filter `filter`]] +[def __result_of_filter__ [link fusion.algorithm.transformation.metafunctions.filter `result_of::filter`]] +[def __filter_if__ [link fusion.algorithm.transformation.functions.filter_if `filter_if`]] +[def __result_of_filter_if__ [link fusion.algorithm.transformation.metafunctions.filter_if `result_of::filter_if`]] +[def __transform__ [link fusion.algorithm.transformation.functions.transform `transform`]] +[def __result_of_transform__ [link fusion.algorithm.transformation.metafunctions.transform `result_of::transform`]] +[def __replace__ [link fusion.algorithm.transformation.functions.replace `replace`]] +[def __result_of_replace__ [link fusion.algorithm.transformation.metafunctions.replace `result_of::replace`]] +[def __replace_if__ [link fusion.algorithm.transformation.functions.replace_if `replace_if`]] +[def __result_of_replace_if__ [link fusion.algorithm.transformation.metafunctions.replace_if `result_of::replace_if`]] +[def __remove__ [link fusion.algorithm.transformation.functions.remove `remove`]] +[def __result_of_remove__ [link fusion.algorithm.transformation.metafunctions.remove `result_of::remove`]] +[def __remove_if__ [link fusion.algorithm.transformation.functions.remove_if `remove_if`]] +[def __result_of_remove_if__ [link fusion.algorithm.transformation.metafunctions.remove_if `result_of::remove_if`]] +[def __reverse__ [link fusion.algorithm.transformation.functions.reverse `reverse`]] +[def __result_of_reverse__ [link fusion.algorithm.transformation.metafunctions.reverse `result_of::reverse`]] +[def __clear__ [link fusion.algorithm.transformation.functions.clear `clear`]] +[def __result_of_clear__ [link fusion.algorithm.transformation.metafunctions.clear `result_of::clear`]] +[def __erase__ [link fusion.algorithm.transformation.functions.erase `erase`]] +[def __result_of_erase__ [link fusion.algorithm.transformation.metafunctions.erase `result_of::erase`]] +[def __erase_key__ [link fusion.algorithm.transformation.functions.erase_key `erase_key`]] +[def __result_of_erase_key__ [link fusion.algorithm.transformation.metafunctions.erase_key `result_of::erase_key`]] +[def __insert__ [link fusion.algorithm.transformation.functions.insert `insert`]] +[def __result_of_insert__ [link fusion.algorithm.transformation.metafunctions.insert `result_of::insert`]] +[def __insert_range__ [link fusion.algorithm.transformation.functions.insert_range `insert_range`]] +[def __result_of_insert_range__ [link fusion.algorithm.transformation.metafunctions.insert_range `result_of::insert_range`]] +[def __join__ [link fusion.algorithm.transformation.functions.join `join`]] +[def __result_of_join__ [link fusion.algorithm.transformation.metafunctions.join `result_of::join`]] +[def __zip__ [link fusion.algorithm.transformation.functions.zip `zip`]] +[def __result_of_zip__ [link fusion.algorithm.transformation.metafunctions.zip `result_of::zip`]] +[def __pop_back__ [link fusion.algorithm.transformation.functions.pop_back `pop_back`]] +[def __result_of_pop_back__ [link fusion.algorithm.transformation.metafunctions.pop_back `result_of::pop_back`]] +[def __pop_front__ [link fusion.algorithm.transformation.functions.pop_front `pop_front`]] +[def __result_of_pop_front__ [link fusion.algorithm.transformation.metafunctions.pop_front `result_of::pop_front`]] +[def __push_back__ [link fusion.algorithm.transformation.functions.push_back `push_back`]] +[def __result_of_push_back__ [link fusion.algorithm.transformation.metafunctions.push_back `result_of::push_back`]] +[def __push_front__ [link fusion.algorithm.transformation.functions.push_front `push_front`]] +[def __result_of_push_front__ [link fusion.algorithm.transformation.metafunctions.push_front `result_of::push_front`]] + +[def __tr1_tuple_pair__ [link fusion.tuple.pairs `TR1 and std::pair`]] +[def __tuple_get__ [link fusion.tuple.class_template_tuple.element_access `get`]] + +[def __callable_obj__ [link fusion.functional.concepts.callable Callable Object]] +[def __def_callable_obj__ [link fusion.functional.concepts.def_callable Deferred Callable Object]] +[def __reg_callable_obj__ [link fusion.functional.concepts.reg_callable Regular Callable Object]] +[def __poly_func_obj__ [link fusion.functional.concepts.poly Polymorphic Function Object]] +[def __functional_adapters__ [link fusion.functional.adapters functional adapters]] +[def __fused__ [link fusion.functional.adapters.fused `fused`]] +[def __fused_procedure__ [link fusion.functional.adapters.fused_procedure `fused_procedure`]] +[def __fused_function_object__ [link fusion.functional.adapters.fused_function_object `fused_function_object`]] +[def __unfused__ [link fusion.functional.adapters.unfused `unfused`]] +[def __unfused_typed__ [link fusion.functional.adapters.unfused_typed `unfused_typed`]] +[def __invoke__ [link fusion.functional.invocation.functions.invoke `invoke`]] +[def __invoke_procedure__ [link fusion.functional.invocation.functions.invoke_proc `invoke_procedure`]] +[def __invoke_function_object__ [link fusion.functional.invocation.functions.invoke_fobj `invoke_function_object`]] +[def __make_fused__ [link fusion.functional.generation.functions.mk_fused `make_fused`]] +[def __make_fused_procedure__ [link fusion.functional.generation.functions.mk_fused_proc `make_fused_procedure`]] +[def __make_fused_function_object__ [link fusion.functional.generation.functions.mk_fused_fobj `make_fused_function_object`]] +[def __make_unfused__ [link fusion.functional.generation.functions.mk_unfused `make_unfused`]] +[def __result_of_invoke__ [link fusion.functional.invocation.metafunctions.invoke `result_of::invoke`]] +[def __result_of_invoke_procedure__ [link fusion.functional.invocation.metafunctions.invoke_proc `result_of::invoke_procedure`]] +[def __result_of_invoke_function_object__ [link fusion.functional.invocation.metafunctions.invoke_fobj `result_of::invoke_function_object`]] +[def __result_of_make_fused__ [link fusion.functional.generation.metafunctions.mk_fused `make_fused`]] +[def __result_of_make_fused_procedure__ [link fusion.functional.generation.metafunctions.mk_fused_proc `make_fused_procedure`]] +[def __result_of_make_fused_function_object__ [link fusion.functional.generation.metafunctions.mk_fused_fobj `make_fused_function_object`]] +[def __result_of_make_unfused__ [link fusion.functional.generation.metafunctions.mk_unfused `make_unfused`]] + +[def __recursive_inline__ [link fusion.notes.recursive_inlined_functions Recursive Inlined Functions]] +[def __overloaded_functions__ [link fusion.notes.overloaded_functions Overloaded Functions]] +[def __tag_dispatching__ [link fusion.notes.tag_dispatching /tag dispatching/]] +[def __element_conversion__ [link fusion.notes.element_conversion /element conversion/]] +[def __see_element_conversion__ [link fusion.notes.element_conversion /see element conversion/]] +[def __note_boost_ref__ [link fusion.notes.boost__ref `boost::ref`]] + +[def __quick_start__ [link fusion.quick_start Quick Start]] +[def __organization__ [link fusion.organization Organization]] +[def __extension__ [link fusion.extension Extension]] +[def __sequence_facade__ [link fusion.extension.sequence_facade `sequence_facade`]] +[def __iterator_facade__ [link fusion.extension.iterator_facade `iterator_facade`]] + +[def __adt_attribute_proxy__ [link fusion.notes.adt_attribute_proxy `adt_attribute_proxy`]] + +[include preface.qbk] +[include introduction.qbk] +[include quick_start.qbk] +[include organization.qbk] +[include support.qbk] +[include iterator.qbk] +[include sequence.qbk] +[include container.qbk] +[include view.qbk] +[include adapted.qbk] +[include algorithm.qbk] +[include tuple.qbk] +[include extension.qbk] +[include functional.qbk] +[include notes.qbk] +[include changelog.qbk] +[include acknowledgements.qbk] +[include references.qbk] + diff --git a/libs/fusion/doc/html/fusion/acknowledgements.html b/libs/fusion/doc/html/fusion/acknowledgements.html new file mode 100644 index 000000000..6dc9f840c --- /dev/null +++ b/libs/fusion/doc/html/fusion/acknowledgements.html @@ -0,0 +1,58 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Acknowledgements</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="change_log.html" title="Change log"> +<link rel="next" href="references.html" title="References"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="change_log.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.acknowledgements"></a><a class="link" href="acknowledgements.html" title="Acknowledgements">Acknowledgements</a> +</h2></div></div></div> +<p> + Special thanks to David Abrahams, Douglas Gregor, Hartmut Kaiser, Aleksey Gurtovoy, + Peder Holt, Daniel Wallin, Jaakko Jarvi, Jeremiah Willcock, Dan Marsden, Eric + Niebler, Joao Abecasis and Andy Little. These people are instrumental in the + design and development of Fusion. + </p> +<p> + Special thanks to Ronald Garcia, the review manager and to all the people in + the boost community who participated in the review: Andreas Pokorny, Andreas + Huber, Jeff Flinn, David Abrahams, Pedro Lamarao, Larry Evans, Ryan Gallagher, + Andy Little, Gennadiy Rozental, Tobias Schwinger, Joao Abecasis, Eric Niebler, + Oleg Abrosimov, Gary Powell, Eric Friedman, Darren Cook, Martin Bonner and + Douglas Gregor. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="change_log.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted.html b/libs/fusion/doc/html/fusion/adapted.html new file mode 100644 index 000000000..103586c1c --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted.html @@ -0,0 +1,104 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Adapted</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="view/repetitive_view.html" title="repetitive_view"> +<link rel="next" href="adapted/array.html" title="Array"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="view/repetitive_view.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapted/array.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.adapted"></a><a class="link" href="adapted.html" title="Adapted">Adapted</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="adapted/array.html">Array</a></span></dt> +<dt><span class="section"><a href="adapted/std__pair.html">std::pair</a></span></dt> +<dt><span class="section"><a href="adapted/mpl_sequence.html">mpl sequence</a></span></dt> +<dt><span class="section"><a href="adapted/boost__array.html">boost::array</a></span></dt> +<dt><span class="section"><a href="adapted/boost__tuple.html">boost::tuple</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_struct.html">BOOST_FUSION_ADAPT_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_tpl_struct.html">BOOST_FUSION_ADAPT_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_struct_named.html">BOOST_FUSION_ADAPT_STRUCT_NAMED</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_assoc.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_assoc_tpl_struct.html">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_assoc_struct_named.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_adt.html">BOOST_FUSION_ADAPT_ADT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_tpl_adt.html">BOOST_FUSION_ADAPT_TPL_ADT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_assoc_adt.html">BOOST_FUSION_ADAPT_ASSOC_ADT</a></span></dt> +<dt><span class="section"><a href="adapted/adapt_assoc_tpl_adt.html">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</a></span></dt> +<dt><span class="section"><a href="adapted/define_struct.html">BOOST_FUSION_DEFINE_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/define_tpl_struct.html">BOOST_FUSION_DEFINE_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/define_struct_inline.html">BOOST_FUSION_DEFINE_STRUCT_INLINE</a></span></dt> +<dt><span class="section"><a href="adapted/define_tpl_struct_inline.html">BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</a></span></dt> +<dt><span class="section"><a href="adapted/define_assoc_struct.html">BOOST_FUSION_DEFINE_ASSOC_STRUCT</a></span></dt> +<dt><span class="section"><a href="adapted/define_assoc_tpl_struct.html">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</a></span></dt> +</dl></div> +<p> + Fusion provides a couple of adapters for other sequences such as arrays, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>, + <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> sequences, + and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>. These adapters are written using Fusion's + non-intrusive <a class="link" href="extension.html" title="Extension">Extension</a> mechanism. + If you wish to use these sequences with fusion, simply include the necessary + files and they will be regarded as first-class, fully conforming fusion sequences. + </p> +<p> + Fusion also provides various schemes to make it easy for the user to adapt + various data structures, non-intrusively, as full fledged Fusion sequences. + </p> +<h4> +<a name="fusion.adapted.h0"></a> + <span class="phrase"><a name="fusion.adapted.header"></a></span><a class="link" href="adapted.html#fusion.adapted.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + Fusion sequences may also be adapted as fully conforming <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences (see <a class="link" href="sequence/intrinsic.html" title="Intrinsic">Intrinsics</a>). + That way, we can have 2-way adaptation to and from <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + and Fusion. To make Fusion sequences fully conforming <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences, include: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + If you want bi-directional adaptation to and from <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + and Fusion, simply include: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + The header includes all the necessary headers. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="view/repetitive_view.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapted/array.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_adt.html b/libs/fusion/doc/html/fusion/adapted/adapt_adt.html new file mode 100644 index 000000000..2bc55f78e --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_adt.html @@ -0,0 +1,166 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ADT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_assoc_struct_named.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED"> +<link rel="next" href="adapt_tpl_adt.html" title="BOOST_FUSION_ADAPT_TPL_ADT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_struct_named.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_tpl_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_adt"></a><a class="link" href="adapt_adt.html" title="BOOST_FUSION_ADAPT_ADT">BOOST_FUSION_ADAPT_ADT</a> +</h3></div></div></div> +<p> + BOOST_FUSION_ADAPT_ADT is a macro than can be used to generate all the necessary + boilerplate to adapt an arbitrary class type as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_adt.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_adt.synopsis"></a></span><a class="link" href="adapt_adt.html#fusion.adapted.adapt_adt.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ADT</span><span class="special">(</span> + <span class="identifier">type_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">attribute_type0</span><span class="special">,</span> <span class="identifier">attribute_const_type0</span><span class="special">,</span> <span class="identifier">get_expr0</span><span class="special">,</span> <span class="identifier">set_expr0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">attribute_type1</span><span class="special">,</span> <span class="identifier">attribute_const_type1</span><span class="special">,</span> <span class="identifier">get_expr1</span><span class="special">,</span> <span class="identifier">set_expr1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_adt.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_adt.expression_semantics"></a></span><a class="link" href="adapt_adt.html#fusion.adapted.adapt_adt.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">type_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence of <code class="literal">(attribute_type<span class="emphasis"><em>N</em></span>, + attribute_const_type<span class="emphasis"><em>N</em></span>, get_expr<span class="emphasis"><em>N</em></span>, + set_expr<span class="emphasis"><em>N</em></span>)</code> quadruples declares the types, + const types, get-expressions and set-expressions of the elements that are + part of the adapted fusion sequence. <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> + is the expression that is invoked to get the <span class="emphasis"><em>N</em></span>th element + of an instance of <code class="computeroutput"><span class="identifier">type_name</span></code>. + This expression may access a variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code> + or <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span><span class="special">&</span></code> which represents the underlying instance + of <code class="computeroutput"><span class="identifier">type_name</span></code>. <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> + and <code class="literal">attribute_const_type<span class="emphasis"><em>N</em></span></code> may specify + the types that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> denotes + to. <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to set the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access variables named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code>, + which represent the corresponding instance of <code class="computeroutput"><span class="identifier">type_name</span></code>, + and <code class="computeroutput"><span class="identifier">val</span></code> of an arbitrary const-qualified + reference template type parameter <code class="computeroutput"><span class="identifier">Val</span></code>, + which represents the right operand of the assignment expression. + </p> +<p> + The actual return type of fusion's intrinsic sequence access (meta-)functions + when in invoked with (an instance of) <code class="computeroutput"><span class="identifier">type_name</span></code> + is a proxy type. This type is implicitly convertible to the attribute type + via <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards assignment + to the underlying element via <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code>. + The value type (that is the type returned by <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a> and <a class="link" href="../sequence/intrinsic/metafunctions/value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a>) of the <span class="emphasis"><em>N</em></span>th + element is <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> with const-qualifier + and reference removed. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">type_name</span></code> + should be the fully namespace qualified name of the class type to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_adt.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_adt.header"></a></span><a class="link" href="adapt_adt.html#fusion.adapted.adapt_adt.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">adt</span><span class="special">/</span><span class="identifier">adapt_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_adt.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_adt.example"></a></span><a class="link" href="adapt_adt.html#fusion.adapted.adapt_adt.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="keyword">private</span><span class="special">:</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + + <span class="keyword">public</span><span class="special">:</span> + <span class="keyword">void</span> <span class="identifier">set_name</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">n</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">name</span><span class="special">=</span><span class="identifier">n</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">void</span> <span class="identifier">set_age</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">age</span><span class="special">=</span><span class="identifier">a</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_name</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">name</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">int</span> <span class="identifier">get_age</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="identifier">BOOST_FUSION_ADAPT_ADT</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="identifier">val</span><span class="special">))</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_age</span><span class="special">(</span><span class="identifier">val</span><span class="special">)))</span> + +<span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span> <span class="identifier">e</span><span class="special">;</span> +<span class="identifier">front</span><span class="special">(</span><span class="identifier">e</span><span class="special">)=</span><span class="string">"Edward Norton"</span><span class="special">;</span> +<span class="identifier">back</span><span class="special">(</span><span class="identifier">e</span><span class="special">)=</span><span class="number">41</span><span class="special">;</span> +<span class="comment">//Prints 'Edward Norton is 41 years old'</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" years old"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_adt.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_adt.see_also"></a></span><a class="link" href="adapt_adt.html#fusion.adapted.adapt_adt.see_also">See + also</a> + </h5> +<p> + <a class="link" href="../notes.html#fusion.notes.adt_attribute_proxy"><code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_struct_named.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_tpl_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_assoc.html b/libs/fusion/doc/html/fusion/adapted/adapt_assoc.html new file mode 100644 index 000000000..32a7215a5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_assoc.html @@ -0,0 +1,117 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ASSOC_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_struct_named.html" title="BOOST_FUSION_ADAPT_STRUCT_NAMED"> +<link rel="next" href="adapt_assoc_tpl_struct.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_struct_named.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_assoc"></a><a class="link" href="adapt_assoc.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT">BOOST_FUSION_ADAPT_ASSOC_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_assoc.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc.description"></a></span><a class="link" href="adapt_assoc.html#fusion.adapted.adapt_assoc.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all + the necessary boilerplate to make an arbitrary struct a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc.synopsis"></a></span><a class="link" href="adapt_assoc.html#fusion.adapted.adapt_assoc.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc.semantics"></a></span><a class="link" href="adapt_assoc.html#fusion.adapted.adapt_assoc.semantics">Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">,</span> + <span class="identifier">key_typeN</span><span class="special">)</span></code> + triples declares the type, name and key type of each of the struct members + that are part of the sequence. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc.header"></a></span><a class="link" href="adapt_assoc.html#fusion.adapted.adapt_assoc.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc.example"></a></span><a class="link" href="adapt_assoc.html#fusion.adapted.adapt_assoc.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="comment">// demo::employee is now a Fusion sequence.</span> +<span class="comment">// It is also an associative sequence with</span> +<span class="comment">// keys keys::name and keys::age present.</span> +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_struct_named.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_assoc_adt.html b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_adt.html new file mode 100644 index 000000000..420b5a0cb --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_adt.html @@ -0,0 +1,176 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ASSOC_ADT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_tpl_adt.html" title="BOOST_FUSION_ADAPT_TPL_ADT"> +<link rel="next" href="adapt_assoc_tpl_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_ADT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_tpl_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_tpl_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_assoc_adt"></a><a class="link" href="adapt_assoc_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_ADT">BOOST_FUSION_ADAPT_ASSOC_ADT</a> +</h3></div></div></div> +<p> + BOOST_FUSION_ADAPT_ASSOC_ADT is a macro than can be used to generate all + the necessary boilerplate to adapt an arbitrary class type as a model of + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random Access + Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_adt.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_adt.synopsis"></a></span><a class="link" href="adapt_assoc_adt.html#fusion.adapted.adapt_assoc_adt.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_ADT</span><span class="special">(</span> + <span class="identifier">type_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">attribute_type0</span><span class="special">,</span> <span class="identifier">attribute_const_type0</span><span class="special">,</span> <span class="identifier">get_expr0</span><span class="special">,</span> <span class="identifier">set_expr0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">attribute_type1</span><span class="special">,</span> <span class="identifier">attribute_const_type1</span><span class="special">,</span> <span class="identifier">get_expr1</span><span class="special">,</span> <span class="identifier">set_expr1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_adt.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_adt.expression_semantics"></a></span><a class="link" href="adapt_assoc_adt.html#fusion.adapted.adapt_assoc_adt.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">type_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence of <code class="literal">(attribute_type<span class="emphasis"><em>N</em></span>, + attribute_const_type<span class="emphasis"><em>N</em></span>, get_expr<span class="emphasis"><em>N</em></span>, + set_expr<span class="emphasis"><em>N</em></span>, key_type<span class="emphasis"><em>N</em></span>)</code> + 5-tuples declares the types, const types, get-expressions, set-expressions + and key types of the elements that are part of the adapted fusion sequence. + <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to get the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access a variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code> + or <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span><span class="special">&</span></code> which represents the underlying instance + of <code class="computeroutput"><span class="identifier">type_name</span></code>. <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> + and <code class="literal">attribute_const_type<span class="emphasis"><em>N</em></span></code> may specify + the types that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> denotes + to. <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to set the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access variables named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code>, + which represent the corresponding instance of <code class="computeroutput"><span class="identifier">type_name</span></code>, + and <code class="computeroutput"><span class="identifier">val</span></code> of an arbitrary const-qualified + reference template type parameter <code class="computeroutput"><span class="identifier">Val</span></code>, + which represents the right operand of the assignment expression. + </p> +<p> + The actual return type of fusion's intrinsic sequence access (meta-)functions + when in invoked with (an instance of) <code class="computeroutput"><span class="identifier">type_name</span></code> + is a proxy type. This type is implicitly convertible to the attribute type + via <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards assignment + to the underlying element via <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code>. + The value type (that is the type returned by <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a>, <a class="link" href="../iterator/metafunctions/value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a> and <a class="link" href="../sequence/intrinsic/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a>) of the <span class="emphasis"><em>N</em></span>th + element is <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> with const-qualifier + and reference removed. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">type_name</span></code> + should be the fully namespace qualified name of the class type to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_adt.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_adt.header"></a></span><a class="link" href="adapt_assoc_adt.html#fusion.adapted.adapt_assoc_adt.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">adt</span><span class="special">/</span><span class="identifier">adapt_assoc_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_assoc_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_adt.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_adt.example"></a></span><a class="link" href="adapt_assoc_adt.html#fusion.adapted.adapt_assoc_adt.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="keyword">private</span><span class="special">:</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + + <span class="keyword">public</span><span class="special">:</span> + <span class="keyword">void</span> <span class="identifier">set_name</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">n</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">name</span><span class="special">=</span><span class="identifier">n</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">void</span> <span class="identifier">set_age</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">age</span><span class="special">=</span><span class="identifier">a</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_name</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">name</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">int</span> <span class="identifier">get_age</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_ADT</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="identifier">val</span><span class="special">),</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_age</span><span class="special">(</span><span class="identifier">val</span><span class="special">),</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> + +<span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span> <span class="identifier">e</span><span class="special">;</span> +<span class="identifier">at_key</span><span class="special"><</span><span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">>(</span><span class="identifier">e</span><span class="special">)=</span><span class="string">"Edward Norton"</span><span class="special">;</span> +<span class="identifier">at_key</span><span class="special"><</span><span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">>(</span><span class="identifier">e</span><span class="special">)=</span><span class="number">41</span><span class="special">;</span> +<span class="comment">//Prints 'Edward Norton is 41 years old'</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" years old"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_adt.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_adt.see_also"></a></span><a class="link" href="adapt_assoc_adt.html#fusion.adapted.adapt_assoc_adt.see_also">See + also</a> + </h5> +<p> + <a class="link" href="../notes.html#fusion.notes.adt_attribute_proxy"><code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_tpl_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_tpl_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_assoc_struct_named.html b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_struct_named.html new file mode 100644 index 000000000..b2e8dc7a9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_struct_named.html @@ -0,0 +1,133 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_assoc_tpl_struct.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT"> +<link rel="next" href="adapt_adt.html" title="BOOST_FUSION_ADAPT_ADT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_assoc_struct_named"></a><a class="link" href="adapt_assoc_struct_named.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_assoc_struct_named.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_struct_named.description"></a></span><a class="link" href="adapt_assoc_struct_named.html#fusion.adapted.adapt_assoc_struct_named.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS + are macros that can be used to generate all the necessary boilerplate to + make an arbitrary struct a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The given struct is adapted using the given name. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_struct_named.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_struct_named.synopsis"></a></span><a class="link" href="adapt_assoc_struct_named.html#fusion.adapted.adapt_assoc_struct_named.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> <span class="identifier">adapted_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> + +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">adapted_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_struct_named.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_struct_named.semantics"></a></span><a class="link" href="adapt_assoc_struct_named.html#fusion.adapted.adapt_assoc_struct_named.semantics">Semantics</a> + </h5> +<p> + The above macros generate the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> while using <code class="computeroutput"><span class="identifier">adapted_name</span></code> + as the name of the adapted struct. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> + declares the namespace for <code class="computeroutput"><span class="identifier">adapted_name</span></code>. + It yields to a fully qualified name for <code class="computeroutput"><span class="identifier">adapted_name</span></code> + of <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">adapted_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the adapted + view is placed in the global namespace. If no namespace sequence is given + (i.e. <code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT_ASSOC_NAMED</span></code>), + the adapted view is placed in the namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">adapted</span></code>. + The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> <span class="identifier">member_nameN</span><span class="special">,</span> <span class="identifier">key_typeN</span><span class="special">)</span></code> triples declares the type, name and key + type of each of the struct members that are part of the sequence. + </p> +<p> + The macros should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be converted. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_struct_named.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_struct_named.header"></a></span><a class="link" href="adapt_assoc_struct_named.html#fusion.adapted.adapt_assoc_struct_named.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_assoc_struct_named</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_assoc_struct_named</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_struct_named.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_struct_named.example"></a></span><a class="link" href="adapt_assoc_struct_named.html#fusion.adapted.adapt_assoc_struct_named.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="comment">// boost::fusion::adapted::adapted_employee is now a Fusion sequence</span> +<span class="comment">// referring to demo::employee</span> +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> <span class="identifier">adapted_employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_adt.html b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_adt.html new file mode 100644 index 000000000..b33ad9704 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_adt.html @@ -0,0 +1,184 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_assoc_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_ADT"> +<link rel="next" href="define_struct.html" title="BOOST_FUSION_DEFINE_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_assoc_tpl_adt"></a><a class="link" href="adapt_assoc_tpl_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_ADT">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</a> +</h3></div></div></div> +<p> + BOOST_FUSION_ADAPT_ASSOC_TPL_ADT is a macro than can be used to generate + all the necessary boilerplate to adapt an arbitrary template class type as + a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_adt.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_adt.synopsis"></a></span><a class="link" href="adapt_assoc_tpl_adt.html#fusion.adapted.adapt_assoc_tpl_adt.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">type_name</span><span class="special">)</span> <span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">attribute_type0</span><span class="special">,</span> <span class="identifier">attribute_const_type0</span><span class="special">,</span> <span class="identifier">get_expr0</span><span class="special">,</span> <span class="identifier">set_expr0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">attribute_type1</span><span class="special">,</span> <span class="identifier">attribute_const_type1</span><span class="special">,</span> <span class="identifier">get_expr1</span><span class="special">,</span> <span class="identifier">set_expr1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_adt.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_adt.expression_semantics"></a></span><a class="link" href="adapt_assoc_tpl_adt.html#fusion.adapted.adapt_assoc_tpl_adt.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">type_name</span></code> + or an arbitrary specialization of <code class="computeroutput"><span class="identifier">type_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...</span></code> declares the template parameters of the + actual specialization of <code class="computeroutput"><span class="identifier">type_name</span></code> + that is adapted as a fusion sequence. The sequence of <code class="literal">(attribute_type<span class="emphasis"><em>N</em></span>, + attribute_const_type<span class="emphasis"><em>N</em></span>, get_expr<span class="emphasis"><em>N</em></span>, + set_expr<span class="emphasis"><em>N</em></span>, key_type<span class="emphasis"><em>N</em></span>)</code> + 5-tuples declares the types, const types, get-expressions, set-expressions + and key types of the elements that are part of the adapted fusion sequence. + <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to get the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access a variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code> + or <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span><span class="special">&</span></code> which represents the underlying instance + of <code class="computeroutput"><span class="identifier">type_name</span></code>. <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> + and <code class="literal">attribute_const_type<span class="emphasis"><em>N</em></span></code> may specify + the types that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> denotes + to. <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to set the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access variables named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code>, + which represent the corresponding instance of <code class="computeroutput"><span class="identifier">type_name</span></code>, + and <code class="computeroutput"><span class="identifier">val</span></code> of an arbitrary const-qualified + reference template type parameter <code class="computeroutput"><span class="identifier">Val</span></code>, + which represents the right operand of the assignment expression. + </p> +<p> + The actual return type of fusion's intrinsic sequence access (meta-)functions + when in invoked with (an instance of) <code class="computeroutput"><span class="identifier">type_name</span></code> + is a proxy type. This type is implicitly convertible to the attribute type + via <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards assignment + to the underlying element via <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code>. + The value type (that is the type returned by <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a>, <a class="link" href="../iterator/metafunctions/value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a> and <a class="link" href="../sequence/intrinsic/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a>) of the <span class="emphasis"><em>N</em></span>th + element is <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> with const-qualifier + and reference removed. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">type_name</span></code> + should be the fully namespace qualified name of the template class type to + be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_adt.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_adt.header"></a></span><a class="link" href="adapt_assoc_tpl_adt.html#fusion.adapted.adapt_assoc_tpl_adt.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">adt</span><span class="special">/</span><span class="identifier">adapt_assoc_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_assoc_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_adt.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_adt.example"></a></span><a class="link" href="adapt_assoc_tpl_adt.html#fusion.adapted.adapt_assoc_tpl_adt.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Name</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Age</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="keyword">private</span><span class="special">:</span> + <span class="identifier">Name</span> <span class="identifier">name</span><span class="special">;</span> + <span class="identifier">Age</span> <span class="identifier">age</span><span class="special">;</span> + + <span class="keyword">public</span><span class="special">:</span> + <span class="keyword">void</span> <span class="identifier">set_name</span><span class="special">(</span><span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">n</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">name</span><span class="special">=</span><span class="identifier">n</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">void</span> <span class="identifier">set_age</span><span class="special">(</span><span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">age</span><span class="special">=</span><span class="identifier">a</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_name</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">name</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_age</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">)</span> <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="identifier">val</span><span class="special">),</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_age</span><span class="special">(</span><span class="identifier">val</span><span class="special">),</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> + +<span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">e</span><span class="special">;</span> +<span class="identifier">at_key</span><span class="special"><</span><span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">>(</span><span class="identifier">e</span><span class="special">)=</span><span class="string">"Edward Norton"</span><span class="special">;</span> +<span class="identifier">at_key</span><span class="special"><</span><span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">>(</span><span class="identifier">e</span><span class="special">)=</span><span class="number">41</span><span class="special">;</span> +<span class="comment">//Prints 'Edward Norton is 41 years old'</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" years old"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_adt.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_adt.see_also"></a></span><a class="link" href="adapt_assoc_tpl_adt.html#fusion.adapted.adapt_assoc_tpl_adt.see_also">See + also</a> + </h5> +<p> + <a class="link" href="../notes.html#fusion.notes.adt_attribute_proxy"><code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_struct.html b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_struct.html new file mode 100644 index 000000000..2804e67c7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_assoc_tpl_struct.html @@ -0,0 +1,125 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_assoc.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT"> +<link rel="next" href="adapt_assoc_struct_named.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_struct_named.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_assoc_tpl_struct"></a><a class="link" href="adapt_assoc_tpl_struct.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_struct.description"></a></span><a class="link" href="adapt_assoc_tpl_struct.html#fusion.adapted.adapt_assoc_tpl_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT is a macro that can be used to generate + all the necessary boilerplate to make an arbitrary template struct a model + of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_struct.synopsis"></a></span><a class="link" href="adapt_assoc_tpl_struct.html#fusion.adapted.adapt_assoc_tpl_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">struct_name</span><span class="special">)</span> <span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_struct.semantics"></a></span><a class="link" href="adapt_assoc_tpl_struct.html#fusion.adapted.adapt_assoc_tpl_struct.semantics">Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + or an arbitrary specialization of <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...</span></code> declares the template parameters of the + actual specialization of <code class="computeroutput"><span class="identifier">struct_name</span></code> + that is adapted as a fusion sequence. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">,</span> + <span class="identifier">key_typeN</span><span class="special">)</span></code> + triples declares the type, name and key type of each of the struct members + that are part of the sequence. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_struct.header"></a></span><a class="link" href="adapt_assoc_tpl_struct.html#fusion.adapted.adapt_assoc_tpl_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_assoc_tpl_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_assoc_tpl_struct.example"></a></span><a class="link" href="adapt_assoc_tpl_struct.html#fusion.adapted.adapt_assoc_tpl_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Name</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Age</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">Name</span> <span class="identifier">name</span><span class="special">;</span> + <span class="identifier">Age</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="comment">// Any instantiated demo::employee is now a Fusion sequence.</span> +<span class="comment">// It is also an associative sequence with</span> +<span class="comment">// keys keys::name and keys::age present.</span> +<span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">)</span> <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">,</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span><span class="special">,</span> <span class="identifier">age</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_struct_named.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_struct.html b/libs/fusion/doc/html/fusion/adapted/adapt_struct.html new file mode 100644 index 000000000..876830c73 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_struct.html @@ -0,0 +1,106 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="boost__tuple.html" title="boost::tuple"> +<link rel="next" href="adapt_tpl_struct.html" title="BOOST_FUSION_ADAPT_TPL_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="boost__tuple.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_struct"></a><a class="link" href="adapt_struct.html" title="BOOST_FUSION_ADAPT_STRUCT">BOOST_FUSION_ADAPT_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct.description"></a></span><a class="link" href="adapt_struct.html#fusion.adapted.adapt_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the + necessary boilerplate to make an arbitrary struct a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct.synopsis"></a></span><a class="link" href="adapt_struct.html#fusion.adapted.adapt_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct.semantics"></a></span><a class="link" href="adapt_struct.html#fusion.adapted.adapt_struct.semantics">Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">)</span></code> + pairs declares the type and names of each of the struct members that are + part of the sequence. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct.header"></a></span><a class="link" href="adapt_struct.html#fusion.adapted.adapt_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct.example"></a></span><a class="link" href="adapt_struct.html#fusion.adapted.adapt_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="comment">// demo::employee is now a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_ADAPT_STRUCT</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="boost__tuple.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_struct_named.html b/libs/fusion/doc/html/fusion/adapted/adapt_struct_named.html new file mode 100644 index 000000000..caaed4888 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_struct_named.html @@ -0,0 +1,125 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_STRUCT_NAMED</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_tpl_struct.html" title="BOOST_FUSION_ADAPT_TPL_STRUCT"> +<link rel="next" href="adapt_assoc.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_struct_named"></a><a class="link" href="adapt_struct_named.html" title="BOOST_FUSION_ADAPT_STRUCT_NAMED">BOOST_FUSION_ADAPT_STRUCT_NAMED</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_struct_named.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct_named.description"></a></span><a class="link" href="adapt_struct_named.html#fusion.adapted.adapt_struct_named.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are + macros that can be used to generate all the necessary boilerplate to make + an arbitrary struct a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The given struct is adapted using the given name. + </p> +<h5> +<a name="fusion.adapted.adapt_struct_named.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct_named.synopsis"></a></span><a class="link" href="adapt_struct_named.html#fusion.adapted.adapt_struct_named.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> <span class="identifier">adapted_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> + +<span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED_NS</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">adapted_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_struct_named.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct_named.semantics"></a></span><a class="link" href="adapt_struct_named.html#fusion.adapted.adapt_struct_named.semantics">Semantics</a> + </h5> +<p> + The above macros generate the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> while using <code class="computeroutput"><span class="identifier">adapted_name</span></code> + as the name of the adapted struct. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> + declares the namespace for <code class="computeroutput"><span class="identifier">adapted_name</span></code>. + It yields to a fully qualified name for <code class="computeroutput"><span class="identifier">adapted_name</span></code> + of <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">adapted_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the adapted + view is placed in the global namespace. If no namespace sequence is given + (i.e. <code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED</span></code>), + the adapted view is placed in the namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">adapted</span></code>. + The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> <span class="identifier">member_nameN</span><span class="special">)</span></code> pairs declares the type and names of each + of the struct members that are part of the sequence. + </p> +<p> + The macros should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be converted. + </p> +<h5> +<a name="fusion.adapted.adapt_struct_named.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct_named.header"></a></span><a class="link" href="adapt_struct_named.html#fusion.adapted.adapt_struct_named.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_struct_named</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_struct_named</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_struct_named.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_struct_named.example"></a></span><a class="link" href="adapt_struct_named.html#fusion.adapted.adapt_struct_named.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="comment">// boost::fusion::adapted::adapted_employee is now a Fusion sequence</span> +<span class="comment">// referring to demo::employee</span> +<span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED</span><span class="special">(</span> + <span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">,</span> <span class="identifier">adapted_employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_tpl_adt.html b/libs/fusion/doc/html/fusion/adapted/adapt_tpl_adt.html new file mode 100644 index 000000000..2d857c8c7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_tpl_adt.html @@ -0,0 +1,175 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_TPL_ADT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_adt.html" title="BOOST_FUSION_ADAPT_ADT"> +<link rel="next" href="adapt_assoc_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_ADT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_tpl_adt"></a><a class="link" href="adapt_tpl_adt.html" title="BOOST_FUSION_ADAPT_TPL_ADT">BOOST_FUSION_ADAPT_TPL_ADT</a> +</h3></div></div></div> +<p> + BOOST_FUSION_ADAPT_TPL_ADT is a macro than can be used to generate all the + necessary boilerplate to adapt an arbitrary template class type as a model + of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_tpl_adt.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_adt.synopsis"></a></span><a class="link" href="adapt_tpl_adt.html#fusion.adapted.adapt_tpl_adt.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_TPL_ADT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">type_name</span><span class="special">)</span> <span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">attribute_type0</span><span class="special">,</span> <span class="identifier">attribute_const_type0</span><span class="special">,</span> <span class="identifier">get_expr0</span><span class="special">,</span> <span class="identifier">set_expr0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">attribute_type1</span><span class="special">,</span> <span class="identifier">attribute_const_type1</span><span class="special">,</span> <span class="identifier">get_expr1</span><span class="special">,</span> <span class="identifier">set_expr1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_tpl_adt.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_adt.expression_semantics"></a></span><a class="link" href="adapt_tpl_adt.html#fusion.adapted.adapt_tpl_adt.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">type_name</span></code> + or an arbitrary specialization of <code class="computeroutput"><span class="identifier">type_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...</span></code> declares the template parameters of the + actual specialization of <code class="computeroutput"><span class="identifier">type_name</span></code> + that is adapted as a fusion sequence. The sequence of <code class="literal">(attribute_type<span class="emphasis"><em>N</em></span>, + attribute_const_type<span class="emphasis"><em>N</em></span>, get_expr<span class="emphasis"><em>N</em></span>, + set_expr<span class="emphasis"><em>N</em></span>)</code> quadruples declares the types, + const types, get-expressions and set-expressions of the elements that are + part of the adapted fusion sequence. <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> + is the expression that is invoked to get the <span class="emphasis"><em>N</em></span>th element + of an instance of <code class="computeroutput"><span class="identifier">type_name</span></code>. + This expression may access a variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code> + or <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span><span class="special">&</span></code> which represents the underlying instance + of <code class="computeroutput"><span class="identifier">type_name</span></code>. <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> + and <code class="literal">attribute_const_type<span class="emphasis"><em>N</em></span></code> may specify + the types that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> denotes + to. <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code> is the expression that + is invoked to set the <span class="emphasis"><em>N</em></span>th element of an instance of + <code class="computeroutput"><span class="identifier">type_name</span></code>. This expression + may access variables named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code>, + which represent the corresponding instance of <code class="computeroutput"><span class="identifier">type_name</span></code>, + and <code class="computeroutput"><span class="identifier">val</span></code> of an arbitrary const-qualified + reference template type parameter <code class="computeroutput"><span class="identifier">Val</span></code>, + which represents the right operand of the assignment expression. + </p> +<p> + The actual return type of fusion's intrinsic sequence access (meta-)functions + when in invoked with (an instance of) <code class="computeroutput"><span class="identifier">type_name</span></code> + is a proxy type. This type is implicitly convertible to the attribute type + via <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards assignment + to the underlying element via <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code>. + The value type (that is the type returned by <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a> and <a class="link" href="../sequence/intrinsic/metafunctions/value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a>) of the <span class="emphasis"><em>N</em></span>th + element is <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> with const-qualifier + and reference removed. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">type_name</span></code> + should be the fully namespace qualified name of the template class type to + be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_tpl_adt.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_adt.header"></a></span><a class="link" href="adapt_tpl_adt.html#fusion.adapted.adapt_tpl_adt.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">adt</span><span class="special">/</span><span class="identifier">adapt_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_adt</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_tpl_adt.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_adt.example"></a></span><a class="link" href="adapt_tpl_adt.html#fusion.adapted.adapt_tpl_adt.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Name</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Age</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="keyword">private</span><span class="special">:</span> + <span class="identifier">Name</span> <span class="identifier">name</span><span class="special">;</span> + <span class="identifier">Age</span> <span class="identifier">age</span><span class="special">;</span> + + <span class="keyword">public</span><span class="special">:</span> + <span class="keyword">void</span> <span class="identifier">set_name</span><span class="special">(</span><span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">n</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">name</span><span class="special">=</span><span class="identifier">n</span><span class="special">;</span> + <span class="special">}</span> + + <span class="keyword">void</span> <span class="identifier">set_age</span><span class="special">(</span><span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> + <span class="identifier">age</span><span class="special">=</span><span class="identifier">a</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_name</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">name</span><span class="special">;</span> + <span class="special">}</span> + + <span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">get_age</span><span class="special">()</span><span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="identifier">BOOST_FUSION_ADAPT_TPL_ADT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">)</span> <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">Name</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_name</span><span class="special">(</span><span class="identifier">val</span><span class="special">))</span> + <span class="special">(</span><span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">Age</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">(),</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">set_age</span><span class="special">(</span><span class="identifier">val</span><span class="special">)))</span> + +<span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">e</span><span class="special">;</span> +<span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">front</span><span class="special">(</span><span class="identifier">e</span><span class="special">)=</span><span class="string">"Edward Norton"</span><span class="special">;</span> +<span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">back</span><span class="special">(</span><span class="identifier">e</span><span class="special">)=</span><span class="number">41</span><span class="special">;</span> +<span class="comment">//Prints 'Edward Norton is 41 years old'</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_name</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">get_age</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" years old"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_tpl_adt.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_adt.see_also"></a></span><a class="link" href="adapt_tpl_adt.html#fusion.adapted.adapt_tpl_adt.see_also">See + also</a> + </h5> +<p> + <a class="link" href="../notes.html#fusion.notes.adt_attribute_proxy"><code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_assoc_adt.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/adapt_tpl_struct.html b/libs/fusion/doc/html/fusion/adapted/adapt_tpl_struct.html new file mode 100644 index 000000000..4787c89ad --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/adapt_tpl_struct.html @@ -0,0 +1,114 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_ADAPT_TPL_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_struct.html" title="BOOST_FUSION_ADAPT_STRUCT"> +<link rel="next" href="adapt_struct_named.html" title="BOOST_FUSION_ADAPT_STRUCT_NAMED"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_struct_named.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.adapt_tpl_struct"></a><a class="link" href="adapt_tpl_struct.html" title="BOOST_FUSION_ADAPT_TPL_STRUCT">BOOST_FUSION_ADAPT_TPL_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.adapt_tpl_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_struct.description"></a></span><a class="link" href="adapt_tpl_struct.html#fusion.adapted.adapt_tpl_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_ADAPT_TPL_STRUCT is a macro that can be used to generate all + the necessary boilerplate to make an arbitrary template struct a model of + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random Access + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.adapt_tpl_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_struct.synopsis"></a></span><a class="link" href="adapt_tpl_struct.html#fusion.adapted.adapt_tpl_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_ADAPT_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">struct_name</span><span class="special">)</span> <span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.adapt_tpl_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_struct.semantics"></a></span><a class="link" href="adapt_tpl_struct.html#fusion.adapted.adapt_tpl_struct.semantics">Semantics</a> + </h5> +<p> + The above macro generates the necessary code to adapt <code class="computeroutput"><span class="identifier">struct_name</span></code> + or an arbitrary specialization of <code class="computeroutput"><span class="identifier">struct_name</span></code> + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">specialization_param0</span><span class="special">)(</span><span class="identifier">specialization_param1</span><span class="special">)...</span></code> declares the template parameters of the + actual specialization of <code class="computeroutput"><span class="identifier">struct_name</span></code> + that is adapted as a fusion sequence. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">)</span></code> + pairs declares the type and names of each of the struct members that are + part of the sequence. + </p> +<p> + The macro should be used at global scope, and <code class="computeroutput"><span class="identifier">struct_name</span></code> + should be the fully namespace qualified name of the struct to be adapted. + </p> +<h5> +<a name="fusion.adapted.adapt_tpl_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_struct.header"></a></span><a class="link" href="adapt_tpl_struct.html#fusion.adapted.adapt_tpl_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">adapt_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">adapt_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.adapt_tpl_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.adapt_tpl_struct.example"></a></span><a class="link" href="adapt_tpl_struct.html#fusion.adapted.adapt_tpl_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">demo</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Name</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Age</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">employee</span> + <span class="special">{</span> + <span class="identifier">Name</span> <span class="identifier">name</span><span class="special">;</span> + <span class="identifier">Age</span> <span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> + +<span class="comment">// Any instantiated demo::employee is now a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_ADAPT_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">::</span><span class="identifier">employee</span><span class="special">)</span> <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_struct_named.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/array.html b/libs/fusion/doc/html/fusion/adapted/array.html new file mode 100644 index 000000000..4e109ade9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/array.html @@ -0,0 +1,77 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Array</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="../adapted.html" title="Adapted"> +<link rel="next" href="std__pair.html" title="std::pair"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../adapted.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="std__pair.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.array"></a><a class="link" href="array.html" title="Array">Array</a> +</h3></div></div></div> +<p> + This module provides adapters for arrays. Including the module header makes + any array a fully conforming <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.array.h0"></a> + <span class="phrase"><a name="fusion.adapted.array.header"></a></span><a class="link" href="array.html#fusion.adapted.array.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.array.h1"></a> + <span class="phrase"><a name="fusion.adapted.array.model_of"></a></span><a class="link" href="array.html#fusion.adapted.array.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </li></ul></div> +<h5> +<a name="fusion.adapted.array.h2"></a> + <span class="phrase"><a name="fusion.adapted.array.example"></a></span><a class="link" href="array.html#fusion.adapted.array.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">arr</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">};</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><a class="link" href="../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><span class="identifier">arr</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../adapted.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="std__pair.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/boost__array.html b/libs/fusion/doc/html/fusion/adapted/boost__array.html new file mode 100644 index 000000000..218270edd --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/boost__array.html @@ -0,0 +1,86 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>boost::array</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="mpl_sequence.html" title="mpl sequence"> +<link rel="next" href="boost__tuple.html" title="boost::tuple"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mpl_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__tuple.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.boost__array"></a><a class="link" href="boost__array.html" title="boost::array">boost::array</a> +</h3></div></div></div> +<p> + This module provides adapters for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>. + Including the module header makes <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> + a fully conforming <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.boost__array.h0"></a> + <span class="phrase"><a name="fusion.adapted.boost__array.header"></a></span><a class="link" href="boost__array.html#fusion.adapted.boost__array.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">boost_array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">boost_array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.boost__array.h1"></a> + <span class="phrase"><a name="fusion.adapted.boost__array.model_of"></a></span><a class="link" href="boost__array.html#fusion.adapted.boost__array.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </li></ul></div> +<h5> +<a name="fusion.adapted.boost__array.h2"></a> + <span class="phrase"><a name="fusion.adapted.boost__array.example"></a></span><a class="link" href="boost__array.html#fusion.adapted.boost__array.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="number">3</span><span class="special">></span> <span class="identifier">arr</span> <span class="special">=</span> <span class="special">{{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">}};</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><a class="link" href="../iterator/functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><a class="link" href="../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">arr</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><span class="identifier">arr</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.boost__array.h3"></a> + <span class="phrase"><a name="fusion.adapted.boost__array.see_also"></a></span><a class="link" href="boost__array.html#fusion.adapted.boost__array.see_also">See + also</a> + </h5> +<p> + <a href="http://www.boost.org/doc/html/array.html" target="_top">Boost.Array Library</a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mpl_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__tuple.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/boost__tuple.html b/libs/fusion/doc/html/fusion/adapted/boost__tuple.html new file mode 100644 index 000000000..cdcbcbbbf --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/boost__tuple.html @@ -0,0 +1,82 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>boost::tuple</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="boost__array.html" title="boost::array"> +<link rel="next" href="adapt_struct.html" title="BOOST_FUSION_ADAPT_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="boost__array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.boost__tuple"></a><a class="link" href="boost__tuple.html" title="boost::tuple">boost::tuple</a> +</h3></div></div></div> +<p> + This module provides adapters for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code>. + Including the module header makes <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code> + a fully conforming <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.boost__tuple.h0"></a> + <span class="phrase"><a name="fusion.adapted.boost__tuple.header"></a></span><a class="link" href="boost__tuple.html#fusion.adapted.boost__tuple.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">boost_tuple</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">boost_tuple</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.boost__tuple.h1"></a> + <span class="phrase"><a name="fusion.adapted.boost__tuple.model_of"></a></span><a class="link" href="boost__tuple.html#fusion.adapted.boost__tuple.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li></ul></div> +<h5> +<a name="fusion.adapted.boost__tuple.h2"></a> + <span class="phrase"><a name="fusion.adapted.boost__tuple.example"></a></span><a class="link" href="boost__tuple.html#fusion.adapted.boost__tuple.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">example_tuple</span><span class="special">(</span><span class="number">101</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">example_tuple</span><span class="special">)</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">*</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">example_tuple</span><span class="special">))</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.boost__tuple.h3"></a> + <span class="phrase"><a name="fusion.adapted.boost__tuple.see_also"></a></span><a class="link" href="boost__tuple.html#fusion.adapted.boost__tuple.see_also">See + also</a> + </h5> +<p> + <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple + Library</a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="boost__array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapt_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_assoc_struct.html b/libs/fusion/doc/html/fusion/adapted/define_assoc_struct.html new file mode 100644 index 000000000..15db987d6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_assoc_struct.html @@ -0,0 +1,222 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_ASSOC_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="define_tpl_struct_inline.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE"> +<link rel="next" href="define_assoc_tpl_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_tpl_struct_inline.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_assoc_struct"></a><a class="link" href="define_assoc_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_STRUCT">BOOST_FUSION_DEFINE_ASSOC_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.define_assoc_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_struct.description"></a></span><a class="link" href="define_assoc_struct.html#fusion.adapted.define_assoc_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_DEFINE_ASSOC_STRUCT is a macro that can be used to generate + all the necessary boilerplate to define and adapt an arbitrary struct as + a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.define_assoc_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_struct.synopsis"></a></span><a class="link" href="define_assoc_struct.html#fusion.adapted.define_assoc_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_ASSOC_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">str</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.adapted.define_assoc_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_struct.expression_semantics"></a></span><a class="link" href="define_assoc_struct.html#fusion.adapted.define_assoc_struct.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code that defines and adapts <code class="computeroutput"><span class="identifier">struct_name</span></code> as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> + declares the namespace for <code class="computeroutput"><span class="identifier">struct_name</span></code>. + It yields to a fully qualified name for <code class="computeroutput"><span class="identifier">struct_name</span></code> + of <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">struct_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the struct is + placed in the global namespace. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">,</span> + <span class="identifier">key_typeN</span><span class="special">)</span></code> + triples declares the type, name and key type of each of the struct members + that are part of the sequence. + </p> +<p> + The macro should be used at global scope. Semantics of an expression is defined + only where it differs from, or is not defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span> <span class="special">=</span> + <span class="identifier">fs</span></code> + </p> + </td> +<td> + <p> + Assigns from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span><span class="special">.</span><span class="identifier">member_nameN</span></code> + </p> + </td> +<td> + <p> + Access of struct member <code class="computeroutput"><span class="identifier">member_nameN</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.adapted.define_assoc_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_struct.header"></a></span><a class="link" href="define_assoc_struct.html#fusion.adapted.define_assoc_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_assoc_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_struct.example"></a></span><a class="link" href="define_assoc_struct.html#fusion.adapted.define_assoc_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="comment">// demo::employee is a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_DEFINE_ASSOC_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">),</span> <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_tpl_struct_inline.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_assoc_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_assoc_tpl_struct.html b/libs/fusion/doc/html/fusion/adapted/define_assoc_tpl_struct.html new file mode 100644 index 000000000..a3aa5fec7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_assoc_tpl_struct.html @@ -0,0 +1,227 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="define_assoc_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_STRUCT"> +<link rel="next" href="../algorithm.html" title="Algorithm"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_assoc_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../algorithm.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_assoc_tpl_struct"></a><a class="link" href="define_assoc_tpl_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.define_assoc_tpl_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_tpl_struct.description"></a></span><a class="link" href="define_assoc_tpl_struct.html#fusion.adapted.define_assoc_tpl_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT is a macro that can be used to generate + all the necessary boilerplate to define and adapt an arbitrary template struct + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.define_assoc_tpl_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_tpl_struct.synopsis"></a></span><a class="link" href="define_assoc_tpl_struct.html#fusion.adapted.define_assoc_tpl_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">,</span> <span class="identifier">key_type0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">,</span> <span class="identifier">key_type1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Str</span></code></span></dt> +<dd><p> + An instantiated <code class="computeroutput"><span class="identifier">struct_name</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">str</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Str</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.adapted.define_assoc_tpl_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_tpl_struct.expression_semantics"></a></span><a class="link" href="define_assoc_tpl_struct.html#fusion.adapted.define_assoc_tpl_struct.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code that defines and adapts <code class="computeroutput"><span class="identifier">struct_name</span></code> as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> declares the namespace for <code class="computeroutput"><span class="identifier">struct_name</span></code>. It yields to a fully qualified + name for <code class="computeroutput"><span class="identifier">struct_name</span></code> of + <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">struct_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the struct is + placed in the global namespace. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">,</span> + <span class="identifier">key_typeN</span><span class="special">)</span></code> + triples declares the type, name and key type of each of the struct members + that are part of the sequence. + </p> +<p> + The macro should be used at global scope. Semantics of an expression is defined + only where it differs from, or is not defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span> <span class="special">=</span> + <span class="identifier">fs</span></code> + </p> + </td> +<td> + <p> + Assigns from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span><span class="special">.</span><span class="identifier">member_nameN</span></code> + </p> + </td> +<td> + <p> + Access of struct member <code class="computeroutput"><span class="identifier">member_nameN</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.adapted.define_assoc_tpl_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_tpl_struct.header"></a></span><a class="link" href="define_assoc_tpl_struct.html#fusion.adapted.define_assoc_tpl_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_assoc_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_assoc_tpl_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.define_assoc_tpl_struct.example"></a></span><a class="link" href="define_assoc_tpl_struct.html#fusion.adapted.define_assoc_tpl_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">keys</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="comment">// Any instantiated demo::employee is a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> <span class="special">(</span><span class="identifier">demo</span><span class="special">),</span> <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">,</span> <span class="identifier">name</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span><span class="special">,</span> <span class="identifier">age</span><span class="special">,</span> <span class="identifier">keys</span><span class="special">::</span><span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_assoc_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../algorithm.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_struct.html b/libs/fusion/doc/html/fusion/adapted/define_struct.html new file mode 100644 index 000000000..cabd13949 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_struct.html @@ -0,0 +1,208 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="adapt_assoc_tpl_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_ADT"> +<link rel="next" href="define_tpl_struct.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_tpl_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_struct"></a><a class="link" href="define_struct.html" title="BOOST_FUSION_DEFINE_STRUCT">BOOST_FUSION_DEFINE_STRUCT</a> +</h3></div></div></div> +<p> + BOOST_FUSION_DEFINE_STRUCT is a macro that can be used to generate all the + necessary boilerplate to define and adapt an arbitrary struct as a model + of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.define_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_struct.synopsis"></a></span><a class="link" href="define_struct.html#fusion.adapted.define_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">str</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.adapted.define_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_struct.expression_semantics"></a></span><a class="link" href="define_struct.html#fusion.adapted.define_struct.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code that defines and adapts <code class="computeroutput"><span class="identifier">struct_name</span></code> as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> + declares the namespace for <code class="computeroutput"><span class="identifier">struct_name</span></code>. + It yields to a fully qualified name for <code class="computeroutput"><span class="identifier">struct_name</span></code> + of <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">struct_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the struct is + placed in the global namespace. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">)</span></code> + pairs declares the type and names of each of the struct members that are + part of the sequence. + </p> +<p> + The macro should be used at global scope. Semantics of an expression is defined + only where it differs from, or is not defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">struct_name</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an instance of <code class="computeroutput"><span class="identifier">struct_name</span></code> + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span> <span class="special">=</span> + <span class="identifier">fs</span></code> + </p> + </td> +<td> + <p> + Assigns from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span><span class="special">.</span><span class="identifier">member_nameN</span></code> + </p> + </td> +<td> + <p> + Access of struct member <code class="computeroutput"><span class="identifier">member_nameN</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.adapted.define_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_struct.header"></a></span><a class="link" href="define_struct.html#fusion.adapted.define_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_struct.example"></a></span><a class="link" href="define_struct.html#fusion.adapted.define_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="comment">// demo::employee is a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_DEFINE_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">demo</span><span class="special">),</span> <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapt_assoc_tpl_adt.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_tpl_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_struct_inline.html b/libs/fusion/doc/html/fusion/adapted/define_struct_inline.html new file mode 100644 index 000000000..55b7fdf28 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_struct_inline.html @@ -0,0 +1,105 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_STRUCT_INLINE</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="define_tpl_struct.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT"> +<link rel="next" href="define_tpl_struct_inline.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_tpl_struct_inline.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_struct_inline"></a><a class="link" href="define_struct_inline.html" title="BOOST_FUSION_DEFINE_STRUCT_INLINE">BOOST_FUSION_DEFINE_STRUCT_INLINE</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.define_struct_inline.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_struct_inline.description"></a></span><a class="link" href="define_struct_inline.html#fusion.adapted.define_struct_inline.description">Description</a> + </h5> +<p> + BOOST_FUSION_DEFINE_STRUCT_INLINE is a macro that can be used to generate + all the necessary boilerplate to define and adapt an arbitrary struct as + a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. Unlike BOOST_FUSION_DEFINE_STRUCT, it can be used + at class or namespace scope. + </p> +<h5> +<a name="fusion.adapted.define_struct_inline.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_struct_inline.synopsis"></a></span><a class="link" href="define_struct_inline.html#fusion.adapted.define_struct_inline.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_STRUCT_INLINE</span><span class="special">(</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.define_struct_inline.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_struct_inline.expression_semantics"></a></span><a class="link" href="define_struct_inline.html#fusion.adapted.define_struct_inline.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The semantics of BOOST_FUSION_DEFINE_STRUCT_INLINE are identical to those + of BOOST_FUSION_DEFINE_STRUCT, with two differences: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + BOOST_FUSION_DEFINE_STRUCT_INLINE can be used at class or namespace scope, + and thus does not take a namespace list parameter. + </li> +<li class="listitem"> + The structure generated by BOOST_FUSION_DEFINE_STRUCT_INLINE has a base + class, and is thus not POD in C++03. + </li> +</ol></div> +<h5> +<a name="fusion.adapted.define_struct_inline.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_struct_inline.header"></a></span><a class="link" href="define_struct_inline.html#fusion.adapted.define_struct_inline.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_struct_inline</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_struct_inline</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_struct_inline.h4"></a> + <span class="phrase"><a name="fusion.adapted.define_struct_inline.example"></a></span><a class="link" href="define_struct_inline.html#fusion.adapted.define_struct_inline.example">Example</a> + </h5> +<pre class="programlisting"><span class="comment">// enclosing::employee is a Fusion sequence</span> +<span class="keyword">class</span> <span class="identifier">enclosing</span> +<span class="special">{</span> + <span class="identifier">BOOST_FUSION_DEFINE_STRUCT_INLINE</span><span class="special">(</span> + <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +<span class="special">};</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_tpl_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_tpl_struct_inline.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_tpl_struct.html b/libs/fusion/doc/html/fusion/adapted/define_tpl_struct.html new file mode 100644 index 000000000..73e78d085 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_tpl_struct.html @@ -0,0 +1,217 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_TPL_STRUCT</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="define_struct.html" title="BOOST_FUSION_DEFINE_STRUCT"> +<link rel="next" href="define_struct_inline.html" title="BOOST_FUSION_DEFINE_STRUCT_INLINE"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_struct_inline.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_tpl_struct"></a><a class="link" href="define_tpl_struct.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT">BOOST_FUSION_DEFINE_TPL_STRUCT</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.define_tpl_struct.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct.description"></a></span><a class="link" href="define_tpl_struct.html#fusion.adapted.define_tpl_struct.description">Description</a> + </h5> +<p> + BOOST_FUSION_DEFINE_TPL_STRUCT is a macro that can be used to generate all + the necessary boilerplate to define and adapt an arbitrary template struct + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.define_tpl_struct.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct.synopsis"></a></span><a class="link" href="define_tpl_struct.html#fusion.adapted.define_tpl_struct.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...,</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Str</span></code></span></dt> +<dd><p> + An instantiated <code class="computeroutput"><span class="identifier">struct_name</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">str</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Str</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.adapted.define_tpl_struct.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct.expression_semantics"></a></span><a class="link" href="define_tpl_struct.html#fusion.adapted.define_tpl_struct.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The above macro generates the necessary code that defines and adapts <code class="computeroutput"><span class="identifier">struct_name</span></code> as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...</span></code> + declares the names of the template type parameters used. The sequence <code class="computeroutput"><span class="special">(</span><span class="identifier">namespace0</span><span class="special">)(</span><span class="identifier">namespace1</span><span class="special">)...</span></code> declares the namespace for <code class="computeroutput"><span class="identifier">struct_name</span></code>. It yields to a fully qualified + name for <code class="computeroutput"><span class="identifier">struct_name</span></code> of + <code class="computeroutput"><span class="identifier">namespace0</span><span class="special">::</span><span class="identifier">namespace1</span><span class="special">::...</span> + <span class="identifier">struct_name</span></code>. If an empty namespace + sequence is given (that is a macro that expands to nothing), the struct is + placed in the global namespace. The sequence of <code class="computeroutput"><span class="special">(</span><span class="identifier">member_typeN</span><span class="special">,</span> + <span class="identifier">member_nameN</span><span class="special">)</span></code> + pairs declares the type and names of each of the struct members that are + part of the sequence. + </p> +<p> + The macro should be used at global scope. Semantics of an expression is defined + only where it differs from, or is not defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Str</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an instance of <code class="computeroutput"><span class="identifier">Str</span></code> + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span> <span class="special">=</span> + <span class="identifier">fs</span></code> + </p> + </td> +<td> + <p> + Assigns from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">str</span><span class="special">.</span><span class="identifier">member_nameN</span></code> + </p> + </td> +<td> + <p> + Access of struct member <code class="computeroutput"><span class="identifier">member_nameN</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.adapted.define_tpl_struct.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct.header"></a></span><a class="link" href="define_tpl_struct.html#fusion.adapted.define_tpl_struct.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_struct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_tpl_struct.h4"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct.example"></a></span><a class="link" href="define_tpl_struct.html#fusion.adapted.define_tpl_struct.example">Example</a> + </h5> +<pre class="programlisting"><span class="comment">// Any instantiated demo::employee is a Fusion sequence</span> +<span class="identifier">BOOST_FUSION_DEFINE_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> <span class="special">(</span><span class="identifier">demo</span><span class="special">),</span> <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_struct.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_struct_inline.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/define_tpl_struct_inline.html b/libs/fusion/doc/html/fusion/adapted/define_tpl_struct_inline.html new file mode 100644 index 000000000..2333434fc --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/define_tpl_struct_inline.html @@ -0,0 +1,106 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="define_struct_inline.html" title="BOOST_FUSION_DEFINE_STRUCT_INLINE"> +<link rel="next" href="define_assoc_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_STRUCT"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_struct_inline.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_assoc_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.define_tpl_struct_inline"></a><a class="link" href="define_tpl_struct_inline.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE">BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</a> +</h3></div></div></div> +<h5> +<a name="fusion.adapted.define_tpl_struct_inline.h0"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct_inline.description"></a></span><a class="link" href="define_tpl_struct_inline.html#fusion.adapted.define_tpl_struct_inline.description">Description</a> + </h5> +<p> + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE is a macro that can be used to generate + all the necessary boilerplate to define and adapt an arbitrary template struct + as a model of <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. Unlike BOOST_FUSION_DEFINE_TPL_STRUCT, it can be + used at class or namespace scope. + </p> +<h5> +<a name="fusion.adapted.define_tpl_struct_inline.h1"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct_inline.synopsis"></a></span><a class="link" href="define_tpl_struct_inline.html#fusion.adapted.define_tpl_struct_inline.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">template_param0</span><span class="special">)(</span><span class="identifier">template_param1</span><span class="special">)...,</span> + <span class="identifier">struct_name</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">member_type0</span><span class="special">,</span> <span class="identifier">member_name0</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">member_type1</span><span class="special">,</span> <span class="identifier">member_name1</span><span class="special">)</span> + <span class="special">...</span> + <span class="special">)</span> +</pre> +<h5> +<a name="fusion.adapted.define_tpl_struct_inline.h2"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct_inline.expression_semantics"></a></span><a class="link" href="define_tpl_struct_inline.html#fusion.adapted.define_tpl_struct_inline.expression_semantics">Expression + Semantics</a> + </h5> +<p> + The semantics of BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE are identical to those + of BOOST_FUSION_DEFINE_TPL_STRUCT, with two differences: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE can be used at class or namespace + scope, and thus does not take a namespace list parameter. + </li> +<li class="listitem"> + The structure generated by BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE has + a base class, and is thus not POD in C++03. + </li> +</ol></div> +<h5> +<a name="fusion.adapted.define_tpl_struct_inline.h3"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct_inline.header"></a></span><a class="link" href="define_tpl_struct_inline.html#fusion.adapted.define_tpl_struct_inline.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="keyword">struct</span><span class="special">/</span><span class="identifier">define_struct_inline</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">define_struct_inline</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.define_tpl_struct_inline.h4"></a> + <span class="phrase"><a name="fusion.adapted.define_tpl_struct_inline.example"></a></span><a class="link" href="define_tpl_struct_inline.html#fusion.adapted.define_tpl_struct_inline.example">Example</a> + </h5> +<pre class="programlisting"><span class="comment">// Any instantiated enclosing::employee is a Fusion sequence</span> +<span class="keyword">class</span> <span class="identifier">enclosing</span> +<span class="special">{</span> + <span class="identifier">BOOST_FUSION_DEFINE_TPL_STRUCT</span><span class="special">(</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">)(</span><span class="identifier">Age</span><span class="special">),</span> <span class="identifier">employee</span><span class="special">,</span> + <span class="special">(</span><span class="identifier">Name</span><span class="special">,</span> <span class="identifier">name</span><span class="special">)</span> + <span class="special">(</span><span class="identifier">Age</span><span class="special">,</span> <span class="identifier">age</span><span class="special">))</span> +<span class="special">};</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="define_struct_inline.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="define_assoc_struct.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/mpl_sequence.html b/libs/fusion/doc/html/fusion/adapted/mpl_sequence.html new file mode 100644 index 000000000..f2d0fea7c --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/mpl_sequence.html @@ -0,0 +1,99 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>mpl sequence</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="std__pair.html" title="std::pair"> +<link rel="next" href="boost__array.html" title="boost::array"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="std__pair.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__array.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.mpl_sequence"></a><a class="link" href="mpl_sequence.html" title="mpl sequence">mpl sequence</a> +</h3></div></div></div> +<p> + This module provides adapters for <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences. Including the module header makes all <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences fully conforming fusion sequences. + </p> +<h5> +<a name="fusion.adapted.mpl_sequence.h0"></a> + <span class="phrase"><a name="fusion.adapted.mpl_sequence.header"></a></span><a class="link" href="mpl_sequence.html#fusion.adapted.mpl_sequence.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">mpl</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.mpl_sequence.h1"></a> + <span class="phrase"><a name="fusion.adapted.mpl_sequence.model_of"></a></span><a class="link" href="mpl_sequence.html#fusion.adapted.mpl_sequence.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + (If the <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequence is a forward sequence.) + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> (If the <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequence is a bidirectional sequence.) + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> (If the <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequence is a random access sequence.) + </li> +</ul></div> +<h5> +<a name="fusion.adapted.mpl_sequence.h2"></a> + <span class="phrase"><a name="fusion.adapted.mpl_sequence.example"></a></span><a class="link" href="mpl_sequence.html#fusion.adapted.mpl_sequence.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector_c</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="number">123</span><span class="special">,</span> <span class="number">456</span><span class="special">></span> <span class="identifier">vec_c</span><span class="special">;</span> +<span class="identifier">fusion</span><span class="special">::</span><span class="identifier">vector2</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="identifier">vec_c</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> + +<span class="identifier">v</span> <span class="special">=</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector_c</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="number">456</span><span class="special">,</span> <span class="number">789</span><span class="special">>();</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.mpl_sequence.h3"></a> + <span class="phrase"><a name="fusion.adapted.mpl_sequence.see_also"></a></span><a class="link" href="mpl_sequence.html#fusion.adapted.mpl_sequence.see_also">See + also</a> + </h5> +<p> + <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="std__pair.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__array.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/adapted/std__pair.html b/libs/fusion/doc/html/fusion/adapted/std__pair.html new file mode 100644 index 000000000..c8987f8c7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/adapted/std__pair.html @@ -0,0 +1,85 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>std::pair</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapted.html" title="Adapted"> +<link rel="prev" href="array.html" title="Array"> +<link rel="next" href="mpl_sequence.html" title="mpl sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mpl_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.adapted.std__pair"></a><a class="link" href="std__pair.html" title="std::pair">std::pair</a> +</h3></div></div></div> +<p> + This module provides adapters for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>. + Including the module header makes <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> + a fully conforming <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<h5> +<a name="fusion.adapted.std__pair.h0"></a> + <span class="phrase"><a name="fusion.adapted.std__pair.header"></a></span><a class="link" href="std__pair.html#fusion.adapted.std__pair.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.adapted.std__pair.h1"></a> + <span class="phrase"><a name="fusion.adapted.std__pair.model_of"></a></span><a class="link" href="std__pair.html#fusion.adapted.std__pair.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </li></ul></div> +<h5> +<a name="fusion.adapted.std__pair.h2"></a> + <span class="phrase"><a name="fusion.adapted.std__pair.example"></a></span><a class="link" href="std__pair.html#fusion.adapted.std__pair.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">p</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"Hola!!!"</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">p</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">p</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">p</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.adapted.std__pair.h3"></a> + <span class="phrase"><a name="fusion.adapted.std__pair.see_also"></a></span><a class="link" href="std__pair.html#fusion.adapted.std__pair.see_also">See + also</a> + </h5> +<p> + <a href="http://www.sgi.com/tech/stl/pair.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a>, + <a class="link" href="../tuple/pairs.html" title="Pairs"><code class="computeroutput"><span class="identifier">TR1</span> + <span class="keyword">and</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="array.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapted.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mpl_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm.html b/libs/fusion/doc/html/fusion/algorithm.html new file mode 100644 index 000000000..18052954c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm.html @@ -0,0 +1,127 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Algorithm</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="adapted/define_assoc_tpl_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT"> +<link rel="next" href="algorithm/auxiliary.html" title="Auxiliary"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapted/define_assoc_tpl_struct.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm/auxiliary.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.algorithm"></a><a class="link" href="algorithm.html" title="Algorithm">Algorithm</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="algorithm/auxiliary.html">Auxiliary</a></span></dt> +<dd><dl><dt><span class="section"><a href="algorithm/auxiliary/functions.html">Functions</a></span></dt></dl></dd> +<dt><span class="section"><a href="algorithm/iteration.html">Iteration</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="algorithm/iteration/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="algorithm/iteration/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="algorithm/query.html">Query</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="algorithm/query/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="algorithm/query/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="algorithm/transformation.html">Transformation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="algorithm/transformation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="algorithm/transformation/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></div> +<h4> +<a name="fusion.algorithm.h0"></a> + <span class="phrase"><a name="fusion.algorithm.lazy_evaluation"></a></span><a class="link" href="algorithm.html#fusion.algorithm.lazy_evaluation">Lazy + Evaluation</a> + </h4> +<p> + Unlike <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, Fusion + algorithms are lazy<a href="#ftn.fusion.algorithm.f0" class="footnote" name="fusion.algorithm.f0"><sup class="footnote">[11]</sup></a> and non sequence-type preserving <a href="#ftn.fusion.algorithm.f1" class="footnote" name="fusion.algorithm.f1"><sup class="footnote">[12]</sup></a>. This is by design. Runtime efficiency is given a high priority. + Like <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, and + unlike <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>, + fusion algorithms are mostly functional in nature such that algorithms are + non mutating (no side effects). However, due to the high cost of returning + full sequences such as vectors and lists, <span class="emphasis"><em>Views</em></span> are returned + from Fusion algorithms instead. For example, the <a class="link" href="algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a> algorithm does not actually + return a transformed version of the original sequence. <a class="link" href="algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a> returns a <a class="link" href="view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a>. This view holds a + reference to the original sequence plus the transform function. Iteration over + the <a class="link" href="view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + will apply the transform function over the sequence elements on demand. This + <span class="emphasis"><em>lazy</em></span> evaluation scheme allows us to chain as many algorithms + as we want without incurring a high runtime penalty. + </p> +<h4> +<a name="fusion.algorithm.h1"></a> + <span class="phrase"><a name="fusion.algorithm.sequence_extension"></a></span><a class="link" href="algorithm.html#fusion.algorithm.sequence_extension">Sequence + Extension</a> + </h4> +<p> + The <span class="emphasis"><em>lazy</em></span> evaluation scheme where <a class="link" href="algorithm.html" title="Algorithm">Algorithms</a> + return <a class="link" href="view.html" title="View">Views</a> also allows operations such + as <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> to be totally generic. In + Fusion, <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> is actually a generic algorithm + that works on all sequences. Given an input sequence <code class="computeroutput"><span class="identifier">s</span></code> + and a value <code class="computeroutput"><span class="identifier">x</span></code>, Fusion's <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> algorithm simply returns + a <a class="link" href="view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a>: + a view that holds a reference to the original sequence <code class="computeroutput"><span class="identifier">s</span></code> + and the value <code class="computeroutput"><span class="identifier">x</span></code>. Functions + that were once sequence specific and need to be implemented N times over N + different sequences are now implemented only once. That is to say that Fusion + sequences are cheaply extensible. + </p> +<p> + To regain the original sequence, <a class="link" href="container/conversion/functions.html" title="Functions">Conversion</a> + functions are provided. You may use one of the <a class="link" href="container/conversion/functions.html" title="Functions">Conversion</a> + functions to convert back to the original sequence type. + </p> +<h4> +<a name="fusion.algorithm.h2"></a> + <span class="phrase"><a name="fusion.algorithm.header"></a></span><a class="link" href="algorithm.html#fusion.algorithm.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.algorithm.f0" class="footnote"><p><a href="#fusion.algorithm.f0" class="para"><sup class="para">[11] </sup></a> + Except for some special cases such as <a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a> and <a class="link" href="algorithm/auxiliary/functions/copy.html" title="copy"><code class="computeroutput"><span class="identifier">copy</span></code></a> which are inherently imperative + algorithms. + </p></div> +<div id="ftn.fusion.algorithm.f1" class="footnote"><p><a href="#fusion.algorithm.f1" class="para"><sup class="para">[12] </sup></a> + What does that mean? It means that when you operate on a sequence through + a Fusion algorithm that returns a sequence, the sequence returned may not + be of the same class as the original + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapted/define_assoc_tpl_struct.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm/auxiliary.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/auxiliary.html b/libs/fusion/doc/html/fusion/algorithm/auxiliary.html new file mode 100644 index 000000000..a996f989c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/auxiliary.html @@ -0,0 +1,55 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Auxiliary</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../algorithm.html" title="Algorithm"> +<link rel="prev" href="../algorithm.html" title="Algorithm"> +<link rel="next" href="auxiliary/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../algorithm.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="auxiliary/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.algorithm.auxiliary"></a><a class="link" href="auxiliary.html" title="Auxiliary">Auxiliary</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"><dt><span class="section"><a href="auxiliary/functions.html">Functions</a></span></dt></dl></div> +<p> + The auxiliary algorithms provide the utility algorithms for sequences. + </p> +<h5> +<a name="fusion.algorithm.auxiliary.h0"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.header"></a></span><a class="link" href="auxiliary.html#fusion.algorithm.auxiliary.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">auxiliary</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">auxiliary</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../algorithm.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="auxiliary/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions.html b/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions.html new file mode 100644 index 000000000..5bb9e0b62 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions.html @@ -0,0 +1,45 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../auxiliary.html" title="Auxiliary"> +<link rel="prev" href="../auxiliary.html" title="Auxiliary"> +<link rel="next" href="functions/copy.html" title="copy"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/copy.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.auxiliary.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"><dt><span class="section"><a href="functions/copy.html">copy</a></span></dt></dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/copy.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions/copy.html b/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions/copy.html new file mode 100644 index 000000000..ab142ec17 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/auxiliary/functions/copy.html @@ -0,0 +1,170 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>copy</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="../../iteration.html" title="Iteration"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../iteration.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.auxiliary.functions.copy"></a><a class="link" href="copy.html" title="copy">copy</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h0"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.description"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.description">Description</a> + </h6> +<p> + Copy a sequence <code class="computeroutput"><span class="identifier">src</span></code> to + a sequence <code class="computeroutput"><span class="identifier">dest</span></code>. It is + also used to convert sequence into other. + </p> +<h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h1"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.synopsis"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">void</span> <span class="identifier">copy</span><span class="special">(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">src</span><span class="special">,</span> <span class="identifier">Seq2</span><span class="special">&</span> <span class="identifier">dest</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.auxiliary.functions.copy.t0"></a><p class="title"><b>Table 1.37. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">src</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, all elements contained in the <code class="computeroutput"><span class="identifier">src</span></code> sequence should be convertible + into the element contained in the <code class="computeroutput"><span class="identifier">dest</span></code> + sequence. + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">dest</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">e2</span> + <span class="special">=</span> <span class="identifier">e1</span></code> + is valid expression for each pair of elements <code class="computeroutput"><span class="identifier">e1</span></code> of <code class="computeroutput"><span class="identifier">src</span></code> + and <code class="computeroutput"><span class="identifier">e2</span></code> of + <code class="computeroutput"><span class="identifier">dest</span></code>. + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h2"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.expression_semantics"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="copy.html" title="copy"><code class="computeroutput"><span class="identifier">copy</span></code></a><span class="special">(</span><span class="identifier">src</span><span class="special">,</span> <span class="identifier">dest</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: <code class="computeroutput"><span class="identifier">e2</span> + <span class="special">=</span> <span class="identifier">e1</span></code> + for each element <code class="computeroutput"><span class="identifier">e1</span></code> in + <code class="computeroutput"><span class="identifier">src</span></code> and <code class="computeroutput"><span class="identifier">e2</span></code> in <code class="computeroutput"><span class="identifier">dest</span></code>. + </p> +<h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h3"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.complexity"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code>. + </p> +<h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h4"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.header"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">auxiliary</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.auxiliary.functions.copy.h5"></a> + <span class="phrase"><a name="fusion.algorithm.auxiliary.functions.copy.example"></a></span><a class="link" href="copy.html#fusion.algorithm.auxiliary.functions.copy.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<a class="link" href="../../../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">ls</span><span class="special">;</span> +<a class="link" href="copy.html" title="copy"><code class="computeroutput"><span class="identifier">copy</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">ls</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">ls</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../iteration.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration.html b/libs/fusion/doc/html/fusion/algorithm/iteration.html new file mode 100644 index 000000000..9f8503382 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration.html @@ -0,0 +1,59 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Iteration</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../algorithm.html" title="Algorithm"> +<link rel="prev" href="auxiliary/functions/copy.html" title="copy"> +<link rel="next" href="iteration/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="auxiliary/functions/copy.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iteration/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.algorithm.iteration"></a><a class="link" href="iteration.html" title="Iteration">Iteration</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="iteration/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="iteration/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +<p> + The iteration algorithms provide the fundamental algorithms for traversing + a sequence repeatedly applying an operation to its elements. + </p> +<h5> +<a name="fusion.algorithm.iteration.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.header"></a></span><a class="link" href="iteration.html#fusion.algorithm.iteration.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="auxiliary/functions/copy.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iteration/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions.html new file mode 100644 index 000000000..d86bbaa86 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions.html @@ -0,0 +1,52 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iteration.html" title="Iteration"> +<link rel="prev" href="../iteration.html" title="Iteration"> +<link rel="next" href="functions/fold.html" title="fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../iteration.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iteration.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/fold.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.iteration.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/fold.html">fold</a></span></dt> +<dt><span class="section"><a href="functions/reverse_fold.html">reverse_fold</a></span></dt> +<dt><span class="section"><a href="functions/iter_fold.html">iter_fold</a></span></dt> +<dt><span class="section"><a href="functions/reverse_iter_fold.html">reverse_iter_fold</a></span></dt> +<dt><span class="section"><a href="functions/accumulate.html">accumulate</a></span></dt> +<dt><span class="section"><a href="functions/for_each.html">for_each</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../iteration.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iteration.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/fold.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/accumulate.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/accumulate.html new file mode 100644 index 000000000..445377811 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/accumulate.html @@ -0,0 +1,209 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>accumulate</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="reverse_iter_fold.html" title="reverse_iter_fold"> +<link rel="next" href="for_each.html" title="for_each"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.accumulate"></a><a class="link" href="accumulate.html" title="accumulate">accumulate</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.description"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code>, initial + state <code class="computeroutput"><span class="identifier">initial_state</span></code>, + and binary function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="literal">accumulate</code> returns the result of the repeated application + of binary <code class="computeroutput"><span class="identifier">f</span></code> to the result + of the previous <code class="computeroutput"><span class="identifier">f</span></code> invocation + (<code class="computeroutput"><span class="identifier">inital_state</span></code> if it is + the first call) and each element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.synopsis"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/accumulate.html" title="accumulate"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">accumulate</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> accumulate<span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/accumulate.html" title="accumulate"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">accumulate</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> accumulate<span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.accumulate.t0"></a><p class="title"><b>Table 1.42. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">initial_state</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Initial state + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with return type <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> for current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and for each element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.expression_semantics"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">accumulate<span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="literal">f(... + f(f(initial_state,e1),e2) ...eN)</code> where <code class="literal">e1 ...eN</code> + are the consecutive elements of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.complexity"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.header"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>accumulate<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>accumulate<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.accumulate.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.accumulate.example"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.functions.accumulate.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">make_string</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">str</span> <span class="special">+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span>t<span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span>accumulate<span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">),</span> <span class="identifier">make_string</span><span class="special">())</span> <span class="special">==</span> "12"<span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/fold.html new file mode 100644 index 000000000..1ae095275 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/fold.html @@ -0,0 +1,209 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="reverse_fold.html" title="reverse_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.fold"></a><a class="link" href="fold.html" title="fold">fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.description"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code>, initial + state <code class="computeroutput"><span class="identifier">initial_state</span></code>, + and binary function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="literal">fold</code> returns the result of the repeated application + of binary <code class="computeroutput"><span class="identifier">f</span></code> to the result + of the previous <code class="computeroutput"><span class="identifier">f</span></code> invocation + (<code class="computeroutput"><span class="identifier">inital_state</span></code> if it is + the first call) and each element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.synopsis"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/fold.html" title="fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> fold<span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/fold.html" title="fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> fold<span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.fold.t0"></a><p class="title"><b>Table 1.38. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">initial_state</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Initial state + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with return type <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> for current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and for each element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.expression_semantics"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">fold<span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="literal">f(... + f(f(initial_state,e1),e2) ...eN)</code> where <code class="literal">e1 ...eN</code> + are the consecutive elements of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.complexity"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.header"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.fold.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.fold.example"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.functions.fold.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">make_string</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">str</span> <span class="special">+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span>t<span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span>fold<span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">),</span> <span class="identifier">make_string</span><span class="special">())</span> <span class="special">==</span> "12"<span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/for_each.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/for_each.html new file mode 100644 index 000000000..e309cc724 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/for_each.html @@ -0,0 +1,174 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>for_each</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="accumulate.html" title="accumulate"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.for_each"></a><a class="link" href="for_each.html" title="for_each">for_each</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.for_each.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.description"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.description">Description</a> + </h6> +<p> + Applies a unary function object to each element of a sequence. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.for_each.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.synopsis"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">for_each</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">for_each</span><span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.for_each.t0"></a><p class="title"><b>Table 1.43. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> must be a valid expression + for each element <code class="computeroutput"><span class="identifier">e</span></code> + in <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A unary <a class="link" href="../../../functional/concepts/reg_callable.html" title="Regular Callable Object">Regular + Callable Object</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.for_each.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.expression_semantics"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Calls <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> for each element <code class="computeroutput"><span class="identifier">e</span></code> + in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.for_each.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.complexity"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.for_each.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.header"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.for_each.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.for_each.example"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.functions.for_each.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">increment</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="special">++</span><span class="identifier">t</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<a class="link" href="for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">increment</span><span class="special">());</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">vec</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/iter_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/iter_fold.html new file mode 100644 index 000000000..cffddf399 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/iter_fold.html @@ -0,0 +1,209 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>iter_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="reverse_fold.html" title="reverse_fold"> +<link rel="next" href="reverse_iter_fold.html" title="reverse_iter_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.iter_fold"></a><a class="link" href="iter_fold.html" title="iter_fold">iter_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.description"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code>, initial + state <code class="computeroutput"><span class="identifier">initial_state</span></code>, + and binary function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="literal">iter_fold</code> returns the result of the repeated application + of binary <code class="computeroutput"><span class="identifier">f</span></code> to the result + of the previous <code class="computeroutput"><span class="identifier">f</span></code> invocation + (<code class="computeroutput"><span class="identifier">inital_state</span></code> if it is + the first call) and iterators on each element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.synopsis"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/iter_fold.html" title="iter_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">iter_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> iter_fold<span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/iter_fold.html" title="iter_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">iter_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> iter_fold<span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.iter_fold.t0"></a><p class="title"><b>Table 1.40. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">initial_state</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Initial state + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>it<span class="special">)</span></code> with return type <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>It<span class="special">)>::</span><span class="identifier">type</span></code> for current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and for each iterator <code class="computeroutput"><span class="identifier">it</span></code> + of type <code class="computeroutput"><span class="identifier">It</span></code> + on an element of <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.expression_semantics"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">iter_fold<span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="literal">f(... + f(f(initial_state,it1),it2) ...itN)</code> where <code class="literal">it1 ...itN</code> + are consecutive iterators on the elements of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.complexity"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.header"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.iter_fold.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.iter_fold.example"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.functions.iter_fold.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">make_string</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">str</span> <span class="special">+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>(t)<span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span>iter_fold<span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">),</span> <span class="identifier">make_string</span><span class="special">())</span> <span class="special">==</span> "12"<span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html new file mode 100644 index 000000000..9cb222098 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html @@ -0,0 +1,209 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="fold.html" title="fold"> +<link rel="next" href="iter_fold.html" title="iter_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.reverse_fold"></a><a class="link" href="reverse_fold.html" title="reverse_fold">reverse_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.description"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code>, initial + state <code class="computeroutput"><span class="identifier">initial_state</span></code>, + and binary function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="literal">reverse_fold</code> returns the result of the repeated application + of binary <code class="computeroutput"><span class="identifier">f</span></code> to the result + of the previous <code class="computeroutput"><span class="identifier">f</span></code> invocation + (<code class="computeroutput"><span class="identifier">inital_state</span></code> if it is + the first call) and each element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.synopsis"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/reverse_fold.html" title="reverse_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> reverse_fold<span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/reverse_fold.html" title="reverse_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> reverse_fold<span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.reverse_fold.t0"></a><p class="title"><b>Table 1.39. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">initial_state</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Initial state + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with return type <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> for current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and for each element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.expression_semantics"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">reverse_fold<span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="literal">f(... + f(f(initial_state,eN),eN-1) ...e1)</code> where <code class="literal">e1 ...eN</code> + are the consecutive elements of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.complexity"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.header"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>reverse_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>reverse_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_fold.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_fold.example"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.functions.reverse_fold.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">make_string</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">str</span> <span class="special">+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span>t<span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span>reverse_fold<span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">),</span> <span class="identifier">make_string</span><span class="special">())</span> <span class="special">==</span> "21"<span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html new file mode 100644 index 000000000..b53a57273 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html @@ -0,0 +1,209 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse_iter_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="iter_fold.html" title="iter_fold"> +<link rel="next" href="accumulate.html" title="accumulate"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="accumulate.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold"></a><a class="link" href="reverse_iter_fold.html" title="reverse_iter_fold">reverse_iter_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.description"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code>, initial + state <code class="computeroutput"><span class="identifier">initial_state</span></code>, + and binary function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="literal">reverse_iter_fold</code> returns the result of the repeated + application of binary <code class="computeroutput"><span class="identifier">f</span></code> + to the result of the previous <code class="computeroutput"><span class="identifier">f</span></code> + invocation (<code class="computeroutput"><span class="identifier">inital_state</span></code> + if it is the first call) and iterators on each element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.synopsis"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/reverse_iter_fold.html" title="reverse_iter_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse_iter_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> reverse_iter_fold<span class="special">(</span> + <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/reverse_iter_fold.html" title="reverse_iter_fold"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse_iter_fold</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> reverse_iter_fold<span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">State</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.t0"></a><p class="title"><b>Table 1.41. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">initial_state</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Initial state + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>it<span class="special">)</span></code> with return type <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>It<span class="special">)>::</span><span class="identifier">type</span></code> for current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and for each iterator <code class="computeroutput"><span class="identifier">it</span></code> + of type <code class="computeroutput"><span class="identifier">It</span></code> + on an element of <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.expression_semantics"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">reverse_iter_fold<span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">initial_state</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="literal">f(... + f(f(initial_state,itN),itN-1) ...it1)</code> where <code class="literal">it1 ...itN</code> + are consecutive iterators on the elements of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.complexity"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.header"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>reverse_iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>reverse_iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.iteration.functions.reverse_iter_fold.h5"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.functions.reverse_iter_fold.example"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.functions.reverse_iter_fold.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">make_string</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">str</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">str</span> <span class="special">+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>(t)<span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span>reverse_iter_fold<span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">),</span> <span class="identifier">make_string</span><span class="special">())</span> <span class="special">==</span> "21"<span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="accumulate.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions.html new file mode 100644 index 000000000..fe3431160 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions.html @@ -0,0 +1,52 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iteration.html" title="Iteration"> +<link rel="prev" href="functions/for_each.html" title="for_each"> +<link rel="next" href="metafunctions/fold.html" title="fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/for_each.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iteration.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/fold.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.iteration.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/fold.html">fold</a></span></dt> +<dt><span class="section"><a href="metafunctions/reverse_fold.html">reverse_fold</a></span></dt> +<dt><span class="section"><a href="metafunctions/iter_fold.html">iter_fold</a></span></dt> +<dt><span class="section"><a href="metafunctions/reverse_iter_fold.html">reverse_iter_fold</a></span></dt> +<dt><span class="section"><a href="metafunctions/accumulate.html">accumulate</a></span></dt> +<dt><span class="section"><a href="metafunctions/for_each.html">for_each</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/for_each.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iteration.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/fold.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html new file mode 100644 index 000000000..945225b93 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html @@ -0,0 +1,180 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>accumulate</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="reverse_iter_fold.html" title="reverse_iter_fold"> +<link rel="next" href="for_each.html" title="for_each"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.accumulate"></a><a class="link" href="accumulate.html" title="accumulate">accumulate</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.accumulate.description"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.metafunctions.accumulate.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/accumulate.html" title="accumulate"><code class="computeroutput"><span class="identifier">accumulate</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.accumulate.synopsis"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.metafunctions.accumulate.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">struct</span> accumulate +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.t0"></a><p class="title"><b>Table 1.48. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to iterate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">State</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The initial state for the first application of <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> is the return type of + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and an element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The operation to be applied on traversal + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.accumulate.expression_semantics"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.metafunctions.accumulate.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">accumulate<span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of applying + <a class="link" href="../functions/accumulate.html" title="accumulate"><code class="computeroutput"><span class="identifier">accumulate</span></code></a> to a sequence of + type <code class="computeroutput"><span class="identifier">Sequence</span></code>, with an + initial state of type <code class="computeroutput"><span class="identifier">State</span></code> + and binary function object or function pointer of type <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.accumulate.complexity"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.metafunctions.accumulate.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.accumulate.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.accumulate.header"></a></span><a class="link" href="accumulate.html#fusion.algorithm.iteration.metafunctions.accumulate.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>accumulate<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>accumulate<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/fold.html new file mode 100644 index 000000000..09efc01f8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/fold.html @@ -0,0 +1,180 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="reverse_fold.html" title="reverse_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.fold"></a><a class="link" href="fold.html" title="fold">fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.fold.description"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.metafunctions.fold.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/fold.html" title="fold"><code class="computeroutput"><span class="identifier">fold</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.fold.synopsis"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.metafunctions.fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">struct</span> fold +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.fold.t0"></a><p class="title"><b>Table 1.44. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to iterate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">State</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The initial state for the first application of <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> is the return type of + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and an element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The operation to be applied on traversal + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.fold.expression_semantics"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.metafunctions.fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">fold<span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of applying + <a class="link" href="../functions/fold.html" title="fold"><code class="computeroutput"><span class="identifier">fold</span></code></a> to a sequence of type + <code class="computeroutput"><span class="identifier">Sequence</span></code>, with an initial + state of type <code class="computeroutput"><span class="identifier">State</span></code> and + binary function object or function pointer of type <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.fold.complexity"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.metafunctions.fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.fold.header"></a></span><a class="link" href="fold.html#fusion.algorithm.iteration.metafunctions.fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html new file mode 100644 index 000000000..3fdea141f --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html @@ -0,0 +1,160 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>for_each</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="accumulate.html" title="accumulate"> +<link rel="next" href="../../query.html" title="Query"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../query.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.for_each"></a><a class="link" href="for_each.html" title="for_each">for_each</a> +</h5></div></div></div> +<p> + A metafunction returning the result type of applying <a class="link" href="../functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a> to a sequence. The + return type of <a class="link" href="../functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a> is always <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.for_each.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.for_each.description"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.metafunctions.for_each.description">Description</a> + </h6> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.for_each.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.for_each.synopsis"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.metafunctions.for_each.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> +<span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">for_each</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.for_each.t0"></a><p class="title"><b>Table 1.49. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.for_each.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.for_each.expression_semantics"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.metafunctions.for_each.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">for_each</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a> for a sequence of type + <code class="computeroutput"><span class="identifier">Sequence</span></code> and a unary + function object <code class="computeroutput"><span class="identifier">F</span></code>. The + return type is always <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.for_each.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.for_each.complexity"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.metafunctions.for_each.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.for_each.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.for_each.header"></a></span><a class="link" href="for_each.html#fusion.algorithm.iteration.metafunctions.for_each.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../query.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html new file mode 100644 index 000000000..4e6738988 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html @@ -0,0 +1,180 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>iter_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="reverse_fold.html" title="reverse_fold"> +<link rel="next" href="reverse_iter_fold.html" title="reverse_iter_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold"></a><a class="link" href="iter_fold.html" title="iter_fold">iter_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.iter_fold.description"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.metafunctions.iter_fold.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/iter_fold.html" title="iter_fold"><code class="computeroutput"><span class="identifier">iter_fold</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.iter_fold.synopsis"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.metafunctions.iter_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">struct</span> iter_fold +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.t0"></a><p class="title"><b>Table 1.46. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to iterate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">State</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The initial state for the first application of <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>It<span class="special">)>::</span><span class="identifier">type</span></code> is the return type of + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>it<span class="special">)</span></code> with current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and an iterator <code class="computeroutput"><span class="identifier">it</span></code> + of type <code class="computeroutput"><span class="identifier">It</span></code> + on an element of <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The operation to be applied on traversal + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.iter_fold.expression_semantics"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.metafunctions.iter_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">iter_fold<span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of applying + <a class="link" href="../functions/iter_fold.html" title="iter_fold"><code class="computeroutput"><span class="identifier">iter_fold</span></code></a> to a sequence of type + <code class="computeroutput"><span class="identifier">Sequence</span></code>, with an initial + state of type <code class="computeroutput"><span class="identifier">State</span></code> and + binary function object or function pointer of type <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.iter_fold.complexity"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.metafunctions.iter_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.iter_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.iter_fold.header"></a></span><a class="link" href="iter_fold.html#fusion.algorithm.iteration.metafunctions.iter_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html new file mode 100644 index 000000000..3f36b5e84 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html @@ -0,0 +1,180 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="fold.html" title="fold"> +<link rel="next" href="iter_fold.html" title="iter_fold"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold"></a><a class="link" href="reverse_fold.html" title="reverse_fold">reverse_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_fold.description"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.metafunctions.reverse_fold.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/reverse_fold.html" title="reverse_fold"><code class="computeroutput"><span class="identifier">reverse_fold</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_fold.synopsis"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.metafunctions.reverse_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">struct</span> reverse_fold +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.t0"></a><p class="title"><b>Table 1.45. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to iterate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">State</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The initial state for the first application of <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>E<span class="special">)>::</span><span class="identifier">type</span></code> is the return type of + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>e<span class="special">)</span></code> with current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and an element <code class="computeroutput"><span class="identifier">e</span></code> + of type <code class="computeroutput"><span class="identifier">E</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The operation to be applied on traversal + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_fold.expression_semantics"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.metafunctions.reverse_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">reverse_fold<span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of applying + <a class="link" href="../functions/reverse_fold.html" title="reverse_fold"><code class="computeroutput"><span class="identifier">reverse_fold</span></code></a> to a sequence of + type <code class="computeroutput"><span class="identifier">Sequence</span></code>, with an + initial state of type <code class="computeroutput"><span class="identifier">State</span></code> + and binary function object or function pointer of type <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_fold.complexity"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.metafunctions.reverse_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_fold.header"></a></span><a class="link" href="reverse_fold.html#fusion.algorithm.iteration.metafunctions.reverse_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>reverse_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>reverse_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html new file mode 100644 index 000000000..54e1b1496 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html @@ -0,0 +1,180 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse_iter_fold</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="iter_fold.html" title="iter_fold"> +<link rel="next" href="accumulate.html" title="accumulate"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="accumulate.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold"></a><a class="link" href="reverse_iter_fold.html" title="reverse_iter_fold">reverse_iter_fold</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.h0"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.description"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.metafunctions.reverse_iter_fold.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/reverse_iter_fold.html" title="reverse_iter_fold"><code class="computeroutput"><span class="identifier">reverse_iter_fold</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.h1"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.synopsis"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.metafunctions.reverse_iter_fold.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">State</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">struct</span> reverse_iter_fold +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.t0"></a><p class="title"><b>Table 1.47. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to iterate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">State</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The initial state for the first application of <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">S</span><span class="special">,</span>It<span class="special">)>::</span><span class="identifier">type</span></code> is the return type of + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>it<span class="special">)</span></code> with current state <code class="computeroutput"><span class="identifier">s</span></code> of type <code class="computeroutput"><span class="identifier">S</span></code>, + and an iterator <code class="computeroutput"><span class="identifier">it</span></code> + of type <code class="computeroutput"><span class="identifier">It</span></code> + on an element of <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The operation to be applied on traversal + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.h2"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.expression_semantics"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.metafunctions.reverse_iter_fold.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting">reverse_iter_fold<span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of applying + <a class="link" href="../functions/reverse_iter_fold.html" title="reverse_iter_fold"><code class="computeroutput"><span class="identifier">reverse_iter_fold</span></code></a> to a sequence + of type <code class="computeroutput"><span class="identifier">Sequence</span></code>, with + an initial state of type <code class="computeroutput"><span class="identifier">State</span></code> + and binary function object or function pointer of type <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.h3"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.complexity"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.metafunctions.reverse_iter_fold.complexity">Complexity</a> + </h6> +<p> + Linear, exactly <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> applications of <code class="computeroutput"><span class="identifier">F</span></code>. + </p> +<h6> +<a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.h4"></a> + <span class="phrase"><a name="fusion.algorithm.iteration.metafunctions.reverse_iter_fold.header"></a></span><a class="link" href="reverse_iter_fold.html#fusion.algorithm.iteration.metafunctions.reverse_iter_fold.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">iteration</span><span class="special">/</span>reverse_iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span>reverse_iter_fold<span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iter_fold.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="accumulate.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query.html b/libs/fusion/doc/html/fusion/algorithm/query.html new file mode 100644 index 000000000..53934101f --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query.html @@ -0,0 +1,58 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Query</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../algorithm.html" title="Algorithm"> +<link rel="prev" href="iteration/metafunctions/for_each.html" title="for_each"> +<link rel="next" href="query/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iteration/metafunctions/for_each.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="query/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.algorithm.query"></a><a class="link" href="query.html" title="Query">Query</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="query/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="query/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +<p> + The query algorithms provide support for searching and analyzing sequences. + </p> +<h5> +<a name="fusion.algorithm.query.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.header"></a></span><a class="link" href="query.html#fusion.algorithm.query.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">query</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iteration/metafunctions/for_each.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="query/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions.html b/libs/fusion/doc/html/fusion/algorithm/query/functions.html new file mode 100644 index 000000000..069ec4b06 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions.html @@ -0,0 +1,53 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../query.html" title="Query"> +<link rel="prev" href="../query.html" title="Query"> +<link rel="next" href="functions/any.html" title="any"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../query.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../query.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/any.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.query.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/any.html">any</a></span></dt> +<dt><span class="section"><a href="functions/all.html">all</a></span></dt> +<dt><span class="section"><a href="functions/none.html">none</a></span></dt> +<dt><span class="section"><a href="functions/find.html">find</a></span></dt> +<dt><span class="section"><a href="functions/find_if.html">find_if</a></span></dt> +<dt><span class="section"><a href="functions/count.html">count</a></span></dt> +<dt><span class="section"><a href="functions/count_if.html">count_if</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../query.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../query.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/any.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/all.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/all.html new file mode 100644 index 000000000..19e758099 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/all.html @@ -0,0 +1,179 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>all</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="any.html" title="any"> +<link rel="next" href="none.html" title="none"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="any.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="none.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.all"></a><a class="link" href="all.html" title="all">all</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.all.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.description"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code> and + unary function object <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="computeroutput"><span class="identifier">all</span></code> returns true if + <code class="computeroutput"><span class="identifier">f</span></code> returns true for every + element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.all.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.synopsis"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/all.html" title="all"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">all</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">all</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.all.t0"></a><p class="title"><b>Table 1.51. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> is a valid expression, convertible + to <code class="computeroutput"><span class="keyword">bool</span></code>, for every + element <code class="computeroutput"><span class="identifier">e</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A unary function object + </p> + </td> +<td> + <p> + The search predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.all.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.expression_semantics"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="all.html" title="all"><code class="computeroutput"><span class="identifier">all</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns true if and only + if <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> + evaluates to <code class="computeroutput"><span class="keyword">true</span></code> for every + element <code class="computeroutput"><span class="identifier">e</span></code> in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.all.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.complexity"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.all.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.header"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">all</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">all</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.all.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.all.example"></a></span><a class="link" href="all.html#fusion.algorithm.query.functions.all.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">odd</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">%</span> <span class="number">2</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="all.html" title="all"><code class="computeroutput"><span class="identifier">all</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +<span class="identifier">assert</span><span class="special">(!</span><a class="link" href="all.html" title="all"><code class="computeroutput"><span class="identifier">all</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="any.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="none.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/any.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/any.html new file mode 100644 index 000000000..19616164b --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/any.html @@ -0,0 +1,179 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>any</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="all.html" title="all"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="all.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.any"></a><a class="link" href="any.html" title="any">any</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.any.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.description"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code> and + unary function object <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="computeroutput"><span class="identifier">any</span></code> returns true if + <code class="computeroutput"><span class="identifier">f</span></code> returns true for at + least one element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.any.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.synopsis"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/any.html" title="any"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">any</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">any</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.any.t0"></a><p class="title"><b>Table 1.50. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> must be a valid expression, + convertible to <code class="computeroutput"><span class="keyword">bool</span></code>, + for each element <code class="computeroutput"><span class="identifier">e</span></code> + in <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A unary function object + </p> + </td> +<td> + <p> + The search predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.any.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.expression_semantics"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.expression_semantics">Expression + semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="any.html" title="any"><code class="computeroutput"><span class="identifier">any</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns true if and only + if <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> + evaluates to <code class="computeroutput"><span class="keyword">true</span></code> for some + element <code class="computeroutput"><span class="identifier">e</span></code> in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.any.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.complexity"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.any.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.header"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">any</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">any</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.any.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.any.example"></a></span><a class="link" href="any.html#fusion.algorithm.query.functions.any.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">odd</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">%</span> <span class="number">2</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="any.html" title="any"><code class="computeroutput"><span class="identifier">any</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +<span class="identifier">assert</span><span class="special">(!</span><a class="link" href="any.html" title="any"><code class="computeroutput"><span class="identifier">any</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">4</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="all.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/count.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/count.html new file mode 100644 index 000000000..67819f08a --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/count.html @@ -0,0 +1,166 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>count</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="find_if.html" title="find_if"> +<link rel="next" href="count_if.html" title="count_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.count"></a><a class="link" href="count.html" title="count">count</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.count.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.description"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.description">Description</a> + </h6> +<p> + Returns the number of elements of a given type within a sequence. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.synopsis"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/count.html" title="count"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">count</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">count</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.count.t0"></a><p class="title"><b>Table 1.55. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">e</span> + <span class="special">==</span> <span class="identifier">t</span></code> + must be a valid expression, convertible to <code class="computeroutput"><span class="keyword">bool</span></code>, + for each element <code class="computeroutput"><span class="identifier">e</span></code> + in <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to count + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.count.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.expression_semantics"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="count.html" title="count"><code class="computeroutput"><span class="identifier">count</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">int</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the number of elements + of type <code class="computeroutput"><span class="identifier">T</span></code> and equal to + <code class="computeroutput"><span class="identifier">t</span></code> in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.complexity"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.header"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.count.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count.example"></a></span><a class="link" href="count.html#fusion.algorithm.query.functions.count.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="count.html" title="count"><code class="computeroutput"><span class="identifier">count</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="number">2</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/count_if.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/count_if.html new file mode 100644 index 000000000..35bb3a50f --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/count_if.html @@ -0,0 +1,165 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>count_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="count.html" title="count"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.count_if"></a><a class="link" href="count_if.html" title="count_if">count_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.count_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.description"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.description">Description</a> + </h6> +<p> + Returns the number of elements within a sequence with a type for which + a given unary function object evaluates to <code class="computeroutput"><span class="keyword">true</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.synopsis"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/count_if.html" title="count_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">count_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">count_if</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.count_if.t0"></a><p class="title"><b>Table 1.56. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> is a valid expression, convertible + to <code class="computeroutput"><span class="keyword">bool</span></code>, for each + element <code class="computeroutput"><span class="identifier">e</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A unary function object + </p> + </td> +<td> + <p> + The search predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.count_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.expression_semantics"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="count_if.html" title="count_if"><code class="computeroutput"><span class="identifier">count_if</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">int</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the number of elements + in <code class="computeroutput"><span class="identifier">seq</span></code> where <code class="computeroutput"><span class="identifier">f</span></code> evaluates to <code class="computeroutput"><span class="keyword">true</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.complexity"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.count_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.header"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">count_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">count_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.count_if.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.count_if.example"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.functions.count_if.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="count_if.html" title="count_if"><code class="computeroutput"><span class="identifier">count_if</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="identifier">odd</span><span class="special">())</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/find.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/find.html new file mode 100644 index 000000000..c9a35ce20 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/find.html @@ -0,0 +1,170 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>find</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="none.html" title="none"> +<link rel="next" href="find_if.html" title="find_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="none.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.find"></a><a class="link" href="find.html" title="find">find</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.find.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.description"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.description">Description</a> + </h6> +<p> + Finds the first element of a given type within a sequence. + </p> +<h6> +<a name="fusion.algorithm.query.functions.find.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.synopsis"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="identifier">find</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="identifier">find</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.find.t0"></a><p class="title"><b>Table 1.53. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to search for + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.find.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.expression_semantics"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="find.html" title="find"><code class="computeroutput"><span class="identifier">find</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + category as the iterators of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + first element of <code class="computeroutput"><span class="identifier">seq</span></code> + of type <code class="computeroutput"><span class="identifier">T</span></code>, or <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> if there is no such element. Equivalent + to <code class="computeroutput"><a class="link" href="find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">find_if</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span> <span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span></code> + </p> +<h6> +<a name="fusion.algorithm.query.functions.find.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.complexity"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.find.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.header"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">find</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">find</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.find.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find.example"></a></span><a class="link" href="find.html#fusion.algorithm.query.functions.find.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="char">'a'</span><span class="special">,</span><span class="char">'0'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(*</span><a class="link" href="find.html" title="find"><code class="computeroutput"><span class="identifier">find</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <span class="char">'0'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="find.html" title="find"><code class="computeroutput"><span class="identifier">find</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="none.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/find_if.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/find_if.html new file mode 100644 index 000000000..f97096ab3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/find_if.html @@ -0,0 +1,175 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>find_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="find.html" title="find"> +<link rel="next" href="count.html" title="count"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.find_if"></a><a class="link" href="find_if.html" title="find_if">find_if</a> +</h5></div></div></div> +<p> + Finds the first element within a sequence with a type for which a given + <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> evaluates to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.find_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find_if.description"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.functions.find_if.description">Description</a> + </h6> +<h6> +<a name="fusion.algorithm.query.functions.find_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find_if.synopsis"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.functions.find_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="identifier">find_if</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="identifier">find_if</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.find_if.t0"></a><p class="title"><b>Table 1.54. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + A unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + The search predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.find_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find_if.expression_semantics"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.functions.find_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">find_if</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An iterator of the same + iterator category as the iterators of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the first element + of <code class="computeroutput"><span class="identifier">seq</span></code> for which <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> <code class="computeroutput"><span class="identifier">F</span></code> + evaluates to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>, or <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> + if there is no such element. + </p> +<h6> +<a name="fusion.algorithm.query.functions.find_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find_if.complexity"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.functions.find_if.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + include <boost/fusion/algorithm/query/find_if.hpp> + </li> +<li class="listitem"> + include <boost/fusion/include/find_if.hpp> + </li> +</ol></div> +<h6> +<a name="fusion.algorithm.query.functions.find_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.find_if.example"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.functions.find_if.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(*</span><a class="link" href="find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">find_if</span></code></a><span class="special"><</span><span class="identifier">is_integral</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">></span> <span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">find_if</span></code></a><span class="special"><</span><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">></span> <span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/functions/none.html b/libs/fusion/doc/html/fusion/algorithm/query/functions/none.html new file mode 100644 index 000000000..bb20765c2 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/functions/none.html @@ -0,0 +1,179 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>none</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="all.html" title="all"> +<link rel="next" href="find.html" title="find"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="all.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.functions.none"></a><a class="link" href="none.html" title="none">none</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.functions.none.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.description"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code> and + unary function object <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="computeroutput"><span class="identifier">none</span></code> returns true if + <code class="computeroutput"><span class="identifier">f</span></code> returns false for every + element of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.none.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.synopsis"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/none.html" title="none"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">none</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">none</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.functions.none.t0"></a><p class="title"><b>Table 1.52. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> is a valid expression, convertible + to <code class="computeroutput"><span class="keyword">bool</span></code>, for every + element <code class="computeroutput"><span class="identifier">e</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + The sequence to search + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A unary function object + </p> + </td> +<td> + <p> + The search predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.functions.none.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.expression_semantics"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="none.html" title="none"><code class="computeroutput"><span class="identifier">none</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns true if and only + if <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> + evaluates to <code class="computeroutput"><span class="keyword">false</span></code> for every + element <code class="computeroutput"><span class="identifier">e</span></code> in <code class="computeroutput"><span class="identifier">seq</span></code>. Result equivalent to <code class="computeroutput"><span class="special">!</span><span class="identifier">any</span><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.functions.none.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.complexity"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.functions.none.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.header"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.query.functions.none.h5"></a> + <span class="phrase"><a name="fusion.algorithm.query.functions.none.example"></a></span><a class="link" href="none.html#fusion.algorithm.query.functions.none.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">odd</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">%</span> <span class="number">2</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="none.html" title="none"><code class="computeroutput"><span class="identifier">none</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">4</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +<span class="identifier">assert</span><span class="special">(!</span><a class="link" href="none.html" title="none"><code class="computeroutput"><span class="identifier">none</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">()));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="all.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions.html new file mode 100644 index 000000000..aef582690 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions.html @@ -0,0 +1,53 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../query.html" title="Query"> +<link rel="prev" href="functions/count_if.html" title="count_if"> +<link rel="next" href="metafunctions/any.html" title="any"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/count_if.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../query.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/any.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.query.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/any.html">any</a></span></dt> +<dt><span class="section"><a href="metafunctions/all.html">all</a></span></dt> +<dt><span class="section"><a href="metafunctions/none.html">none</a></span></dt> +<dt><span class="section"><a href="metafunctions/find.html">find</a></span></dt> +<dt><span class="section"><a href="metafunctions/find_if.html">find_if</a></span></dt> +<dt><span class="section"><a href="metafunctions/count.html">count</a></span></dt> +<dt><span class="section"><a href="metafunctions/count_if.html">count_if</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/count_if.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../query.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/any.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/all.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/all.html new file mode 100644 index 000000000..9b243e13e --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/all.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>all</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="any.html" title="any"> +<link rel="next" href="none.html" title="none"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="any.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="none.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.all"></a><a class="link" href="all.html" title="all">all</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.all.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.all.description"></a></span><a class="link" href="all.html#fusion.algorithm.query.metafunctions.all.description">Description</a> + </h6> +<p> + A metafunction returning the result type of <a class="link" href="../functions/all.html" title="all"><code class="computeroutput"><span class="identifier">all</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.all.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.all.synopsis"></a></span><a class="link" href="all.html#fusion.algorithm.query.metafunctions.all.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">all</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.all.t0"></a><p class="title"><b>Table 1.58. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + A model of unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.all.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.all.expression_semantics"></a></span><a class="link" href="all.html#fusion.algorithm.query.metafunctions.all.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="all.html" title="all"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">all</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/all.html" title="all"><code class="computeroutput"><span class="identifier">all</span></code></a> + given a sequence of type <code class="computeroutput"><span class="identifier">Sequence</span></code> + and a unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> of type <code class="computeroutput"><span class="identifier">F</span></code>. + The return type is always <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.all.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.all.complexity"></a></span><a class="link" href="all.html#fusion.algorithm.query.metafunctions.all.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.all.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.all.header"></a></span><a class="link" href="all.html#fusion.algorithm.query.metafunctions.all.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">all</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">all</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="any.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="none.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/any.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/any.html new file mode 100644 index 000000000..5b0205953 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/any.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>any</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="all.html" title="all"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="all.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.any"></a><a class="link" href="any.html" title="any">any</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.any.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.any.description"></a></span><a class="link" href="any.html#fusion.algorithm.query.metafunctions.any.description">Description</a> + </h6> +<p> + A metafunction returning the result type of <a class="link" href="../functions/any.html" title="any"><code class="computeroutput"><span class="identifier">any</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.any.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.any.synopsis"></a></span><a class="link" href="any.html#fusion.algorithm.query.metafunctions.any.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">any</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.any.t0"></a><p class="title"><b>Table 1.57. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + A model of unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.any.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.any.expression_semantics"></a></span><a class="link" href="any.html#fusion.algorithm.query.metafunctions.any.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="any.html" title="any"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">any</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/any.html" title="any"><code class="computeroutput"><span class="identifier">any</span></code></a> + given a sequence of type <code class="computeroutput"><span class="identifier">Sequence</span></code> + and a unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> of type <code class="computeroutput"><span class="identifier">F</span></code>. + The return type is always <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.any.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.any.complexity"></a></span><a class="link" href="any.html#fusion.algorithm.query.metafunctions.any.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.any.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.any.header"></a></span><a class="link" href="any.html#fusion.algorithm.query.metafunctions.any.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">any</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">any</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="all.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count.html new file mode 100644 index 000000000..e6a48e21d --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count.html @@ -0,0 +1,158 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>count</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="find_if.html" title="find_if"> +<link rel="next" href="count_if.html" title="count_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.count"></a><a class="link" href="count.html" title="count">count</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.count.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count.description"></a></span><a class="link" href="count.html#fusion.algorithm.query.metafunctions.count.description">Description</a> + </h6> +<p> + A metafunction that returns the result type of <code class="computeroutput"><span class="identifier">count</span></code> + given the sequence and search types. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count.synopsis"></a></span><a class="link" href="count.html#fusion.algorithm.query.metafunctions.count.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">count</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.count.t0"></a><p class="title"><b>Table 1.62. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + heading Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.count.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count.expression_semantics"></a></span><a class="link" href="count.html#fusion.algorithm.query.metafunctions.count.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="count.html" title="count"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">count</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">int</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/count.html" title="count"><code class="computeroutput"><span class="identifier">count</span></code></a>. The return type is always + <code class="computeroutput"><span class="keyword">int</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count.complexity"></a></span><a class="link" href="count.html#fusion.algorithm.query.metafunctions.count.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count.header"></a></span><a class="link" href="count.html#fusion.algorithm.query.metafunctions.count.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count_if.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count_if.html new file mode 100644 index 000000000..ff0db7f56 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/count_if.html @@ -0,0 +1,158 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>count_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="count.html" title="count"> +<link rel="next" href="../../transformation.html" title="Transformation"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../transformation.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.count_if"></a><a class="link" href="count_if.html" title="count_if">count_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.count_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count_if.description"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.metafunctions.count_if.description">Description</a> + </h6> +<p> + A metafunction that returns the result type of <code class="computeroutput"><span class="identifier">count_if</span></code> + given the sequence and predicate types. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count_if.synopsis"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.metafunctions.count_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">count_if</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.count_if.t0"></a><p class="title"><b>Table 1.63. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A unary function object + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.count_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count_if.expression_semantics"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.metafunctions.count_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="count_if.html" title="count_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">count_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">int</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/count_if.html" title="count_if"><code class="computeroutput"><span class="identifier">count_if</span></code></a>. The return type is + always <code class="computeroutput"><span class="keyword">int</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count_if.complexity"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.metafunctions.count_if.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.count_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.count_if.header"></a></span><a class="link" href="count_if.html#fusion.algorithm.query.metafunctions.count_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">count_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">count_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../transformation.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find.html new file mode 100644 index 000000000..8f814b0b7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find.html @@ -0,0 +1,160 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>find</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="none.html" title="none"> +<link rel="next" href="find_if.html" title="find_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="none.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.find"></a><a class="link" href="find.html" title="find">find</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.find.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find.description"></a></span><a class="link" href="find.html#fusion.algorithm.query.metafunctions.find.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/find.html" title="find"><code class="computeroutput"><span class="identifier">find</span></code></a>, given the sequence and + search types. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find.synopsis"></a></span><a class="link" href="find.html#fusion.algorithm.query.metafunctions.find.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">find</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.find.t0"></a><p class="title"><b>Table 1.60. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.find.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find.expression_semantics"></a></span><a class="link" href="find.html#fusion.algorithm.query.metafunctions.find.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="find.html" title="find"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">find</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + category as the iterators of <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + first element of type <code class="computeroutput"><span class="identifier">T</span></code> + in <code class="computeroutput"><span class="identifier">Sequence</span></code>, or <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + if there is no such element. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find.complexity"></a></span><a class="link" href="find.html#fusion.algorithm.query.metafunctions.find.complexity">Complexity</a> + </h6> +<p> + Linear, at most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find.header"></a></span><a class="link" href="find.html#fusion.algorithm.query.metafunctions.find.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">find</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">find</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="none.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find_if.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find_if.html new file mode 100644 index 000000000..0b343f93c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/find_if.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>find_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="find.html" title="find"> +<link rel="next" href="count.html" title="count"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.find_if"></a><a class="link" href="find_if.html" title="find_if">find_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.find_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find_if.description"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.metafunctions.find_if.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">find_if</span></code></a> given the sequence and + predicate types. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find_if.synopsis"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.metafunctions.find_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">find_if</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.find_if.t0"></a><p class="title"><b>Table 1.61. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A model of <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + Operation's arguments + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.find_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find_if.expression_semantics"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.metafunctions.find_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="find_if.html" title="find_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">find_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + category as the iterators of <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + first element in <code class="computeroutput"><span class="identifier">Sequence</span></code> + for which <code class="computeroutput"><span class="identifier">Pred</span></code> evaluates + to true. Returns <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> if there is no such element. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find_if.complexity"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.metafunctions.find_if.complexity">Complexity</a> + </h6> +<p> + Linear. At most <code class="computeroutput"><a class="link" href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></code> comparisons. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.find_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.find_if.header"></a></span><a class="link" href="find_if.html#fusion.algorithm.query.metafunctions.find_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">find_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">find_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/none.html b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/none.html new file mode 100644 index 000000000..f7653aede --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/query/metafunctions/none.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>none</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="all.html" title="all"> +<link rel="next" href="find.html" title="find"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="all.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.query.metafunctions.none"></a><a class="link" href="none.html" title="none">none</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.query.metafunctions.none.h0"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.none.description"></a></span><a class="link" href="none.html#fusion.algorithm.query.metafunctions.none.description">Description</a> + </h6> +<p> + A metafunction returning the result type of <a class="link" href="../functions/none.html" title="none"><code class="computeroutput"><span class="identifier">none</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.none.h1"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.none.synopsis"></a></span><a class="link" href="none.html#fusion.algorithm.query.metafunctions.none.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">none</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.query.metafunctions.none.t0"></a><p class="title"><b>Table 1.59. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + A model of unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.query.metafunctions.none.h2"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.none.expression_semantics"></a></span><a class="link" href="none.html#fusion.algorithm.query.metafunctions.none.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="none.html" title="none"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">none</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/none.html" title="none"><code class="computeroutput"><span class="identifier">none</span></code></a> + given a sequence of type <code class="computeroutput"><span class="identifier">Sequence</span></code> + and a unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> of type <code class="computeroutput"><span class="identifier">F</span></code>. + The return type is always <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.none.h3"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.none.complexity"></a></span><a class="link" href="none.html#fusion.algorithm.query.metafunctions.none.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.query.metafunctions.none.h4"></a> + <span class="phrase"><a name="fusion.algorithm.query.metafunctions.none.header"></a></span><a class="link" href="none.html#fusion.algorithm.query.metafunctions.none.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="all.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation.html b/libs/fusion/doc/html/fusion/algorithm/transformation.html new file mode 100644 index 000000000..613a8ac63 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation.html @@ -0,0 +1,71 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Transformation</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../algorithm.html" title="Algorithm"> +<link rel="prev" href="query/metafunctions/count_if.html" title="count_if"> +<link rel="next" href="transformation/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="query/metafunctions/count_if.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transformation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.algorithm.transformation"></a><a class="link" href="transformation.html" title="Transformation">Transformation</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="transformation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="transformation/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +<p> + The transformation algorithms create new sequences out of existing sequences + by performing some sort of transformation. In reality the new sequences are + views onto the data in the original sequences. + </p> +<div class="note"><table border="0" summary="Note"> +<tr> +<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td> +<th align="left">Note</th> +</tr> +<tr><td align="left" valign="top"><p> + As the transformation algorithms return views onto their input arguments, + it is important that the lifetime of the input arguments is greater than + the period during which you wish to use the results. + </p></td></tr> +</table></div> +<h5> +<a name="fusion.algorithm.transformation.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.header"></a></span><a class="link" href="transformation.html#fusion.algorithm.transformation.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="query/metafunctions/count_if.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithm.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transformation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions.html new file mode 100644 index 000000000..306655ee4 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions.html @@ -0,0 +1,65 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../transformation.html" title="Transformation"> +<link rel="prev" href="../transformation.html" title="Transformation"> +<link rel="next" href="functions/filter.html" title="filter"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../transformation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../transformation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/filter.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.transformation.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/filter.html">filter</a></span></dt> +<dt><span class="section"><a href="functions/filter_if.html">filter_if</a></span></dt> +<dt><span class="section"><a href="functions/transform.html">transform</a></span></dt> +<dt><span class="section"><a href="functions/replace.html">replace</a></span></dt> +<dt><span class="section"><a href="functions/replace_if.html">replace_if</a></span></dt> +<dt><span class="section"><a href="functions/remove.html">remove</a></span></dt> +<dt><span class="section"><a href="functions/remove_if.html">remove_if</a></span></dt> +<dt><span class="section"><a href="functions/reverse.html">reverse</a></span></dt> +<dt><span class="section"><a href="functions/clear.html">clear</a></span></dt> +<dt><span class="section"><a href="functions/erase.html">erase</a></span></dt> +<dt><span class="section"><a href="functions/erase_key.html">erase_key</a></span></dt> +<dt><span class="section"><a href="functions/insert.html">insert</a></span></dt> +<dt><span class="section"><a href="functions/insert_range.html">insert_range</a></span></dt> +<dt><span class="section"><a href="functions/join.html">join</a></span></dt> +<dt><span class="section"><a href="functions/zip.html">zip</a></span></dt> +<dt><span class="section"><a href="functions/pop_back.html">pop_back</a></span></dt> +<dt><span class="section"><a href="functions/pop_front.html">pop_front</a></span></dt> +<dt><span class="section"><a href="functions/push_back.html">push_back</a></span></dt> +<dt><span class="section"><a href="functions/push_front.html">push_front</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../transformation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../transformation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/filter.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/clear.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/clear.html new file mode 100644 index 000000000..2cd540083 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/clear.html @@ -0,0 +1,140 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>clear</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="reverse.html" title="reverse"> +<link rel="next" href="erase.html" title="erase"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.clear"></a><a class="link" href="clear.html" title="clear">clear</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.clear.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.description"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.description">Description</a> + </h6> +<p> + <a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a> returns an empty sequence. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.clear.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.synposis"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/clear.html" title="clear"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">clear</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">clear</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.clear.t0"></a><p class="title"><b>Table 1.73. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.clear.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.expression_semantics"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Expression Semantics</strong></span>: Returns a sequence + with no elements. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.clear.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.complexity"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.clear.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.header"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.clear.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.clear.example"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.functions.clear.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">());</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase.html new file mode 100644 index 000000000..e0426137a --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase.html @@ -0,0 +1,226 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>erase</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="clear.html" title="clear"> +<link rel="next" href="erase_key.html" title="erase_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="clear.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.erase"></a><a class="link" href="erase.html" title="erase">erase</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.erase.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.description"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.description">Description</a> + </h6> +<p> + Returns a new sequence, containing all the elements of the original except + those at a specified iterator, or between two iterators. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.synposis"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">First</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/erase.html" title="erase"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">First</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">erase</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">First</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">it1</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Last</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/erase.html" title="erase"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">First</span><span class="special">,</span> <span class="identifier">Last</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">erase</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">First</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">it1</span><span class="special">,</span> <span class="identifier">Last</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">it2</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.erase.t0"></a><p class="title"><b>Table 1.74. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameters + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">it1</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator into <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">it2</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator into <code class="computeroutput"><span class="identifier">seq</span></code> + after <code class="computeroutput"><span class="identifier">it1</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.erase.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.expression_semantics"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">erase</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">pos</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code> + except the element at <code class="computeroutput"><span class="identifier">pos</span></code>. + </p> +<pre class="programlisting"><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">erase</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, with + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + in their original order, except those in the range [<code class="computeroutput"><span class="identifier">first</span></code>,<code class="computeroutput"><span class="identifier">last</span></code>). + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.complexity"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.header"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.erase.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase.example"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.functions.erase.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2.0</span><span class="special">,</span> <span class="char">'c'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">erase</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <a class="link" href="../../../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">)))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'c'</span><span class="special">));</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">erase</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <a class="link" href="../../../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">)),</span> <a class="link" href="../../../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="clear.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase_key.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase_key.html new file mode 100644 index 000000000..fc513fd1e --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/erase_key.html @@ -0,0 +1,168 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>erase_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="erase.html" title="erase"> +<link rel="next" href="insert.html" title="insert"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.erase_key"></a><a class="link" href="erase_key.html" title="erase_key">erase_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.description"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.description">Description</a> + </h6> +<p> + For an <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">associative</a>] + <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + <code class="computeroutput"><span class="identifier">seq</span></code>, returns a <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">associative</a>] + <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + containing all the elements of the original except those with a given + key. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.synposis"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">erase_key</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.erase_key.t0"></a><p class="title"><b>Table 1.75. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Key to erase + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.expression_semantics"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="identifier">Key</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + except those with key <code class="computeroutput"><span class="identifier">Key</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.complexity"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.header"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.erase_key.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.erase_key.example"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.functions.erase_key.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><a class="link" href="../../../container/generation/functions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">make_map</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">long</span><span class="special">>(</span><span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">make_map</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><span class="char">'b'</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter.html new file mode 100644 index 000000000..a5675612a --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter.html @@ -0,0 +1,175 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>filter</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="filter_if.html" title="filter_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.filter"></a><a class="link" href="filter.html" title="filter">filter</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.filter.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.description"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.description">Description</a> + </h6> +<p> + For a given sequence, filter returns a new sequences containing only + the elements of a specified type. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.synopsis"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/filter.html" title="filter"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">filter</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">filter</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.filter.t0"></a><p class="title"><b>Table 1.64. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to retain + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.filter.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.expression_semantics"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="filter.html" title="filter"><code class="computeroutput"><span class="identifier">filter</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code> + of type <code class="computeroutput"><span class="identifier">T</span></code>. Equivalent + to <code class="computeroutput"><a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span> <span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.complexity"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.header"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">filter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">filter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.filter.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter.example"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.functions.filter.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">long</span><span class="special">,</span><span class="keyword">long</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="filter.html" title="filter"><code class="computeroutput"><span class="identifier">filter</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter_if.html new file mode 100644 index 000000000..9593269e0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/filter_if.html @@ -0,0 +1,178 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>filter_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="filter.html" title="filter"> +<link rel="next" href="transform.html" title="transform"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.filter_if"></a><a class="link" href="filter_if.html" title="filter_if">filter_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.description"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.description">Description</a> + </h6> +<p> + For a given sequence, <a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a> returns a new sequences + containing only the elements with types for which a given <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> evaluates to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.synopsis"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">filter_if</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.filter_if.t0"></a><p class="title"><b>Table 1.65. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + The predicate to filter by + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.expression_semantics"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">Pred</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code> + with types for which <code class="computeroutput"><span class="identifier">Pred</span></code> + evaluates to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. The order of the retained elements + is the same as in the original sequence. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.complexity"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.header"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">filter_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">filter_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.filter_if.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.filter_if.example"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.functions.filter_if.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3.0</span><span class="special">,</span><span class="number">4.0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">is_integral</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">></span> <span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert.html new file mode 100644 index 000000000..c6a6aaabe --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert.html @@ -0,0 +1,188 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>insert</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="erase_key.html" title="erase_key"> +<link rel="next" href="insert_range.html" title="insert_range"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert_range.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.insert"></a><a class="link" href="insert.html" title="insert">insert</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.insert.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.description"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.description">Description</a> + </h6> +<p> + Returns a new sequence with all the elements of the original, an a new + element inserted the position described by a given iterator. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.synposis"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pos</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/insert.html" title="insert"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">insert</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Pos</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">insert</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">Pos</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">pos</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.insert.t0"></a><p class="title"><b>Table 1.76. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">pos</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + The position to insert at + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">t</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The value to insert + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.insert.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.expression_semantics"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="insert.html" title="insert"><code class="computeroutput"><span class="identifier">insert</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + in their original order, and a new element with the type and value of + <code class="computeroutput"><span class="identifier">t</span></code> inserted at iterator + <code class="computeroutput"><span class="identifier">pos</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.complexity"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.header"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">insert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">insert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.insert.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert.example"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.functions.insert.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="insert.html" title="insert"><code class="computeroutput"><span class="identifier">insert</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <a class="link" href="../../../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">)),</span> <span class="number">3</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert_range.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert_range.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert_range.html new file mode 100644 index 000000000..69a43906d --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/insert_range.html @@ -0,0 +1,197 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>insert_range</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="insert.html" title="insert"> +<link rel="next" href="join.html" title="join"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.insert_range"></a><a class="link" href="insert_range.html" title="insert_range">insert_range</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.description"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.description">Description</a> + </h6> +<p> + Returns a new sequence with another sequence inserted at a specified + iterator. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.synposis"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pos</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Range</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/insert_range.html" title="insert_range"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">insert_range</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Pos</span><span class="special">,</span> <span class="identifier">Range</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">insert_range</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">Pos</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">pos</span><span class="special">,</span> <span class="identifier">Range</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">range</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.insert_range.t0"></a><p class="title"><b>Table 1.77. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">pos</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + The position to insert at + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">range</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Range to insert + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.expression_semantics"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="insert_range.html" title="insert_range"><code class="computeroutput"><span class="identifier">insert_range</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">pos</span><span class="special">,</span> <span class="identifier">range</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + and the elements of <code class="computeroutput"><span class="identifier">range</span></code> + inserted at iterator <code class="computeroutput"><span class="identifier">pos</span></code>. + All elements retaining their ordering from the orignal sequences. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.complexity"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.header"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">insert_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">insert_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.insert_range.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.insert_range.example"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.functions.insert_range.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="insert_range.html" title="insert_range"><code class="computeroutput"><span class="identifier">insert_range</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <a class="link" href="../../../iterator/functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">vec</span><span class="special">)),</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/join.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/join.html new file mode 100644 index 000000000..f2d14f194 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/join.html @@ -0,0 +1,177 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>join</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="insert_range.html" title="insert_range"> +<link rel="next" href="zip.html" title="zip"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert_range.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.join"></a><a class="link" href="join.html" title="join">join</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.join.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.description"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.description">Description</a> + </h6> +<p> + Takes 2 sequences and returns a sequence containing the elements of the + first followed by the elements of the second. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.join.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.synopsis"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">LhSequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">RhSequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/join.html" title="join"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">join</span></code></a><span class="special"><</span><span class="identifier">LhSequence</span><span class="special">,</span> <span class="identifier">RhSequence</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">join</span><span class="special">(</span><span class="identifier">LhSequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">RhSequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.join.t0"></a><p class="title"><b>Table 1.78. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">lhs</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">rhs</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.join.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.expression_semantics"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="join.html" title="join"><code class="computeroutput"><span class="identifier">join</span></code></a><span class="special">(</span><span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">lhs</span></code> + and <code class="computeroutput"><span class="identifier">rhs</span></code> implement + the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + all the elements of <code class="computeroutput"><span class="identifier">lhs</span></code> + followed by all the elements of <code class="computeroutput"><span class="identifier">rhs</span></code>. + The order of the elements is preserved. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.join.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.complexity"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.join.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.header"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">join</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">join</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.join.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.join.example"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.functions.join.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="char">'b'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="join.html" title="join"><code class="computeroutput"><span class="identifier">join</span></code></a><span class="special">(</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="char">'a'</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="char">'b'</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert_range.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_back.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_back.html new file mode 100644 index 000000000..8b4cc406d --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_back.html @@ -0,0 +1,153 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>pop_back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="zip.html" title="zip"> +<link rel="next" href="pop_front.html" title="pop_front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.pop_back"></a><a class="link" href="pop_back.html" title="pop_back">pop_back</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.description"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.description">Description</a> + </h6> +<p> + Returns a new sequence, with the last element of the original removed. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.synopsis"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/pop_back.html" title="pop_back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">pop_back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">pop_back</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.pop_back.t0"></a><p class="title"><b>Table 1.80. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.expression_semantics"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="pop_back.html" title="pop_back"><code class="computeroutput"><span class="identifier">pop_back</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + except the last element. The elements in the new sequence are in the + same order as they were in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.complexity"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.header"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">pop_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">pop_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_back.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_back.example"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.functions.pop_back.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><span class="identifier">___pop_back__</span><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_front.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_front.html new file mode 100644 index 000000000..5d69c66db --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/pop_front.html @@ -0,0 +1,153 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>pop_front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="pop_back.html" title="pop_back"> +<link rel="next" href="push_back.html" title="push_back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.pop_front"></a><a class="link" href="pop_front.html" title="pop_front">pop_front</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.description"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.description">Description</a> + </h6> +<p> + Returns a new sequence, with the first element of the original removed. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.synopsis"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/pop_front.html" title="pop_front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">pop_front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">pop_front</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.pop_front.t0"></a><p class="title"><b>Table 1.81. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.expression_semantics"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="pop_front.html" title="pop_front"><code class="computeroutput"><span class="identifier">pop_front</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + except the first element. The elements in the new sequence are in the + same order as they were in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.complexity"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.header"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">pop_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">pop_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.pop_front.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.pop_front.example"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.functions.pop_front.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="pop_front.html" title="pop_front"><code class="computeroutput"><span class="identifier">pop_front</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_back.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_back.html new file mode 100644 index 000000000..37e559ed2 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_back.html @@ -0,0 +1,166 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>push_back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="pop_front.html" title="pop_front"> +<link rel="next" href="push_front.html" title="push_front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.push_back"></a><a class="link" href="push_back.html" title="push_back">push_back</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.push_back.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.description"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.description">Description</a> + </h6> +<p> + Returns a new sequence with an element added at the end. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_back.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.synopsis"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">push_back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">push_back</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.push_back.t0"></a><p class="title"><b>Table 1.82. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">t</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The value to add to the end + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.push_back.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.expression_semantics"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + and new element <code class="computeroutput"><span class="identifier">t</span></code> appended + to the end. The elements are in the same order as they were in <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_back.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.complexity"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_back.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.header"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">push_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">push_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.push_back.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_back.example"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.functions.push_back.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">),</span><span class="number">4</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_front.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_front.html new file mode 100644 index 000000000..7ea29a19c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/push_front.html @@ -0,0 +1,167 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>push_front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="push_back.html" title="push_back"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.push_front"></a><a class="link" href="push_front.html" title="push_front">push_front</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.push_front.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.description"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.description">Description</a> + </h6> +<p> + Returns a new sequence with an element added at the beginning. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_front.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.synopsis"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/push_front.html" title="push_front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">push_front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">push_front</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.push_front.t0"></a><p class="title"><b>Table 1.83. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">t</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The value to add to the beginning + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.push_front.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.expression_semantics"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + and new element <code class="computeroutput"><span class="identifier">t</span></code> appended + to the beginning. The elements are in the same order as they were in + <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_front.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.complexity"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.push_front.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.header"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">push_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">push_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.push_front.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.push_front.example"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.functions.push_front.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="push_front.html" title="push_front"><code class="computeroutput"><span class="identifier">push_front</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">),</span><span class="number">0</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove.html new file mode 100644 index 000000000..7b89e984c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove.html @@ -0,0 +1,175 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>remove</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="replace_if.html" title="replace_if"> +<link rel="next" href="remove_if.html" title="remove_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.remove"></a><a class="link" href="remove.html" title="remove">remove</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.remove.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.description"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.description">Description</a> + </h6> +<p> + Returns a new sequence, with all the elements of the original sequence, + except those of a given type. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.synopsis"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/remove.html" title="remove"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">remove</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">replace</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.remove.t0"></a><p class="title"><b>Table 1.70. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Type to remove + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.remove.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.expression_semantics"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="remove.html" title="remove"><code class="computeroutput"><span class="identifier">remove</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + in their original order, except those of type <code class="computeroutput"><span class="identifier">T</span></code>. + Equivalent to <code class="computeroutput"><a class="link" href="remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">remove_if</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">_</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span> <span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.complexity"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.header"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">remove</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">remove</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.remove.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove.example"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.functions.remove.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2.0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="remove.html" title="remove"><code class="computeroutput"><span class="identifier">remove</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove_if.html new file mode 100644 index 000000000..85ad98a9d --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/remove_if.html @@ -0,0 +1,177 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>remove_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="remove.html" title="remove"> +<link rel="next" href="reverse.html" title="reverse"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.remove_if"></a><a class="link" href="remove_if.html" title="remove_if">remove_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.description"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.description">Description</a> + </h6> +<p> + Returns a new sequence, containing all the elements of the original except + those where a given unary function object evaluates to <code class="computeroutput"><span class="keyword">true</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.synopsis"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">remove_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">remove_if</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.remove_if.t0"></a><p class="title"><b>Table 1.71. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A model of unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + Removal predicate + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.expression_semantics"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">remove_if</span></code></a><span class="special"><</span><span class="identifier">Pred</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + in their original order, except those elements with types for which + <code class="computeroutput"><span class="identifier">Pred</span></code> evaluates to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. Equivalent to <code class="computeroutput"><a class="link" href="filter.html" title="filter"><code class="computeroutput"><span class="identifier">filter</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">not_</span><span class="special"><</span><span class="identifier">Pred</span><span class="special">></span> + <span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.complexity"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.header"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">remove_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">remove_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.remove_if.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.remove_if.example"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.functions.remove_if.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">const</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2.0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">remove_if</span></code></a><span class="special"><</span><span class="identifier">is_floating_point</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">></span> <span class="special">>(</span><span class="identifier">vec</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace.html new file mode 100644 index 000000000..e91f550be --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace.html @@ -0,0 +1,186 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>replace</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="transform.html" title="transform"> +<link rel="next" href="replace_if.html" title="replace_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.replace"></a><a class="link" href="replace.html" title="replace">replace</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.replace.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.description"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.description">Description</a> + </h6> +<p> + Replaces each value within a sequence of a given type and value with + a new value. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.synopsis"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/replace.html" title="replace"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">replace</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">replace</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">old_value</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">new_value</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.replace.t0"></a><p class="title"><b>Table 1.68. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">e</span> + <span class="special">==</span> <span class="identifier">old_value</span></code> + is a valid expression, convertible to <code class="computeroutput"><span class="keyword">bool</span></code>, + for each element <code class="computeroutput"><span class="identifier">e</span></code> + in <code class="computeroutput"><span class="identifier">seq</span></code> with + type convertible to <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">old_value</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Value to replace + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">new_value</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Replacement value + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.replace.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.expression_semantics"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="replace.html" title="replace"><code class="computeroutput"><span class="identifier">replace</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">old_value</span><span class="special">,</span> <span class="identifier">new_value</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence with + all the values of <code class="computeroutput"><span class="identifier">seq</span></code> + with <code class="computeroutput"><span class="identifier">new_value</span></code> assigned + to elements with the same type and equal to <code class="computeroutput"><span class="identifier">old_value</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.complexity"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.header"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">replace</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">replace</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.replace.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace.example"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.functions.replace.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="replace.html" title="replace"><code class="computeroutput"><span class="identifier">replace</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace_if.html new file mode 100644 index 000000000..56be9ed70 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/replace_if.html @@ -0,0 +1,195 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>replace_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="replace.html" title="replace"> +<link rel="next" href="remove.html" title="remove"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.replace_if"></a><a class="link" href="replace_if.html" title="replace_if">replace_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.description"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.description">Description</a> + </h6> +<p> + Replaces each element of a given sequence for which an unary function + object evaluates to <code class="computeroutput"><span class="keyword">true</span></code> + replaced with a new value. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.synopsis"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">replace_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">replace_if</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">new_value</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.replace_if.t0"></a><p class="title"><b>Table 1.69. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A function object for which <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> is a valid expression, convertible + to <code class="computeroutput"><span class="keyword">bool</span></code>, for each + element <code class="computeroutput"><span class="identifier">e</span></code> in + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">new_value</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Replacement value + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.expression_semantics"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">replace_if</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">new_value</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence with + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code>, + with <code class="computeroutput"><span class="identifier">new_value</span></code> assigned + to each element for which <code class="computeroutput"><span class="identifier">f</span></code> + evaluates to <code class="computeroutput"><span class="keyword">true</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.complexity"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.header"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">replace_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">replace_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.replace_if.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.replace_if.example"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.functions.replace_if.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">odd</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">%</span> <span class="number">2</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">replace_if</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">),</span> <span class="identifier">odd</span><span class="special">(),</span> <span class="number">3</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/reverse.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/reverse.html new file mode 100644 index 000000000..996c79857 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/reverse.html @@ -0,0 +1,157 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="remove_if.html" title="remove_if"> +<link rel="next" href="clear.html" title="clear"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="clear.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.reverse"></a><a class="link" href="reverse.html" title="reverse">reverse</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.reverse.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.description"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.description">Description</a> + </h6> +<p> + Returns a new sequence with the elements of the original in reverse order. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.reverse.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.synposis"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/reverse.html" title="reverse"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">reverse</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.reverse.t0"></a><p class="title"><b>Table 1.72. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.reverse.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.expression_semantics"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="reverse.html" title="reverse"><code class="computeroutput"><span class="identifier">reverse</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence containing + all the elements of <code class="computeroutput"><span class="identifier">seq</span></code> + in reverse order. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.reverse.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.complexity"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.reverse.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.header"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">reverse</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">reverse</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.reverse.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.reverse.example"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.functions.reverse.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><a class="link" href="reverse.html" title="reverse"><code class="computeroutput"><span class="identifier">reverse</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="clear.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/transform.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/transform.html new file mode 100644 index 000000000..d424026b7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/transform.html @@ -0,0 +1,291 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>transform</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="filter_if.html" title="filter_if"> +<link rel="next" href="replace.html" title="replace"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.transform"></a><a class="link" href="transform.html" title="transform">transform</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.description"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code> and + function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="computeroutput"><span class="identifier">transform</span></code> returns a new + sequence with elements created by applying <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> to each element of <code class="computeroutput"><span class="identifier">e</span></code> + of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.unary_version_synopsis"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.unary_version_synopsis">Unary + version synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">transform</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.transform.t0"></a><p class="title"><b>Table 1.66. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> + is a valid expression for each element <code class="computeroutput"><span class="identifier">e</span></code> + of <code class="computeroutput"><span class="identifier">seq</span></code>. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">E</span><span class="special">)>::</span><span class="identifier">type</span></code> + is the return type of <code class="computeroutput"><span class="identifier">f</span></code> + when called with a value of each element type <code class="computeroutput"><span class="identifier">E</span></code>. + </p> + </td> +<td> + <p> + Transformation function + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.transform.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.expression_semantics"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + the return values of <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> for each element <code class="computeroutput"><span class="identifier">e</span></code> + within <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.binary_version_synopsis"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.binary_version_synopsis">Binary + version synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span><span class="identifier">Sequence1</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Sequence2</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">transform</span><span class="special">(</span> + <span class="identifier">Sequence1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">Sequence2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq2</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.transform.t1"></a><p class="title"><b>Table 1.67. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq1</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq2</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e1</span><span class="special">,</span><span class="identifier">e2</span><span class="special">)</span></code> + is a valid expression for each pair of elements <code class="computeroutput"><span class="identifier">e1</span></code> of <code class="computeroutput"><span class="identifier">seq1</span></code> + and <code class="computeroutput"><span class="identifier">e2</span></code> of + <code class="computeroutput"><span class="identifier">seq2</span></code>. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">E1</span><span class="special">,</span><span class="identifier">E2</span><span class="special">)>::</span><span class="identifier">type</span></code> + is the return type of <code class="computeroutput"><span class="identifier">f</span></code> + when called with elements of type <code class="computeroutput"><span class="identifier">E1</span></code> + and <code class="computeroutput"><span class="identifier">E2</span></code> + </p> + </td> +<td> + <p> + Transformation function + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + the return values of <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e1</span><span class="special">,</span> <span class="identifier">e2</span><span class="special">)</span></code> for each pair of elements <code class="computeroutput"><span class="identifier">e1</span></code> and <code class="computeroutput"><span class="identifier">e2</span></code> + within <code class="computeroutput"><span class="identifier">seq1</span></code> and <code class="computeroutput"><span class="identifier">seq2</span></code> respectively. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.complexity"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.header"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">transform</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">transform</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.transform.h6"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.transform.example"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.functions.transform.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">triple</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">*</span> <span class="number">3</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">),</span> <span class="identifier">triple</span><span class="special">())</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">9</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/functions/zip.html b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/zip.html new file mode 100644 index 000000000..9f922d125 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/functions/zip.html @@ -0,0 +1,153 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>zip</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="join.html" title="join"> +<link rel="next" href="pop_back.html" title="pop_back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="join.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.functions.zip"></a><a class="link" href="zip.html" title="zip">zip</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.functions.zip.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.description"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.description">Description</a> + </h6> +<p> + Zips sequences together to form a single sequence, whos members are tuples + of the members of the component sequences. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.zip.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.synopsis"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">,</span> + <span class="special">...</span> + <span class="keyword">typename</span> <span class="identifier">SequenceN</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/zip.html" title="zip"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">zip</span></code></a><span class="special"><</span><span class="identifier">Sequence1</span><span class="special">,</span> <span class="identifier">Sequence2</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">SequenceN</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">zip</span><span class="special">(</span><span class="identifier">Sequence1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">Sequence2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq2</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">SequenceN</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seqN</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.functions.zip.t0"></a><p class="title"><b>Table 1.79. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq1</span></code> to <code class="computeroutput"><span class="identifier">seqN</span></code> + </p> + </td> +<td> + <p> + Each sequence is a model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.functions.zip.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.expression_semantics"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">seq2</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">seqN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + tuples of elements from sequences <code class="computeroutput"><span class="identifier">seq1</span></code> + to <code class="computeroutput"><span class="identifier">seqN</span></code>. For example, + applying zip to tuples <code class="computeroutput"><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span></code> + and <code class="computeroutput"><span class="special">(</span><span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span><span class="special">,</span> + <span class="char">'c'</span><span class="special">)</span></code> + would return <code class="computeroutput"><span class="special">((</span><span class="number">1</span><span class="special">,</span> <span class="char">'a'</span><span class="special">),(</span><span class="number">2</span><span class="special">,</span> <span class="char">'b'</span><span class="special">),(</span><span class="number">3</span><span class="special">,</span> + <span class="char">'c'</span><span class="special">))</span></code> + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.zip.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.complexity"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.functions.zip.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.header"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">zip</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">zip</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.functions.zip.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.functions.zip.example"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.functions.zip.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="char">'b'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">),</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="join.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions.html new file mode 100644 index 000000000..d4cec76bd --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions.html @@ -0,0 +1,65 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../transformation.html" title="Transformation"> +<link rel="prev" href="functions/push_front.html" title="push_front"> +<link rel="next" href="metafunctions/filter.html" title="filter"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/push_front.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../transformation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/filter.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.algorithm.transformation.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/filter.html">filter</a></span></dt> +<dt><span class="section"><a href="metafunctions/filter_if.html">filter_if</a></span></dt> +<dt><span class="section"><a href="metafunctions/transform.html">transform</a></span></dt> +<dt><span class="section"><a href="metafunctions/replace.html">replace</a></span></dt> +<dt><span class="section"><a href="metafunctions/replace_if.html">replace_if</a></span></dt> +<dt><span class="section"><a href="metafunctions/remove.html">remove</a></span></dt> +<dt><span class="section"><a href="metafunctions/remove_if.html">remove_if</a></span></dt> +<dt><span class="section"><a href="metafunctions/reverse.html">reverse</a></span></dt> +<dt><span class="section"><a href="metafunctions/clear.html">clear</a></span></dt> +<dt><span class="section"><a href="metafunctions/erase.html">erase</a></span></dt> +<dt><span class="section"><a href="metafunctions/erase_key.html">erase_key</a></span></dt> +<dt><span class="section"><a href="metafunctions/insert.html">insert</a></span></dt> +<dt><span class="section"><a href="metafunctions/insert_range.html">insert_range</a></span></dt> +<dt><span class="section"><a href="metafunctions/join.html">join</a></span></dt> +<dt><span class="section"><a href="metafunctions/zip.html">zip</a></span></dt> +<dt><span class="section"><a href="metafunctions/pop_back.html">pop_back</a></span></dt> +<dt><span class="section"><a href="metafunctions/pop_front.html">pop_front</a></span></dt> +<dt><span class="section"><a href="metafunctions/push_back.html">push_back</a></span></dt> +<dt><span class="section"><a href="metafunctions/push_front.html">push_front</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/push_front.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../transformation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/filter.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/clear.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/clear.html new file mode 100644 index 000000000..b21eea80d --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/clear.html @@ -0,0 +1,136 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>clear</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="reverse.html" title="reverse"> +<link rel="next" href="erase.html" title="erase"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.clear"></a><a class="link" href="clear.html" title="clear">clear</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.clear.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.clear.description"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.metafunctions.clear.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/clear.html" title="clear"><code class="computeroutput"><span class="identifier">clear</span></code></a>, given the input sequence + type. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.clear.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.clear.synopsis"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.metafunctions.clear.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">clear</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.clear.t0"></a><p class="title"><b>Table 1.93. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.clear.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.clear.expression_semantics"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.metafunctions.clear.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="clear.html" title="clear"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">clear</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an empty sequence. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.clear.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.clear.complexity"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.metafunctions.clear.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.clear.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.clear.header"></a></span><a class="link" href="clear.html#fusion.algorithm.transformation.metafunctions.clear.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">clear</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase.html new file mode 100644 index 000000000..682103314 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase.html @@ -0,0 +1,199 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>erase</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="clear.html" title="clear"> +<link rel="next" href="erase_key.html" title="erase_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="clear.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.erase"></a><a class="link" href="erase.html" title="erase">erase</a> +</h5></div></div></div> +<p> + Returns the result type of <a class="link" href="../functions/erase.html" title="erase"><code class="computeroutput"><span class="identifier">erase</span></code></a>, given the input sequence + and range delimiting iterator types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase.description"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.metafunctions.erase.description">Description</a> + </h6> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase.synopsis"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.metafunctions.erase.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">It1</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">It2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">erase</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.erase.t0"></a><p class="title"><b>Table 1.94. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">It1</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">It2</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.erase.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase.expression_semantics"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.metafunctions.erase.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">It1</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence with + the element at <code class="computeroutput"><span class="identifier">It1</span></code> removed. + </p> +<pre class="programlisting"><a class="link" href="erase.html" title="erase"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence with + the elements between <code class="computeroutput"><span class="identifier">It1</span></code> + and <code class="computeroutput"><span class="identifier">It2</span></code> removed. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase.complexity"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.metafunctions.erase.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase.header"></a></span><a class="link" href="erase.html#fusion.algorithm.transformation.metafunctions.erase.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="clear.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="erase_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html new file mode 100644 index 000000000..3ef9060bd --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>erase_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="erase.html" title="erase"> +<link rel="next" href="insert.html" title="insert"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.erase_key"></a><a class="link" href="erase_key.html" title="erase_key">erase_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase_key.description"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.metafunctions.erase_key.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">erase_key</span></code></a>, given the sequence + and key types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase_key.synopsis"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.metafunctions.erase_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Key</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">erase_key</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.t0"></a><p class="title"><b>Table 1.95. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Key type + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase_key.expression_semantics"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.metafunctions.erase_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="erase_key.html" title="erase_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">erase_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> and <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with the + elements of <code class="computeroutput"><span class="identifier">Sequence</span></code>, + except those with key <code class="computeroutput"><span class="identifier">Key</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase_key.complexity"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.metafunctions.erase_key.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.erase_key.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.erase_key.header"></a></span><a class="link" href="erase_key.html#fusion.algorithm.transformation.metafunctions.erase_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">erase_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter.html new file mode 100644 index 000000000..c02274991 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter.html @@ -0,0 +1,172 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>filter</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="filter_if.html" title="filter_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.filter"></a><a class="link" href="filter.html" title="filter">filter</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter.description"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.metafunctions.filter.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/filter.html" title="filter"><code class="computeroutput"><span class="identifier">filter</span></code></a> given the sequence type + and type to retain. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter.synopsis"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.metafunctions.filter.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">filter</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.filter.t0"></a><p class="title"><b>Table 1.84. Parameter</b></p> +<div class="table-contents"><table class="table" summary="Parameter"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Type to retain + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.filter.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter.expression_semantics"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.metafunctions.filter.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="filter.html" title="filter"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">filter</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + that are of type <code class="computeroutput"><span class="identifier">T</span></code>. Equivalent + to <code class="computeroutput"><a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> + <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter.complexity"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.metafunctions.filter.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter.header"></a></span><a class="link" href="filter.html#fusion.algorithm.transformation.metafunctions.filter.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">filter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">filter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html new file mode 100644 index 000000000..f3f1699c5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html @@ -0,0 +1,173 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>filter_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="filter.html" title="filter"> +<link rel="next" href="transform.html" title="transform"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.filter_if"></a><a class="link" href="filter_if.html" title="filter_if">filter_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter_if.description"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.metafunctions.filter_if.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a> given the sequence + and unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> predicate type. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter_if.synopsis"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.metafunctions.filter_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">filter_if</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.t0"></a><p class="title"><b>Table 1.85. Parameter</b></p> +<div class="table-contents"><table class="table" summary="Parameter"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + Type to retain + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter_if.expression_semantics"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.metafunctions.filter_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + for which <code class="computeroutput"><span class="identifier">Pred</span></code> evaluates + to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter_if.complexity"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.metafunctions.filter_if.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.filter_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.filter_if.header"></a></span><a class="link" href="filter_if.html#fusion.algorithm.transformation.metafunctions.filter_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">filter_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">filter_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert.html new file mode 100644 index 000000000..70a8bca68 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert.html @@ -0,0 +1,182 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>insert</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="erase_key.html" title="erase_key"> +<link rel="next" href="insert_range.html" title="insert_range"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert_range.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.insert"></a><a class="link" href="insert.html" title="insert">insert</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert.description"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.metafunctions.insert.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/insert.html" title="insert"><code class="computeroutput"><span class="identifier">insert</span></code></a>, given the sequence, + position iterator and insertion types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert.synopsis"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.metafunctions.insert.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Position</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">insert</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.insert.t0"></a><p class="title"><b>Table 1.96. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Position</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.insert.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert.expression_semantics"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.metafunctions.insert.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="insert.html" title="insert"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">insert</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Position</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with an + element of type <code class="computeroutput"><span class="identifier">T</span></code> inserted + at position <code class="computeroutput"><span class="identifier">Position</span></code> + in <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert.complexity"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.metafunctions.insert.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert.header"></a></span><a class="link" href="insert.html#fusion.algorithm.transformation.metafunctions.insert.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">insert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">insert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="erase_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="insert_range.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html new file mode 100644 index 000000000..fd3f87f46 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html @@ -0,0 +1,191 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>insert_range</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="insert.html" title="insert"> +<link rel="next" href="join.html" title="join"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.insert_range"></a><a class="link" href="insert_range.html" title="insert_range">insert_range</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert_range.description"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.metafunctions.insert_range.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/insert_range.html" title="insert_range"><code class="computeroutput"><span class="identifier">insert_range</span></code></a>, given the input + sequence, position iterator and insertion range types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert_range.synopsis"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.metafunctions.insert_range.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Position</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Range</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">insert_range</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.t0"></a><p class="title"><b>Table 1.97. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Position</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Range</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert_range.expression_semantics"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.metafunctions.insert_range.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="insert_range.html" title="insert_range"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">insert_range</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Position</span><span class="special">,</span> <span class="identifier">Range</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with the + elements of <code class="computeroutput"><span class="identifier">Range</span></code> inserted + at position <code class="computeroutput"><span class="identifier">Position</span></code> + into <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert_range.complexity"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.metafunctions.insert_range.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.insert_range.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.insert_range.header"></a></span><a class="link" href="insert_range.html#fusion.algorithm.transformation.metafunctions.insert_range.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">insert_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">insert_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/join.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/join.html new file mode 100644 index 000000000..2d1c7bb98 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/join.html @@ -0,0 +1,107 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>join</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="insert_range.html" title="insert_range"> +<link rel="next" href="zip.html" title="zip"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert_range.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.join"></a><a class="link" href="join.html" title="join">join</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.join.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.join.description"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.metafunctions.join.description">Description</a> + </h6> +<p> + Returns the result of joining 2 sequences, given the sequence types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.join.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.join.synopsis"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.metafunctions.join.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">LhSequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">RhSequence</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">join</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.join.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.join.expression_semantics"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.metafunctions.join.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="join.html" title="join"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">join</span></code></a><span class="special"><</span><span class="identifier">LhSequence</span><span class="special">,</span> <span class="identifier">RhSequence</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">LhSequence</span></code> + amd <code class="computeroutput"><span class="identifier">RhSequence</span></code> implement + the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + the elements of <code class="computeroutput"><span class="identifier">LhSequence</span></code> + followed by the elements of <code class="computeroutput"><span class="identifier">RhSequence</span></code>. + The order of the elements in the 2 sequences is preserved. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.join.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.join.complexity"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.metafunctions.join.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.join.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.join.header"></a></span><a class="link" href="join.html#fusion.algorithm.transformation.metafunctions.join.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">join</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">join</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="insert_range.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html new file mode 100644 index 000000000..86a0f499c --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html @@ -0,0 +1,150 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>pop_back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="zip.html" title="zip"> +<link rel="next" href="pop_front.html" title="pop_front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.pop_back"></a><a class="link" href="pop_back.html" title="pop_back">pop_back</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_back.description"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.metafunctions.pop_back.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/pop_back.html" title="pop_back"><code class="computeroutput"><span class="identifier">pop_back</span></code></a>, given the input sequence + type. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_back.synopsis"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.metafunctions.pop_back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">pop_back</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.t0"></a><p class="title"><b>Table 1.98. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_back.expression_semantics"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.metafunctions.pop_back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="pop_back.html" title="pop_back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">pop_back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with all + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + except the last element. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_back.complexity"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.metafunctions.pop_back.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_back.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_back.header"></a></span><a class="link" href="pop_back.html#fusion.algorithm.transformation.metafunctions.pop_back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">pop_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">pop_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html new file mode 100644 index 000000000..b5666a3cc --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html @@ -0,0 +1,150 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>pop_front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="pop_back.html" title="pop_back"> +<link rel="next" href="push_back.html" title="push_back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.pop_front"></a><a class="link" href="pop_front.html" title="pop_front">pop_front</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_front.description"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.metafunctions.pop_front.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/pop_front.html" title="pop_front"><code class="computeroutput"><span class="identifier">pop_front</span></code></a>, given the input sequence + type. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_front.synopsis"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.metafunctions.pop_front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">pop_front</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.t0"></a><p class="title"><b>Table 1.99. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_front.expression_semantics"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.metafunctions.pop_front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="pop_front.html" title="pop_front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">pop_front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with all + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + except the first element. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_front.complexity"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.metafunctions.pop_front.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.pop_front.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.pop_front.header"></a></span><a class="link" href="pop_front.html#fusion.algorithm.transformation.metafunctions.pop_front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">pop_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">pop_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html new file mode 100644 index 000000000..4bc3c7429 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html @@ -0,0 +1,163 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>push_back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="pop_front.html" title="pop_front"> +<link rel="next" href="push_front.html" title="push_front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.push_back"></a><a class="link" href="push_back.html" title="push_back">push_back</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_back.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_back.description"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.metafunctions.push_back.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a>, given the types of + the input sequence and element to push. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_back.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_back.synopsis"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.metafunctions.push_back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">push_back</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.push_back.t0"></a><p class="title"><b>Table 1.100. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.push_back.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_back.expression_semantics"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.metafunctions.push_back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">push_back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with the + elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + and an element of type <code class="computeroutput"><span class="identifier">T</span></code> + added to the end. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_back.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_back.complexity"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.metafunctions.push_back.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_back.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_back.header"></a></span><a class="link" href="push_back.html#fusion.algorithm.transformation.metafunctions.push_back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">push_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">push_back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="pop_front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html new file mode 100644 index 000000000..e313335e6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html @@ -0,0 +1,163 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>push_front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="push_back.html" title="push_back"> +<link rel="next" href="../../../tuple.html" title="Tuple"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../tuple.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.push_front"></a><a class="link" href="push_front.html" title="push_front">push_front</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_front.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_front.description"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.metafunctions.push_front.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/push_front.html" title="push_front"><code class="computeroutput"><span class="identifier">push_front</span></code></a>, given the types + of the input sequence and element to push. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_front.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_front.synopsis"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.metafunctions.push_front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">push_front</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.push_front.t0"></a><p class="title"><b>Table 1.101. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.push_front.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_front.expression_semantics"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.metafunctions.push_front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="push_front.html" title="push_front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">push_front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li></ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with the + elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + and an element of type <code class="computeroutput"><span class="identifier">T</span></code> + added to the beginning. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_front.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_front.complexity"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.metafunctions.push_front.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.push_front.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.push_front.header"></a></span><a class="link" href="push_front.html#fusion.algorithm.transformation.metafunctions.push_front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">push_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">push_front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../tuple.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove.html new file mode 100644 index 000000000..0f4f93522 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove.html @@ -0,0 +1,172 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>remove</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="replace_if.html" title="replace_if"> +<link rel="next" href="remove_if.html" title="remove_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.remove"></a><a class="link" href="remove.html" title="remove">remove</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove.description"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.metafunctions.remove.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/remove.html" title="remove"><code class="computeroutput"><span class="identifier">remove</span></code></a>, given the sequence and + removal types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove.synopsis"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.metafunctions.remove.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">remove</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.remove.t0"></a><p class="title"><b>Table 1.90. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Remove elements of this type + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.remove.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove.expression_semantics"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.metafunctions.remove.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="remove.html" title="remove"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">remove</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + not of type <code class="computeroutput"><span class="identifier">T</span></code>. Equivalent + to <code class="computeroutput"><a class="link" href="replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">replace_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> + <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove.complexity"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.metafunctions.remove.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove.header"></a></span><a class="link" href="remove.html#fusion.algorithm.transformation.metafunctions.remove.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">remove</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">remove</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html new file mode 100644 index 000000000..47fa07ec8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html @@ -0,0 +1,173 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>remove_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="remove.html" title="remove"> +<link rel="next" href="reverse.html" title="reverse"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.remove_if"></a><a class="link" href="remove_if.html" title="remove_if">remove_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove_if.description"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.metafunctions.remove_if.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">remove_if</span></code></a>, given the input sequence + and unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> predicate types. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove_if.synopsis"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.metafunctions.remove_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Pred</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">remove_if</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.t0"></a><p class="title"><b>Table 1.91. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + A model of unary <a href="http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html" target="_top">MPL + Lambda Expression</a> + </p> + </td> +<td> + <p> + Remove elements which evaluate to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove_if.expression_semantics"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.metafunctions.remove_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="remove_if.html" title="remove_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">remove_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence containing + the elements of <code class="computeroutput"><span class="identifier">Sequence</span></code> + for which <code class="computeroutput"><span class="identifier">Pred</span></code> evaluates + to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove_if.complexity"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.metafunctions.remove_if.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.remove_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.remove_if.header"></a></span><a class="link" href="remove_if.html#fusion.algorithm.transformation.metafunctions.remove_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">remove_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">remove_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace.html new file mode 100644 index 000000000..bc22fa0de --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace.html @@ -0,0 +1,158 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>replace</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="transform.html" title="transform"> +<link rel="next" href="replace_if.html" title="replace_if"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.replace"></a><a class="link" href="replace.html" title="replace">replace</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace.description"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.metafunctions.replace.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/replace.html" title="replace"><code class="computeroutput"><span class="identifier">replace</span></code></a>, given the types of + the input sequence and element to replace. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace.synopsis"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.metafunctions.replace.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">replace</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.replace.t0"></a><p class="title"><b>Table 1.88. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type of the search and replacement objects + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.replace.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace.expression_semantics"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.metafunctions.replace.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="replace.html" title="replace"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">replace</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/replace.html" title="replace"><code class="computeroutput"><span class="identifier">replace</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace.complexity"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.metafunctions.replace.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace.header"></a></span><a class="link" href="replace.html#fusion.algorithm.transformation.metafunctions.replace.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">replace</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">replace</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html new file mode 100644 index 000000000..8bb6d5406 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html @@ -0,0 +1,177 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>replace_if</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="replace.html" title="replace"> +<link rel="next" href="remove.html" title="remove"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.replace_if"></a><a class="link" href="replace_if.html" title="replace_if">replace_if</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace_if.description"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.metafunctions.replace_if.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">replace_if</span></code></a>, given the types + of the sequence, <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> predicate and replacement object. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace_if.synopsis"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.metafunctions.replace_if.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">replace_if</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.t0"></a><p class="title"><b>Table 1.89. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span></code> + </p> + </td> +<td> + <p> + A model of unary <a class="link" href="../../../functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + Replacement predicate + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type of the replacement object + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace_if.expression_semantics"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.metafunctions.replace_if.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">replace_if</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the return type of + <a class="link" href="../functions/replace_if.html" title="replace_if"><code class="computeroutput"><span class="identifier">replace_if</span></code></a>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace_if.complexity"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.metafunctions.replace_if.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.replace_if.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.replace_if.header"></a></span><a class="link" href="replace_if.html#fusion.algorithm.transformation.metafunctions.replace_if.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">replace_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">replace_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html new file mode 100644 index 000000000..0ff944843 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html @@ -0,0 +1,154 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="remove_if.html" title="remove_if"> +<link rel="next" href="clear.html" title="clear"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="clear.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.reverse"></a><a class="link" href="reverse.html" title="reverse">reverse</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.reverse.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.reverse.description"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.metafunctions.reverse.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/reverse.html" title="reverse"><code class="computeroutput"><span class="identifier">reverse</span></code></a>, given the input sequence + type. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.reverse.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.reverse.synopsis"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.metafunctions.reverse.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">reverse</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.reverse.t0"></a><p class="title"><b>Table 1.92. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.reverse.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.reverse.expression_semantics"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.metafunctions.reverse.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="reverse.html" title="reverse"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">reverse</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + is a <a class="link" href="../../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + is a <a class="link" href="../../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a sequence with the + elements in the reverse order to <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.reverse.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.reverse.complexity"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.metafunctions.reverse.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.reverse.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.reverse.header"></a></span><a class="link" href="reverse.html#fusion.algorithm.transformation.metafunctions.reverse.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">reverse</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">reverse</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="clear.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/transform.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/transform.html new file mode 100644 index 000000000..55115e501 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/transform.html @@ -0,0 +1,302 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>transform</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="filter_if.html" title="filter_if"> +<link rel="next" href="replace.html" title="replace"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.transform"></a><a class="link" href="transform.html" title="transform">transform</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.description"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.description">Description</a> + </h6> +<p> + For a sequence <code class="computeroutput"><span class="identifier">seq</span></code> and + function object or function pointer <code class="computeroutput"><span class="identifier">f</span></code>, + <code class="computeroutput"><span class="identifier">transform</span></code> returns a new + sequence with elements created by applying <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> to each element of <code class="computeroutput"><span class="identifier">e</span></code> + of <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.unary_version_synopsis"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.unary_version_synopsis">Unary + version synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">transform</span><span class="special">(</span> + <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.transform.t0"></a><p class="title"><b>Table 1.86. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> + is a valid expression for each element <code class="computeroutput"><span class="identifier">e</span></code> + of <code class="computeroutput"><span class="identifier">seq</span></code>. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">E</span><span class="special">)>::</span><span class="identifier">type</span></code> + is the return type of <code class="computeroutput"><span class="identifier">f</span></code> + when called with a value of each element type <code class="computeroutput"><span class="identifier">E</span></code>. + </p> + </td> +<td> + <p> + Transformation function + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.expression_semantics"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="../functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </li> +<li class="listitem"> + A model of <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + the return values of <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e</span><span class="special">)</span></code> for each element <code class="computeroutput"><span class="identifier">e</span></code> + within <code class="computeroutput"><span class="identifier">seq</span></code>. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.binary_version_synopsis"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.binary_version_synopsis">Binary + version synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">F</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span><span class="identifier">Sequence1</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Sequence2</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">transform</span><span class="special">(</span> + <span class="identifier">Sequence1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">Sequence2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq2</span><span class="special">,</span> <span class="identifier">F</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.algorithm.transformation.metafunctions.transform.t1"></a><p class="title"><b>Table 1.87. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq1</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq2</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e1</span><span class="special">,</span><span class="identifier">e2</span><span class="special">)</span></code> + is a valid expression for each pair of elements <code class="computeroutput"><span class="identifier">e1</span></code> of <code class="computeroutput"><span class="identifier">seq1</span></code> + and <code class="computeroutput"><span class="identifier">e2</span></code> of + <code class="computeroutput"><span class="identifier">seq2</span></code>. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">(</span><span class="identifier">E1</span><span class="special">,</span><span class="identifier">E2</span><span class="special">)>::</span><span class="identifier">type</span></code> + is the return type of <code class="computeroutput"><span class="identifier">f</span></code> + when called with elements of type <code class="computeroutput"><span class="identifier">E1</span></code> + and <code class="computeroutput"><span class="identifier">E2</span></code> + </p> + </td> +<td> + <p> + Transformation function + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><p> + <span class="bold"><strong>Return type</strong></span>: A model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a new sequence, containing + the return values of <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">e1</span><span class="special">,</span> <span class="identifier">e2</span><span class="special">)</span></code> for each pair of elements <code class="computeroutput"><span class="identifier">e1</span></code> and <code class="computeroutput"><span class="identifier">e2</span></code> + within <code class="computeroutput"><span class="identifier">seq1</span></code> and <code class="computeroutput"><span class="identifier">seq2</span></code> respectively. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.complexity"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.complexity">Complexity</a> + </h6> +<p> + Constant. Returns a view which is lazily evaluated. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h5"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.header"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">transform</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">transform</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.transform.h6"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.transform.example"></a></span><a class="link" href="transform.html#fusion.algorithm.transformation.metafunctions.transform.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">triple</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">t</span> <span class="special">*</span> <span class="number">3</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">};</span> +<span class="special">...</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="../functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">),</span> <span class="identifier">triple</span><span class="special">())</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">3</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">9</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_if.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/zip.html b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/zip.html new file mode 100644 index 000000000..775fa0e59 --- /dev/null +++ b/libs/fusion/doc/html/fusion/algorithm/transformation/metafunctions/zip.html @@ -0,0 +1,103 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>zip</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="join.html" title="join"> +<link rel="next" href="pop_back.html" title="pop_back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="join.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.algorithm.transformation.metafunctions.zip"></a><a class="link" href="zip.html" title="zip">zip</a> +</h5></div></div></div> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.zip.h0"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.zip.description"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.metafunctions.zip.description">Description</a> + </h6> +<p> + Zips sequences together to form a single sequence, whos members are tuples + of the members of the component sequences. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.zip.h1"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.zip.synopsis"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.metafunctions.zip.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">,</span> + <span class="special">...</span> + <span class="keyword">typename</span> <span class="identifier">SequenceN</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">zip</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.zip.h2"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.zip.expression_semantics"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.metafunctions.zip.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="zip.html" title="zip"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">zip</span></code></a><span class="special"><</span><span class="identifier">Sequence1</span><span class="special">,</span> <span class="identifier">Sequence2</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">SequenceN</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the most restrictive + traversal category of sequences <code class="computeroutput"><span class="identifier">Sequence1</span></code> + to <code class="computeroutput"><span class="identifier">SequenceN</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Return a sequence containing + tuples of elements from each sequence. For example, applying zip to tuples + <code class="computeroutput"><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> + <span class="number">3</span><span class="special">)</span></code> + and <code class="computeroutput"><span class="special">(</span><span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span><span class="special">,</span> + <span class="char">'c'</span><span class="special">)</span></code> + would return <code class="computeroutput"><span class="special">((</span><span class="number">1</span><span class="special">,</span> <span class="char">'a'</span><span class="special">),(</span><span class="number">2</span><span class="special">,</span> <span class="char">'b'</span><span class="special">),(</span><span class="number">3</span><span class="special">,</span> + <span class="char">'c'</span><span class="special">))</span></code> + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.zip.h3"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.zip.complexity"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.metafunctions.zip.complexity">Complexity</a> + </h6> +<p> + Constant. + </p> +<h6> +<a name="fusion.algorithm.transformation.metafunctions.zip.h4"></a> + <span class="phrase"><a name="fusion.algorithm.transformation.metafunctions.zip.header"></a></span><a class="link" href="zip.html#fusion.algorithm.transformation.metafunctions.zip.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transformation</span><span class="special">/</span><span class="identifier">zip</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">zip</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="join.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pop_back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/change_log.html b/libs/fusion/doc/html/fusion/change_log.html new file mode 100644 index 000000000..e6d2128f4 --- /dev/null +++ b/libs/fusion/doc/html/fusion/change_log.html @@ -0,0 +1,123 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Change log</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="notes.html" title="Notes"> +<link rel="next" href="acknowledgements.html" title="Acknowledgements"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="notes.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.change_log"></a><a class="link" href="change_log.html" title="Change log">Change log</a> +</h2></div></div></div> +<p> + This section summarizes significant changes to the Fusion library. + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + Sep 27, 2006: Added <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code> + support. (Joel de Guzman) + </li> +<li class="listitem"> + Nov 17, 2006: Added <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variant</span></code> + support. (Joel de Guzman) + </li> +<li class="listitem"> + Feb 15, 2007: Added functional module. (Tobias Schwinger) + </li> +<li class="listitem"> + April 2, 2007: Added struct adapter. (Joel de Guzman) + </li> +<li class="listitem"> + May 8, 2007: Added associative struct adapter. (Dan Marsden) + </li> +<li class="listitem"> + Dec 20, 2007: Removed <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variant</span></code> + support. After thorough investigation, I think now that the move to make + variant a fusion sequence is rather quirky. A variant will always have + a size==1 regardless of the number of types it can contain and there's + no way to know at compile time what it contains. Iterating over its types + is simply wrong. All these imply that the variant is <span class="bold"><strong>not</strong></span> + a fusion sequence. (Joel de Guzman) + </li> +<li class="listitem"> + Oct 12, 2009: The accumulator is the first argument to the functor of + <a class="link" href="algorithm/iteration/functions/fold.html" title="fold"><code class="computeroutput"><span class="identifier">fold</span></code></a> and <a class="link" href="algorithm/iteration/functions/accumulate.html" title="accumulate"><code class="computeroutput"><span class="identifier">accumulate</span></code></a>. (Christopher Schmidt) + </li> +<li class="listitem"> + Oct 30, 2009: Added support for associative iterators and views. (Christopher + Schmidt) + </li> +<li class="listitem"> + March 1, 2010: Added <a class="link" href="adapted/adapt_struct_named.html" title="BOOST_FUSION_ADAPT_STRUCT_NAMED"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED</span></code></a> + and <a class="link" href="adapted/adapt_struct_named.html" title="BOOST_FUSION_ADAPT_STRUCT_NAMED"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_STRUCT_NAMED_NS</span></code></a> + (Hartmut Kaiser) + </li> +<li class="listitem"> + April 4, 2010: Added <a class="link" href="adapted/array.html" title="Array">array</a> + support, <a class="link" href="adapted/adapt_tpl_struct.html" title="BOOST_FUSION_ADAPT_TPL_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_TPL_STRUCT</span></code></a>, + <a class="link" href="adapted/adapt_assoc_tpl_struct.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</span></code></a>, + <a class="link" href="adapted/adapt_assoc_struct_named.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</span></code></a> + and <a class="link" href="adapted/adapt_assoc_struct_named.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS</span></code></a> + (Christopher Schmidt) + </li> +<li class="listitem"> + April 5, 2010: Added <a class="link" href="adapted/define_struct.html" title="BOOST_FUSION_DEFINE_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_DEFINE_STRUCT</span></code></a>, <a class="link" href="adapted/define_tpl_struct.html" title="BOOST_FUSION_DEFINE_TPL_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_DEFINE_TPL_STRUCT</span></code></a>, + <a class="link" href="adapted/define_assoc_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_DEFINE_ASSOC_STRUCT</span></code></a> + and <a class="link" href="adapted/define_assoc_tpl_struct.html" title="BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</span></code></a> + (Christopher Schmidt) + </li> +<li class="listitem"> + June 18, 2010: Added <a class="link" href="algorithm/iteration/functions/reverse_fold.html" title="reverse_fold"><code class="computeroutput"><span class="identifier">reverse_fold</span></code></a>, <a class="link" href="algorithm/iteration/functions/iter_fold.html" title="iter_fold"><code class="computeroutput"><span class="identifier">iter_fold</span></code></a> and <a class="link" href="algorithm/iteration/functions/reverse_iter_fold.html" title="reverse_iter_fold"><code class="computeroutput"><span class="identifier">reverse_iter_fold</span></code></a> (Christopher + Schmidt) + </li> +<li class="listitem"> + October 7, 2010: Added <a class="link" href="adapted/adapt_adt.html" title="BOOST_FUSION_ADAPT_ADT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ADT</span></code></a>, <a class="link" href="adapted/adapt_tpl_adt.html" title="BOOST_FUSION_ADAPT_TPL_ADT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_TPL_ADT</span></code></a>, + <a class="link" href="adapted/adapt_assoc_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_ADT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_ADT</span></code></a> + and <a class="link" href="adapted/adapt_assoc_tpl_adt.html" title="BOOST_FUSION_ADAPT_ASSOC_TPL_ADT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</span></code></a> + (Joel de Guzman, Hartmut Kaiser and Christopher Schmidt) + </li> +<li class="listitem"> + August 29, 2011: Added support for segmented sequences and iterators (Eric + Niebler) + </li> +<li class="listitem"> + September 16, 2011: Added preprocessed files (using wave) to speed up compilation + (Joel de Guzman) + </li> +<li class="listitem"> + October 8, 2011: Added adaptor for std::tuple (Joel de Guzman) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="notes.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container.html b/libs/fusion/doc/html/fusion/container.html new file mode 100644 index 000000000..c85cef99f --- /dev/null +++ b/libs/fusion/doc/html/fusion/container.html @@ -0,0 +1,76 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Container</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="sequence/operator/comparison/greater_than_equal.html" title="greater than equal"> +<link rel="next" href="container/vector.html" title="vector"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="sequence/operator/comparison/greater_than_equal.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="container/vector.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.container"></a><a class="link" href="container.html" title="Container">Container</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="container/vector.html">vector</a></span></dt> +<dt><span class="section"><a href="container/cons.html">cons</a></span></dt> +<dt><span class="section"><a href="container/list.html">list</a></span></dt> +<dt><span class="section"><a href="container/deque.html">deque</a></span></dt> +<dt><span class="section"><a href="container/front_extended_deque.html">front_extended_deque</a></span></dt> +<dt><span class="section"><a href="container/back_extended_deque.html">back_extended_deque</a></span></dt> +<dt><span class="section"><a href="container/set.html">set</a></span></dt> +<dt><span class="section"><a href="container/map.html">map</a></span></dt> +<dt><span class="section"><a href="container/generation.html">Generation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="container/generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="container/generation/metafunctions.html">MetaFunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="container/conversion.html">Conversion</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="container/conversion/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="container/conversion/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></div> +<p> + Fusion provides a few predefined sequences out of the box. These <span class="emphasis"><em>containers</em></span> + actually hold heterogenously typed data; unlike <a class="link" href="view.html" title="View">Views</a>. + These containers are more or less counterparts of those in <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>. + </p> +<h4> +<a name="fusion.container.h0"></a> + <span class="phrase"><a name="fusion.container.header"></a></span><a class="link" href="container.html#fusion.container.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="sequence/operator/comparison/greater_than_equal.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="container/vector.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/back_extended_deque.html b/libs/fusion/doc/html/fusion/container/back_extended_deque.html new file mode 100644 index 000000000..54d3f663d --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/back_extended_deque.html @@ -0,0 +1,235 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>back_extended_deque</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="front_extended_deque.html" title="front_extended_deque"> +<link rel="next" href="set.html" title="set"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front_extended_deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.back_extended_deque"></a><a class="link" href="back_extended_deque.html" title="back_extended_deque">back_extended_deque</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.back_extended_deque.h0"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.description"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">back_extended_deque</span></code> allows + a <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> + to be back extended. It shares the same properties as the <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>. + </p> +<h5> +<a name="fusion.container.back_extended_deque.h1"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.header"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.header">Header</a> + </h5> +<pre class="programlisting"><span class="identifier">See</span> <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> +</pre> +<h5> +<a name="fusion.container.back_extended_deque.h2"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.synopsis"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Deque</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">back_extended_deque</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.container.back_extended_deque.h3"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.template_parameters"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Deque</span></code> + </p> + </td> +<td> + <p> + Deque type + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Element type + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><span class="identifier">Deque</span></code> + can be a <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>, + a <a class="link" href="back_extended_deque.html" title="back_extended_deque"><code class="computeroutput"><span class="identifier">back_extended_deque</span></code></a> + or a <a class="link" href="back_extended_deque.html" title="back_extended_deque"><code class="computeroutput"><span class="identifier">back_extended_deque</span></code></a> + </p> +</div> +<h5> +<a name="fusion.container.back_extended_deque.h4"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.model_of"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">D</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">back_extended_deque</span></code> + type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + Heterogeneous value + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.back_extended_deque.h5"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.expression_semantics"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span> + <span class="identifier">e</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Extend <code class="computeroutput"><span class="identifier">d</span></code> prepending + <code class="computeroutput"><span class="identifier">e</span></code> to its back. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> See <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> for further details. + </p> +</div> +<h5> +<a name="fusion.container.back_extended_deque.h6"></a> + <span class="phrase"><a name="fusion.container.back_extended_deque.example"></a></span><a class="link" href="back_extended_deque.html#fusion.container.back_extended_deque.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">deque</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">initial_deque</span><span class="special">;</span> +<span class="identifier">initial_deque</span> <span class="identifier">d</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">back_extended_deque</span><span class="special"><</span><span class="identifier">initial_deque</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">d2</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span> <span class="number">999</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front_extended_deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/cons.html b/libs/fusion/doc/html/fusion/container/cons.html new file mode 100644 index 000000000..99bf8f407 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/cons.html @@ -0,0 +1,320 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>cons</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="vector.html" title="vector"> +<link rel="next" href="list.html" title="list"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.cons"></a><a class="link" href="cons.html" title="cons">cons</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.cons.h0"></a> + <span class="phrase"><a name="fusion.container.cons.description"></a></span><a class="link" href="cons.html#fusion.container.cons.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">cons</span></code> is a simple <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. It is a lisp style recursive list structure where <code class="computeroutput"><span class="identifier">car</span></code> is the <span class="emphasis"><em>head</em></span> and + <code class="computeroutput"><span class="identifier">cdr</span></code> is the <span class="emphasis"><em>tail</em></span>: + usually another cons structure or <code class="computeroutput"><span class="identifier">nil</span></code>: + the empty list. Fusion's <a class="link" href="list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> is built on top of this more + primitive data structure. It is more efficient than <a class="link" href="vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> when the target sequence + is constructed piecemeal (a data at a time). The runtime cost of access to + each element is peculiarly constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a>). + </p> +<h5> +<a name="fusion.container.cons.h1"></a> + <span class="phrase"><a name="fusion.container.cons.header"></a></span><a class="link" href="cons.html#fusion.container.cons.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">/</span><span class="identifier">cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.cons.h2"></a> + <span class="phrase"><a name="fusion.container.cons.synopsis"></a></span><a class="link" href="cons.html#fusion.container.cons.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Car</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Cdr</span> <span class="special">=</span> <span class="identifier">nil</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">cons</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.container.cons.h3"></a> + <span class="phrase"><a name="fusion.container.cons.template_parameters"></a></span><a class="link" href="cons.html#fusion.container.cons.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Car</span></code> + </p> + </td> +<td> + <p> + Head type + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Cdr</span></code> + </p> + </td> +<td> + <p> + Tail type + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">nil</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.container.cons.h4"></a> + <span class="phrase"><a name="fusion.container.cons.model_of"></a></span><a class="link" href="cons.html#fusion.container.cons.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">nil</span></code></span></dt> +<dd><p> + An empty <code class="computeroutput"><span class="identifier">cons</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">C</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">cons</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">l</span></code>, <code class="computeroutput"><span class="identifier">l2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">cons</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">car</span></code></span></dt> +<dd><p> + An arbitrary data + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">cdr</span></code></span></dt> +<dd><p> + Another <code class="computeroutput"><span class="identifier">cons</span></code> list + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.cons.h5"></a> + <span class="phrase"><a name="fusion.container.cons.expression_semantics"></a></span><a class="link" href="cons.html#fusion.container.cons.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">nil</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates an empty list. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">C</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a cons with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">C</span><span class="special">(</span><span class="identifier">car</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a cons with <code class="computeroutput"><span class="identifier">car</span></code> + head and default constructed tail. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">C</span><span class="special">(</span><span class="identifier">car</span><span class="special">,</span> + <span class="identifier">cdr</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a cons with <code class="computeroutput"><span class="identifier">car</span></code> + head and <code class="computeroutput"><span class="identifier">cdr</span></code> tail. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">C</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a cons from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">l</span> <span class="special">=</span> + <span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Assigns to a cons, <code class="computeroutput"><span class="identifier">l</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span></code> is provided + for convenience and compatibility with the original <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a> + library, despite <code class="computeroutput"><span class="identifier">cons</span></code> being + a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + only (<code class="computeroutput"><span class="identifier">at</span></code> is supposed to be + a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> requirement). The runtime complexity of <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> is constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a>). + </p> +</div> +<h5> +<a name="fusion.container.cons.h6"></a> + <span class="phrase"><a name="fusion.container.cons.example"></a></span><a class="link" href="cons.html#fusion.container.cons.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">cons</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">cons</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span> <span class="special">></span> <span class="identifier">l</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="identifier">cons</span><span class="special"><</span><span class="keyword">float</span><span class="special">>(</span><span class="number">5.5f</span><span class="special">));</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion.html b/libs/fusion/doc/html/fusion/container/conversion.html new file mode 100644 index 000000000..86941f1c2 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion.html @@ -0,0 +1,58 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Conversion</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="generation/metafunctions/map_tie.html" title="map_tie"> +<link rel="next" href="conversion/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="generation/metafunctions/map_tie.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="conversion/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.conversion"></a><a class="link" href="conversion.html" title="Conversion">Conversion</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="conversion/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="conversion/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +<p> + All fusion sequences can be converted to one of the <a class="link" href="../container.html" title="Container">Container</a> + types using one of these conversion functions. + </p> +<h5> +<a name="fusion.container.conversion.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.header"></a></span><a class="link" href="conversion.html#fusion.container.conversion.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="generation/metafunctions/map_tie.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="conversion/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions.html b/libs/fusion/doc/html/fusion/container/conversion/functions.html new file mode 100644 index 000000000..3707f67ef --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions.html @@ -0,0 +1,51 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../conversion.html" title="Conversion"> +<link rel="prev" href="../conversion.html" title="Conversion"> +<link rel="next" href="functions/as_list.html" title="as_list"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../conversion.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../conversion.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/as_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.container.conversion.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/as_list.html">as_list</a></span></dt> +<dt><span class="section"><a href="functions/as_vector.html">as_vector</a></span></dt> +<dt><span class="section"><a href="functions/as_deque.html">as_deque</a></span></dt> +<dt><span class="section"><a href="functions/as_set.html">as_set</a></span></dt> +<dt><span class="section"><a href="functions/as_map.html">as_map</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../conversion.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../conversion.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/as_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions/as_deque.html b/libs/fusion/doc/html/fusion/container/conversion/functions/as_deque.html new file mode 100644 index 000000000..4ad3c0522 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions/as_deque.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_deque</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="as_vector.html" title="as_vector"> +<link rel="next" href="as_set.html" title="as_set"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.functions.as_deque"></a><a class="link" href="as_deque.html" title="as_deque">as_deque</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.description"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.description">Description</a> + </h6> +<p> + Convert a fusion sequence to a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.synopsis"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_deque</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_deque</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_deque</span><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_deque</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.parameters"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + An instance of Sequence + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.expression_semantics"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">as_deque</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: __result_of_as_deque__<code class="computeroutput"><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">seq</span></code>, to a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.header"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">deque</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_deque.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_deque.example"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.functions.as_deque.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">as_deque</span><span class="special">(</span><a class="link" href="../../generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="char">'x'</span><span class="special">,</span> <span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions/as_list.html b/libs/fusion/doc/html/fusion/container/conversion/functions/as_list.html new file mode 100644 index 000000000..2df2b09d8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions/as_list.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_list</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="as_vector.html" title="as_vector"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.functions.as_list"></a><a class="link" href="as_list.html" title="as_list">as_list</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.functions.as_list.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.description"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.description">Description</a> + </h6> +<p> + Convert a fusion sequence to a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_list.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.synopsis"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_list</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_list</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_list</span><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_list</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_list.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.parameters"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + An instance of Sequence + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.functions.as_list.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.expression_semantics"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">as_list</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/as_list.html" title="as_list"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_list</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">seq</span></code>, to a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_list.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.header"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_list.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_list.example"></a></span><a class="link" href="as_list.html#fusion.container.conversion.functions.as_list.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">as_list</span><span class="special">(</span><a class="link" href="../../generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="char">'x'</span><span class="special">,</span> <span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions/as_map.html b/libs/fusion/doc/html/fusion/container/conversion/functions/as_map.html new file mode 100644 index 000000000..203679db9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions/as_map.html @@ -0,0 +1,141 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_map</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="as_set.html" title="as_set"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.functions.as_map"></a><a class="link" href="as_map.html" title="as_map">as_map</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.functions.as_map.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.description"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.description">Description</a> + </h6> +<p> + Convert a fusion sequence to a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_map.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.synopsis"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_map</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_map</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_map</span><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_map</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_map.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.parameters"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + An instance of Sequence + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.functions.as_map.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.expression_semantics"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">as_map</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/as_map.html" title="as_map"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_map</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">seq</span></code>, to a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: The elements of the sequence + are assumed to be __fusion_pair__s. There may be no duplicate <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a> key types. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_map.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.header"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">map</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_map.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_map.example"></a></span><a class="link" href="as_map.html#fusion.container.conversion.functions.as_map.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">as_map</span><span class="special">(</span><a class="link" href="../../generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span> + <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">make_pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="char">'X'</span><span class="special">)</span> + <span class="special">,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">make_pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="string">"Men"</span><span class="special">)))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions/as_set.html b/libs/fusion/doc/html/fusion/container/conversion/functions/as_set.html new file mode 100644 index 000000000..e4e2cd3db --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions/as_set.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_set</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="as_deque.html" title="as_deque"> +<link rel="next" href="as_map.html" title="as_map"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.functions.as_set"></a><a class="link" href="as_set.html" title="as_set">as_set</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.functions.as_set.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.description"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.description">Description</a> + </h6> +<p> + Convert a fusion sequence to a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_set.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.synopsis"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_set</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_set</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_set</span><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_set</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_set.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.parameters"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + An instance of Sequence + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.functions.as_set.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.expression_semantics"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">as_set</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/as_set.html" title="as_set"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_set</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">seq</span></code>, to a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_set.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.header"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">set</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_set.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_set.example"></a></span><a class="link" href="as_set.html#fusion.container.conversion.functions.as_set.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">as_set</span><span class="special">(</span><a class="link" href="../../generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="char">'x'</span><span class="special">,</span> <span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/functions/as_vector.html b/libs/fusion/doc/html/fusion/container/conversion/functions/as_vector.html new file mode 100644 index 000000000..e64f94930 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/functions/as_vector.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_vector</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="as_list.html" title="as_list"> +<link rel="next" href="as_deque.html" title="as_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.functions.as_vector"></a><a class="link" href="as_vector.html" title="as_vector">as_vector</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.description"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.description">Description</a> + </h6> +<p> + Convert a fusion sequence to a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.synopsis"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_vector</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_vector</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_vector</span><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">as_vector</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.parameters"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + An instance of Sequence + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.expression_semantics"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">as_vector</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/as_vector.html" title="as_vector"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_vector</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">seq</span></code>, to a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.header"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.functions.as_vector.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.functions.as_vector.example"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.functions.as_vector.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">as_vector</span><span class="special">(</span><a class="link" href="../../generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="char">'x'</span><span class="special">,</span> <span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions.html new file mode 100644 index 000000000..d38610180 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions.html @@ -0,0 +1,51 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../conversion.html" title="Conversion"> +<link rel="prev" href="functions/as_map.html" title="as_map"> +<link rel="next" href="metafunctions/as_list.html" title="as_list"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/as_map.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../conversion.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/as_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.container.conversion.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/as_list.html">as_list</a></span></dt> +<dt><span class="section"><a href="metafunctions/as_vector.html">as_vector</a></span></dt> +<dt><span class="section"><a href="metafunctions/as_deque.html">as_deque</a></span></dt> +<dt><span class="section"><a href="metafunctions/as_set.html">as_set</a></span></dt> +<dt><span class="section"><a href="metafunctions/as_map.html">as_map</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/as_map.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../conversion.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/as_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_deque.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_deque.html new file mode 100644 index 000000000..039d2deed --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_deque.html @@ -0,0 +1,131 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_deque</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="as_vector.html" title="as_vector"> +<link rel="next" href="as_set.html" title="as_set"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.metafunctions.as_deque"></a><a class="link" href="as_deque.html" title="as_deque">as_deque</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.description"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.description">Description</a> + </h6> +<p> + Returns the result type of __as_deque__. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.synopsis"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">as_deque</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.parameters"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + The sequence type to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.expression_semantics"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_deque</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> with same elements as + the input sequence, <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">Sequence</span></code>, to a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.header"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">deque</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_deque.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_deque.example"></a></span><a class="link" href="as_deque.html#fusion.container.conversion.metafunctions.as_deque.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_deque</span><span class="special"><</span><a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_list.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_list.html new file mode 100644 index 000000000..ce3c4dcd9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_list.html @@ -0,0 +1,131 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_list</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="as_vector.html" title="as_vector"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.metafunctions.as_list"></a><a class="link" href="as_list.html" title="as_list">as_list</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.description"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/as_list.html" title="as_list"><code class="computeroutput"><span class="identifier">as_list</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.synopsis"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">as_list</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.parameters"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + The sequence type to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.expression_semantics"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_list</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> with same elements as the + input sequence, <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">Sequence</span></code>, to a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.header"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_list.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_list.example"></a></span><a class="link" href="as_list.html#fusion.container.conversion.metafunctions.as_list.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_list</span><span class="special"><</span><a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_map.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_map.html new file mode 100644 index 000000000..9e5963c12 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_map.html @@ -0,0 +1,137 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_map</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="as_set.html" title="as_set"> +<link rel="next" href="../../../view.html" title="View"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../view.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.metafunctions.as_map"></a><a class="link" href="as_map.html" title="as_map">as_map</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.description"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/as_map.html" title="as_map"><code class="computeroutput"><span class="identifier">as_map</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.synopsis"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">as_map</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.parameters"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.expression_semantics"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_map</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> with same elements as the + input sequence, <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">Sequence</span></code>, to a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: The elements of the sequence + are assumed to be __fusion_pair__s. There may be no duplicate <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a> key types. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.header"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">map</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_map.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_map.example"></a></span><a class="link" href="as_map.html#fusion.container.conversion.metafunctions.as_map.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_map</span><span class="special"><</span><a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span> + <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> + <span class="special">,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../view.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_set.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_set.html new file mode 100644 index 000000000..196fb2e79 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_set.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_set</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="as_deque.html" title="as_deque"> +<link rel="next" href="as_map.html" title="as_map"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.metafunctions.as_set"></a><a class="link" href="as_set.html" title="as_set">as_set</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.description"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/as_set.html" title="as_set"><code class="computeroutput"><span class="identifier">as_set</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.synopsis"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">as_set</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.parameters"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.expression_semantics"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_set</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> with same elements as the + input sequence, <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">Sequence</span></code>, to a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.header"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">set</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_set.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_set.example"></a></span><a class="link" href="as_set.html#fusion.container.conversion.metafunctions.as_set.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_set</span><span class="special"><</span><a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_vector.html b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_vector.html new file mode 100644 index 000000000..a3b6ea85d --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/conversion/metafunctions/as_vector.html @@ -0,0 +1,131 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>as_vector</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="as_list.html" title="as_list"> +<link rel="next" href="as_deque.html" title="as_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.conversion.metafunctions.as_vector"></a><a class="link" href="as_vector.html" title="as_vector">as_vector</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h0"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.description"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/as_vector.html" title="as_vector"><code class="computeroutput"><span class="identifier">as_vector</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h1"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.synopsis"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">as_vector</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h2"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.parameters"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + The sequence to convert. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h3"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.expression_semantics"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_vector</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> with same elements as + the input sequence, <code class="computeroutput"><span class="identifier">Sequence</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Convert a fusion sequence, + <code class="computeroutput"><span class="identifier">Sequence</span></code>, to a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>. + </p> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h4"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.header"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">convert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">as_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.conversion.metafunctions.as_vector.h5"></a> + <span class="phrase"><a name="fusion.container.conversion.metafunctions.as_vector.example"></a></span><a class="link" href="as_vector.html#fusion.container.conversion.metafunctions.as_vector.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">as_vector</span><span class="special"><</span><a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="as_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="as_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/deque.html b/libs/fusion/doc/html/fusion/container/deque.html new file mode 100644 index 000000000..1ff9c8171 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/deque.html @@ -0,0 +1,297 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deque</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="list.html" title="list"> +<link rel="next" href="front_extended_deque.html" title="front_extended_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front_extended_deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.deque"></a><a class="link" href="deque.html" title="deque">deque</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.deque.h0"></a> + <span class="phrase"><a name="fusion.container.deque.description"></a></span><a class="link" href="deque.html#fusion.container.deque.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">deque</span></code> is a simple <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> that supports constant-time insertion and removal of elements + at both ends. Like the <a class="link" href="list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> and <a class="link" href="cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a>, <code class="computeroutput"><span class="identifier">deque</span></code> + is more efficient than <a class="link" href="vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> (especially at compile time) + when the target sequence is constructed piecemeal (a data at a time, e.g. + when constructing expression templates). Like the <a class="link" href="list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> and <a class="link" href="cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a>, runtime cost of access to + each element is peculiarly constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a>). + </p> +<p> + Element insertion and removal are done by special <code class="computeroutput"><span class="identifier">deque</span></code> + helper classes <a class="link" href="front_extended_deque.html" title="front_extended_deque"><code class="computeroutput"><span class="identifier">front_extended_deque</span></code></a> and <a class="link" href="back_extended_deque.html" title="back_extended_deque"><code class="computeroutput"><span class="identifier">back_extended_deque</span></code></a>. + </p> +<h5> +<a name="fusion.container.deque.h1"></a> + <span class="phrase"><a name="fusion.container.deque.header"></a></span><a class="link" href="deque.html#fusion.container.deque.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">/</span><span class="identifier">deque_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deque_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.deque.h2"></a> + <span class="phrase"><a name="fusion.container.deque.synopsis"></a></span><a class="link" href="deque.html#fusion.container.deque.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span><span class="identifier">Elements</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">deque</span><span class="special">;</span> +</pre> +<p> + For C++11 compilers, the variadic class interface has no upper bound. + </p> +<p> + For C++03 compilers, the variadic class interface accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. + Example: + </p> +<pre class="programlisting"><span class="identifier">deque</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> +</pre> +<p> + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_DEQUE_SIZE</span> <span class="number">20</span> +</pre> +<h5> +<a name="fusion.container.deque.h3"></a> + <span class="phrase"><a name="fusion.container.deque.template_parameters"></a></span><a class="link" href="deque.html#fusion.container.deque.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Elements</span></code> + </p> + </td> +<td> + <p> + Element types + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.container.deque.h4"></a> + <span class="phrase"><a name="fusion.container.deque.model_of"></a></span><a class="link" href="deque.html#fusion.container.deque.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">D</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">deque</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">d</span></code>, <code class="computeroutput"><span class="identifier">d2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">deque</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.deque.h5"></a> + <span class="phrase"><a name="fusion.container.deque.expression_semantics"></a></span><a class="link" href="deque.html#fusion.container.deque.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a deque with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a deque with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a deque from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">d</span> <span class="special">=</span> + <span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Assigns to a deque, <code class="computeroutput"><span class="identifier">d</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span></code> is provided + for convenience, despite <code class="computeroutput"><span class="identifier">deque</span></code> + being a <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> only (<code class="computeroutput"><span class="identifier">at</span></code> + is supposed to be a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> requirement). The runtime complexity of <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> is constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a>). <code class="computeroutput"><span class="identifier">deque</span></code> + element access utilizes operator overloading with argument dependent lookup + (ADL) of the proper element getter function given a static constant index + parameter. Interestingly, with modern C++ compilers, this lookup is very + fast and rivals recursive template instantiations in compile time-speed, + so much so that <code class="computeroutput"><span class="identifier">deque</span></code> relies + on ADL for all element access (indexing) as well as iteration. + </p> +</div> +<h5> +<a name="fusion.container.deque.h6"></a> + <span class="phrase"><a name="fusion.container.deque.example"></a></span><a class="link" href="deque.html#fusion.container.deque.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">deque</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">d</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front_extended_deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/front_extended_deque.html b/libs/fusion/doc/html/fusion/container/front_extended_deque.html new file mode 100644 index 000000000..60ea872f5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/front_extended_deque.html @@ -0,0 +1,235 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>front_extended_deque</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="deque.html" title="deque"> +<link rel="next" href="back_extended_deque.html" title="back_extended_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back_extended_deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.front_extended_deque"></a><a class="link" href="front_extended_deque.html" title="front_extended_deque">front_extended_deque</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.front_extended_deque.h0"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.description"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">front_extended_deque</span></code> allows + a <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> + to be front extended. It shares the same properties as the <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>. + </p> +<h5> +<a name="fusion.container.front_extended_deque.h1"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.header"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.header">Header</a> + </h5> +<pre class="programlisting"><span class="identifier">See</span> <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> +</pre> +<h5> +<a name="fusion.container.front_extended_deque.h2"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.synopsis"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Deque</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">front_extended_deque</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.container.front_extended_deque.h3"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.template_parameters"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Deque</span></code> + </p> + </td> +<td> + <p> + Deque type + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Element type + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><span class="identifier">Deque</span></code> + can be a <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a>, + a <a class="link" href="front_extended_deque.html" title="front_extended_deque"><code class="computeroutput"><span class="identifier">front_extended_deque</span></code></a> + or a <a class="link" href="back_extended_deque.html" title="back_extended_deque"><code class="computeroutput"><span class="identifier">back_extended_deque</span></code></a> + </p> +</div> +<h5> +<a name="fusion.container.front_extended_deque.h4"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.model_of"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">D</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">front_extended_deque</span></code> + type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + Heterogeneous value + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.front_extended_deque.h5"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.expression_semantics"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span> + <span class="identifier">e</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Extend <code class="computeroutput"><span class="identifier">d</span></code> prepending + <code class="computeroutput"><span class="identifier">e</span></code> to its front. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">d</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> See <a class="link" href="deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> for further details. + </p> +</div> +<h5> +<a name="fusion.container.front_extended_deque.h6"></a> + <span class="phrase"><a name="fusion.container.front_extended_deque.example"></a></span><a class="link" href="front_extended_deque.html#fusion.container.front_extended_deque.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">deque</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">initial_deque</span><span class="special">;</span> +<span class="identifier">initial_deque</span> <span class="identifier">d</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">front_extended_deque</span><span class="special"><</span><span class="identifier">initial_deque</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">d2</span><span class="special">(</span><span class="identifier">d</span><span class="special">,</span> <span class="number">999</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><span class="identifier">d2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back_extended_deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation.html b/libs/fusion/doc/html/fusion/container/generation.html new file mode 100644 index 000000000..004ef6b08 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation.html @@ -0,0 +1,58 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Generation</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="map.html" title="map"> +<link rel="next" href="generation/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="map.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.generation"></a><a class="link" href="generation.html" title="Generation">Generation</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="generation/metafunctions.html">MetaFunctions</a></span></dt> +</dl></div> +<p> + These are the functions that you can use to generate various forms of <a class="link" href="../container.html" title="Container">Container</a> from elemental values. + </p> +<h5> +<a name="fusion.container.generation.h0"></a> + <span class="phrase"><a name="fusion.container.generation.header"></a></span><a class="link" href="generation.html#fusion.container.generation.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">generation</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="map.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions.html b/libs/fusion/doc/html/fusion/container/generation/functions.html new file mode 100644 index 000000000..2a4309e4f --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions.html @@ -0,0 +1,57 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../generation.html" title="Generation"> +<link rel="prev" href="../generation.html" title="Generation"> +<link rel="next" href="functions/make_list.html" title="make_list"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../generation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/make_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.container.generation.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/make_list.html">make_list</a></span></dt> +<dt><span class="section"><a href="functions/make_cons.html">make_cons</a></span></dt> +<dt><span class="section"><a href="functions/make_vector.html">make_vector</a></span></dt> +<dt><span class="section"><a href="functions/make_deque.html">make_deque</a></span></dt> +<dt><span class="section"><a href="functions/make_set.html">make_set</a></span></dt> +<dt><span class="section"><a href="functions/make_map.html">make_map</a></span></dt> +<dt><span class="section"><a href="functions/tiers.html">Tiers</a></span></dt> +<dt><span class="section"><a href="functions/list_tie.html">list_tie</a></span></dt> +<dt><span class="section"><a href="functions/vector_tie.html">vector_tie</a></span></dt> +<dt><span class="section"><a href="functions/map_tie.html">map_tie</a></span></dt> +<dt><span class="section"><a href="functions/deque_tie.html">deque_tie</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../generation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/make_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/deque_tie.html b/libs/fusion/doc/html/fusion/container/generation/functions/deque_tie.html new file mode 100644 index 000000000..f21251ba3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/deque_tie.html @@ -0,0 +1,145 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deque_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="map_tie.html" title="map_tie"> +<link rel="next" href="../metafunctions.html" title="MetaFunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="map_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.deque_tie"></a><a class="link" href="deque_tie.html" title="deque_tie">deque_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.description"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.description">Description</a> + </h6> +<p> + Constructs a tie using a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> sequence. + </p> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.synopsis"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span><span class="identifier">Elements</span><span class="special">></span> +<a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a><span class="special"><</span><span class="identifier">Elements</span><span class="special">&...></span> +<span class="identifier">deque_tie</span><span class="special">(</span><span class="identifier">Elements</span><span class="special">&...</span> <span class="identifier">elements</span><span class="special">);</span> +</pre> +<p> + For C++11 compilers, the variadic function interface has no upper bound. + </p> +<p> + For C++03 compilers, the variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_DEQUE_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.parameters"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">elements</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">Elements</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">deque_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.expression_semantics"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">deque_tie</span><span class="special">(</span><span class="identifier">elements</span><span class="special">...);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a><Elements&...> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> of references from <code class="computeroutput"><span class="identifier">elements</span><span class="special">...</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.header"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">deque_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deque_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.deque_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.deque_tie.example"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.functions.deque_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span> +<span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">123.456</span><span class="special">;</span> +<span class="identifier">deque_tie</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="map_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/list_tie.html b/libs/fusion/doc/html/fusion/container/generation/functions/list_tie.html new file mode 100644 index 000000000..88d905dbc --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/list_tie.html @@ -0,0 +1,145 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>list_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="tiers.html" title="Tiers"> +<link rel="next" href="vector_tie.html" title="vector_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tiers.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.list_tie"></a><a class="link" href="list_tie.html" title="list_tie">list_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.list_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.description"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.description">Description</a> + </h6> +<p> + Constructs a tie using a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> sequence. + </p> +<h6> +<a name="fusion.container.generation.functions.list_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.synopsis"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="identifier">T0</span><span class="special">&,</span> <span class="identifier">T1</span><span class="special">&,...</span> <span class="identifier">TN</span><span class="special">&></span> +<span class="identifier">list_tie</span><span class="special">(</span><span class="identifier">T0</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_LIST_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.list_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.parameters"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">list_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.list_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.expression_semantics"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">list_tie</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><T0&, T1&,... + TN&> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> of references from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.list_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.header"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">list_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">list_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.list_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.list_tie.example"></a></span><a class="link" href="list_tie.html#fusion.container.generation.functions.list_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span> +<span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">123.456</span><span class="special">;</span> +<span class="identifier">list_tie</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tiers.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_cons.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_cons.html new file mode 100644 index 000000000..67bbad341 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_cons.html @@ -0,0 +1,165 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_cons</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_list.html" title="make_list"> +<link rel="next" href="make_vector.html" title="make_vector"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_cons"></a><a class="link" href="make_cons.html" title="make_cons">make_cons</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_cons.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.description"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> + from <code class="computeroutput"><span class="identifier">car</span></code> (<span class="emphasis"><em>head</em></span>) + and optional <code class="computeroutput"><span class="identifier">cdr</span></code> (<span class="emphasis"><em>tail</em></span>). + </p> +<h6> +<a name="fusion.container.generation.functions.make_cons.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.synopsis"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Car</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_cons.html" title="make_cons"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span></code></a><span class="special"><</span><span class="identifier">Car</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_cons</span><span class="special">(</span><span class="identifier">Car</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">car</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Car</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Cdr</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_cons.html" title="make_cons"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span></code></a><span class="special"><</span><span class="identifier">Car</span><span class="special">,</span> <span class="identifier">Cdr</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_cons</span><span class="special">(</span><span class="identifier">Car</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">car</span><span class="special">,</span> <span class="identifier">Cdr</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">cdr</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_cons.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.parameters"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">car</span></code> + </p> + </td> +<td> + <p> + Instance of <code class="computeroutput"><span class="identifier">Car</span></code> + </p> + </td> +<td> + <p> + The list's head + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">cdr</span></code> + </p> + </td> +<td> + <p> + Instance of <code class="computeroutput"><span class="identifier">Cdr</span></code> + </p> + </td> +<td> + <p> + The list's tail (optional) + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_cons.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.expression_semantics"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_cons</span><span class="special">(</span><span class="identifier">car</span><span class="special">,</span> <span class="identifier">cdr</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_cons.html" title="make_cons"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Car</span><span class="special">,</span> <span class="identifier">Cdr</span><span class="special">>::</span><span class="identifier">type</span></code> or <a class="link" href="../metafunctions/make_cons.html" title="make_cons"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Car</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> from <code class="computeroutput"><span class="identifier">car</span></code> + (<span class="emphasis"><em>head</em></span>) and optional <code class="computeroutput"><span class="identifier">cdr</span></code> + (<span class="emphasis"><em>tail</em></span>). + </p> +<h6> +<a name="fusion.container.generation.functions.make_cons.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.header"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_cons.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.example"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_cons</span><span class="special">(</span><span class="char">'x'</span><span class="special">,</span> <span class="identifier">make_cons</span><span class="special">(</span><span class="number">123</span><span class="special">))</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_cons.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_cons.see_also"></a></span><a class="link" href="make_cons.html#fusion.container.generation.functions.make_cons.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_deque.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_deque.html new file mode 100644 index 000000000..752898de6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_deque.html @@ -0,0 +1,152 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_deque</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_vector.html" title="make_vector"> +<link rel="next" href="make_set.html" title="make_set"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_deque"></a><a class="link" href="make_deque.html" title="make_deque">make_deque</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_deque.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.description"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> + from one or more values. + </p> +<h6> +<a name="fusion.container.generation.functions.make_deque.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.synopsis"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span><span class="identifier">Elements</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_deque.html" title="make_deque"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_deque</span></code></a><span class="special"><</span><span class="identifier">Elements</span><span class="special">...>::</span><span class="identifier">type</span> +<span class="identifier">make_deque</span><span class="special">(</span><span class="identifier">Elements</span> <span class="keyword">const</span><span class="special">&...</span> <span class="identifier">elements</span><span class="special">);</span> +</pre> +<p> + For C++11 compilers, the variadic function interface has no upper bound. + </p> +<p> + For C++11 compilers, the variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_DEQUE_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_deque.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.parameters"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">elements</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">Elements</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_deque</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_deque.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.expression_semantics"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_deque</span><span class="special">(</span><span class="identifier">elements</span><span class="special">...);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_deque.html" title="make_deque"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_deque</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">Elements</span><span class="special">...>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> from <code class="computeroutput"><span class="identifier">elements</span><span class="special">...</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.make_deque.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.header"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_deque.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.example"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_deque</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">,</span> <span class="number">12.5</span><span class="special">)</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_deque.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_deque.see_also"></a></span><a class="link" href="make_deque.html#fusion.container.generation.functions.make_deque.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_list.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_list.html new file mode 100644 index 000000000..cae1bc51b --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_list.html @@ -0,0 +1,151 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_list</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="make_cons.html" title="make_cons"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_cons.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_list"></a><a class="link" href="make_list.html" title="make_list">make_list</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_list.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.description"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + from one or more values. + </p> +<h6> +<a name="fusion.container.generation.functions.make_list.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.synopsis"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_list</span></code></a><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_list</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_LIST_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_list.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.parameters"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_list</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_list.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.expression_semantics"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_list</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_list</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.make_list.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.header"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_list.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.example"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_list</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">,</span> <span class="number">12.5</span><span class="special">)</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_list.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_list.see_also"></a></span><a class="link" href="make_list.html#fusion.container.generation.functions.make_list.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_cons.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html new file mode 100644 index 000000000..a2c2e2ee0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html @@ -0,0 +1,182 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_map</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_set.html" title="make_set"> +<link rel="next" href="tiers.html" title="Tiers"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tiers.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_map"></a><a class="link" href="make_map.html" title="make_map">make_map</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_map.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.description"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> + from one or more key/data pairs. + </p> +<h6> +<a name="fusion.container.generation.functions.make_map.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.synopsis"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">K0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">KN</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_map</span></code></a><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K0</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">,</span> <span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_map</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> before + including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_MAP_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_map.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.parameters"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> + <span class="identifier">K1</span><span class="special">,...</span> + <span class="identifier">KN</span></code> + </p> + </td> +<td> + <p> + The key types + </p> + </td> +<td> + <p> + Keys associated with <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_map</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_map.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.expression_semantics"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_map</span><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">>(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_map</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K0</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">,</span> <span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> from <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span></code> + keys and <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> data. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.generation.functions.make_map.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.header"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_map.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.example"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>(</span><span class="char">'X'</span><span class="special">,</span> <span class="string">"Men"</span><span class="special">)</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_map.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_map.see_also"></a></span><a class="link" href="make_map.html#fusion.container.generation.functions.make_map.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a>, + <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tiers.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_set.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_set.html new file mode 100644 index 000000000..a91a52309 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_set.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_set</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_deque.html" title="make_deque"> +<link rel="next" href="make_map.html" title="make_map"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_set"></a><a class="link" href="make_set.html" title="make_set">make_set</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_set.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.description"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> + from one or more values. + </p> +<h6> +<a name="fusion.container.generation.functions.make_set.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.synopsis"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_set.html" title="make_set"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span></code></a><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_set</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> before + including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_SET_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_set.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.parameters"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_set</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_set.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.expression_semantics"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_set</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_set.html" title="make_set"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.generation.functions.make_set.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.header"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_set.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.example"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_set</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">,</span> <span class="number">12.5</span><span class="special">)</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_set.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_set.see_also"></a></span><a class="link" href="make_set.html#fusion.container.generation.functions.make_set.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/make_vector.html b/libs/fusion/doc/html/fusion/container/generation/functions/make_vector.html new file mode 100644 index 000000000..26a4a8bc8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/make_vector.html @@ -0,0 +1,151 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_vector</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_cons.html" title="make_cons"> +<link rel="next" href="make_deque.html" title="make_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_cons.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.make_vector"></a><a class="link" href="make_vector.html" title="make_vector">make_vector</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.make_vector.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.description"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.description">Description</a> + </h6> +<p> + Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + from one or more values. + </p> +<h6> +<a name="fusion.container.generation.functions.make_vector.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.synopsis"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</span></code></a><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_vector</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_vector.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.parameters"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_vector</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.make_vector.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.expression_semantics"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_vector</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../metafunctions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.make_vector.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.header"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_vector.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.example"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">make_vector</span><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">,</span> <span class="number">12.5</span><span class="special">)</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.make_vector.h6"></a> + <span class="phrase"><a name="fusion.container.generation.functions.make_vector.see_also"></a></span><a class="link" href="make_vector.html#fusion.container.generation.functions.make_vector.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_cons.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/map_tie.html b/libs/fusion/doc/html/fusion/container/generation/functions/map_tie.html new file mode 100644 index 000000000..f6ae69401 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/map_tie.html @@ -0,0 +1,171 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>map_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="vector_tie.html" title="vector_tie"> +<link rel="next" href="deque_tie.html" title="deque_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.map_tie"></a><a class="link" href="map_tie.html" title="map_tie">map_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.map_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.description"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.description">Description</a> + </h6> +<p> + Constructs a tie using a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> sequence. + </p> +<h6> +<a name="fusion.container.generation.functions.map_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.synopsis"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">K0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">KN</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">D0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">D1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">DN</span><span class="special">></span> +<a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">D0</span><span class="special">&>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="identifier">K1</span><span class="special">,</span> <span class="identifier">D1</span><span class="special">&>,...</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="identifier">KN</span><span class="special">,</span> <span class="identifier">DN</span><span class="special">&></span> <span class="special">></span> +<span class="identifier">map_tie</span><span class="special">(</span><span class="identifier">D0</span><span class="special">&</span> <span class="identifier">d0</span><span class="special">,</span> <span class="identifier">D1</span><span class="special">&</span> <span class="identifier">d1</span><span class="special">...</span> <span class="identifier">DN</span><span class="special">&</span> <span class="identifier">dN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>, and a corresponding number of key types. + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_MAP_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.map_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.parameters"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> + <span class="identifier">K1</span><span class="special">,...</span> + <span class="identifier">KN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The key types associated with each of the <code class="computeroutput"><span class="identifier">x1</span><span class="special">,</span><span class="identifier">x2</span><span class="special">,...,</span><span class="identifier">xN</span></code> + values + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">map_tie</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.map_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.expression_semantics"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">map_tie</span><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">>(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><<a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><K0, D0&>, <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><K1, + D1&>,... <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><KN, + DN&> > + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> of references from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code> with keys <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span></code> + </p> +<h6> +<a name="fusion.container.generation.functions.map_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.header"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">map_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">map_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.map_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.map_tie.example"></a></span><a class="link" href="map_tie.html#fusion.container.generation.functions.map_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">int_key</span><span class="special">;</span> +<span class="keyword">struct</span> <span class="identifier">double_key</span><span class="special">;</span> +<span class="special">...</span> +<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span> +<span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">123.456</span><span class="special">;</span> +<span class="identifier">map_tie</span><span class="special"><</span><span class="identifier">int_key</span><span class="special">,</span> <span class="identifier">double_key</span><span class="special">>(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/tiers.html b/libs/fusion/doc/html/fusion/container/generation/functions/tiers.html new file mode 100644 index 000000000..bcaab0c9c --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/tiers.html @@ -0,0 +1,110 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Tiers</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="make_map.html" title="make_map"> +<link rel="next" href="list_tie.html" title="list_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_map.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.tiers"></a><a class="link" href="tiers.html" title="Tiers">Tiers</a> +</h5></div></div></div> +<p> + Tiers are sequences, where all elements are non-const reference types. + They are constructed with a call to a couple of <span class="emphasis"><em>tie</em></span> + function templates. The succeeding sections document the various <span class="emphasis"><em>tier</em></span> + flavors. + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="list_tie.html" title="list_tie"><code class="computeroutput"><span class="identifier">list_tie</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">map_tie</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="deque_tie.html" title="deque_tie"><code class="computeroutput"><span class="identifier">deque_tie</span></code></a> + </li> +</ul></div> +<p> + Example: + </p> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">;</span> <span class="keyword">double</span> <span class="identifier">d</span><span class="special">;</span> + <span class="special">...</span> +<a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">);</span> +</pre> +<p> + The <a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a> function creates + a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + of type <code class="computeroutput"><a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">&,</span> <span class="keyword">char</span><span class="special">&,</span> <span class="keyword">double</span><span class="special">&></span></code>. The same result could be achieved + with the call <a class="link" href="make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a>(<a href="http://www.boost.org/doc/html/ref.html" target="_top"><code class="computeroutput"><span class="identifier">ref</span></code></a>(i), <a href="http://www.boost.org/doc/html/ref.html" target="_top"><code class="computeroutput"><span class="identifier">ref</span></code></a>(c), <a href="http://www.boost.org/doc/html/ref.html" target="_top"><code class="computeroutput"><span class="identifier">ref</span></code></a>(a)) <a href="#ftn.fusion.container.generation.functions.tiers.f0" class="footnote" name="fusion.container.generation.functions.tiers.f0"><sup class="footnote">[10]</sup></a>. + </p> +<p> + A <span class="emphasis"><em>tie</em></span> can be used to 'unpack' another tuple into + variables. E.g.: + </p> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">;</span> <span class="keyword">double</span> <span class="identifier">d</span><span class="special">;</span> +<a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">=</span> <a class="link" href="make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="char">'a'</span><span class="special">,</span> <span class="number">5.5</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="string">" "</span> <span class="special"><<</span> <span class="identifier">c</span> <span class="special"><<</span> <span class="string">" "</span> <span class="special"><<</span> <span class="identifier">d</span><span class="special">;</span> +</pre> +<p> + This code prints 1 a 5.5 to the standard output stream. A sequence unpacking + operation like this is found for example in ML and Python. It is convenient + when calling functions which return sequences. + </p> +<h6> +<a name="fusion.container.generation.functions.tiers.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.tiers.ignore"></a></span><a class="link" href="tiers.html#fusion.container.generation.functions.tiers.ignore">Ignore</a> + </h6> +<p> + There is also an object called <span class="emphasis"><em>ignore</em></span> which allows + you to ignore an element assigned by a sequence. The idea is that a function + may return a sequence, only part of which you are interested in. For + example: + </p> +<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">c</span><span class="special">;</span> +<a class="link" href="vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">ignore</span><span class="special">,</span> <span class="identifier">c</span><span class="special">)</span> <span class="special">=</span> <a class="link" href="make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.container.generation.functions.tiers.f0" class="footnote"><p><a href="#fusion.container.generation.functions.tiers.f0" class="para"><sup class="para">[10] </sup></a> + see <a href="http://www.boost.org/doc/html/ref.html" target="_top">Boost.Ref</a> + for details about <code class="computeroutput"><span class="identifier">ref</span></code> + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_map.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/functions/vector_tie.html b/libs/fusion/doc/html/fusion/container/generation/functions/vector_tie.html new file mode 100644 index 000000000..51536bc89 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/functions/vector_tie.html @@ -0,0 +1,145 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>vector_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="list_tie.html" title="list_tie"> +<link rel="next" href="map_tie.html" title="map_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.functions.vector_tie"></a><a class="link" href="vector_tie.html" title="vector_tie">vector_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.description"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.description">Description</a> + </h6> +<p> + Constructs a tie using a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> sequence. + </p> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.synopsis"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">T0</span><span class="special">&,</span> <span class="identifier">T1</span><span class="special">&,...</span> <span class="identifier">TN</span><span class="special">&></span> +<span class="identifier">vector_tie</span><span class="special">(</span><span class="identifier">T0</span><span class="special">&</span> <span class="identifier">x0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">&</span> <span class="identifier">x1</span><span class="special">...</span> <span class="identifier">TN</span><span class="special">&</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.parameters"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> + <span class="identifier">x1</span><span class="special">,...</span> + <span class="identifier">xN</span></code> + </p> + </td> +<td> + <p> + Instances of <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">vector_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.expression_semantics"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">vector_tie</span><span class="special">(</span><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><T0&, T1&,... + TN&> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> of references from <code class="computeroutput"><span class="identifier">x0</span><span class="special">,</span> <span class="identifier">x1</span><span class="special">,...</span> <span class="identifier">xN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.header"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">vector_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.functions.vector_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.functions.vector_tie.example"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.functions.vector_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span> +<span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">123.456</span><span class="special">;</span> +<span class="identifier">vector_tie</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions.html new file mode 100644 index 000000000..17219d805 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions.html @@ -0,0 +1,56 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>MetaFunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../generation.html" title="Generation"> +<link rel="prev" href="functions/deque_tie.html" title="deque_tie"> +<link rel="next" href="metafunctions/make_list.html" title="make_list"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/deque_tie.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/make_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.container.generation.metafunctions"></a><a class="link" href="metafunctions.html" title="MetaFunctions">MetaFunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/make_list.html">make_list</a></span></dt> +<dt><span class="section"><a href="metafunctions/make_cons.html">make_cons</a></span></dt> +<dt><span class="section"><a href="metafunctions/make_vector.html">make_vector</a></span></dt> +<dt><span class="section"><a href="metafunctions/make_deque.html">make_deque</a></span></dt> +<dt><span class="section"><a href="metafunctions/make_set.html">make_set</a></span></dt> +<dt><span class="section"><a href="metafunctions/make_map.html">make_map</a></span></dt> +<dt><span class="section"><a href="metafunctions/list_tie.html">list_tie</a></span></dt> +<dt><span class="section"><a href="metafunctions/vector_tie.html">vector_tie</a></span></dt> +<dt><span class="section"><a href="metafunctions/deque_tie.html">deque_tie</a></span></dt> +<dt><span class="section"><a href="metafunctions/map_tie.html">map_tie</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/deque_tie.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/make_list.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/deque_tie.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/deque_tie.html new file mode 100644 index 000000000..1d736e084 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/deque_tie.html @@ -0,0 +1,142 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deque_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="vector_tie.html" title="vector_tie"> +<link rel="next" href="map_tie.html" title="map_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.deque_tie"></a><a class="link" href="deque_tie.html" title="deque_tie">deque_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.description"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/deque_tie.html" title="deque_tie"><code class="computeroutput"><span class="identifier">deque_tie</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.synopsis"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span><span class="identifier">Elements</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">deque_tie</span><span class="special">;</span> +</pre> +<p> + For C++11 compilers, the variadic template interface has no upper bound. + </p> +<p> + For C++03 compilers, the variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_DEQUE_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.parameters"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Elements</span></code> + </p> + </td> +<td> + <p> + Variadic template types + </p> + </td> +<td> + <p> + Template arguments to <code class="computeroutput"><span class="identifier">deque_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.expression_semantics"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deque_tie</span><span class="special"><</span><span class="identifier">Elements</span><span class="special">...>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a><Elements&...> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> of references from <code class="computeroutput"><span class="identifier">Elements</span><span class="special">...</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.header"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">deque_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deque_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.deque_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.deque_tie.example"></a></span><a class="link" href="deque_tie.html#fusion.container.generation.metafunctions.deque_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deque_tie</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/list_tie.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/list_tie.html new file mode 100644 index 000000000..aa1bfadd6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/list_tie.html @@ -0,0 +1,142 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>list_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_map.html" title="make_map"> +<link rel="next" href="vector_tie.html" title="vector_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_map.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.list_tie"></a><a class="link" href="list_tie.html" title="list_tie">list_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.description"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/list_tie.html" title="list_tie"><code class="computeroutput"><span class="identifier">list_tie</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.synopsis"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">list_tie</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_LIST_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.parameters"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">list_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.expression_semantics"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">list_tie</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><T0&, T1&,... + TN&> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> of references from <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.header"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">list_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">list_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.list_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.list_tie.example"></a></span><a class="link" href="list_tie.html#fusion.container.generation.metafunctions.list_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">list_tie</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_map.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vector_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_cons.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_cons.html new file mode 100644 index 000000000..ecb116a58 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_cons.html @@ -0,0 +1,152 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_cons</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_list.html" title="make_list"> +<link rel="next" href="make_vector.html" title="make_vector"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_cons"></a><a class="link" href="make_cons.html" title="make_cons">make_cons</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.description"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_cons.html" title="make_cons"><code class="computeroutput"><span class="identifier">make_cons</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.synopsis"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Car</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Cdr</span> <span class="special">=</span> <span class="identifier">nil</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_cons</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.parameters"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Car</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The list's head type + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Cdr</span></code> + </p> + </td> +<td> + <p> + A <code class="computeroutput"><span class="identifier">cons</span></code> + </p> + </td> +<td> + <p> + The list's tail type (optional) + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.expression_semantics"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span><span class="special"><</span><span class="identifier">Car</span><span class="special">,</span> <span class="identifier">Cdr</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> with head element, <code class="computeroutput"><span class="identifier">Car</span></code>, of type converted following the + rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>, and tail, <code class="computeroutput"><span class="identifier">Cdr</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> from <code class="computeroutput"><span class="identifier">Car</span></code> + (<span class="emphasis"><em>head</em></span>) and optional <code class="computeroutput"><span class="identifier">Cdr</span></code> + (<span class="emphasis"><em>tail</em></span>). + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.header"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_cons</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_cons.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_cons.example"></a></span><a class="link" href="make_cons.html#fusion.container.generation.metafunctions.make_cons.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_cons</span><span class="special"><</span><span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_list.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_vector.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_deque.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_deque.html new file mode 100644 index 000000000..770eac730 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_deque.html @@ -0,0 +1,144 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_deque</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_vector.html" title="make_vector"> +<link rel="next" href="make_set.html" title="make_set"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_deque"></a><a class="link" href="make_deque.html" title="make_deque">make_deque</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.description"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_deque.html" title="make_deque"><code class="computeroutput"><span class="identifier">make_deque</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.synopsis"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="special">...</span><span class="identifier">Elements</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_deque</span><span class="special">;</span> +</pre> +<p> + For C++11 compilers, the variadic template interface has no upper bound. + </p> +<p> + For C++03 The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_DEQUE_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_DEQUE_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.parameters"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Elements</span></code> + </p> + </td> +<td> + <p> + Variadic template types + </p> + </td> +<td> + <p> + Template arguments to <code class="computeroutput"><span class="identifier">make_deque</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.expression_semantics"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_deque</span><span class="special"><</span><span class="identifier">Elements</span><span class="special">...>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> with elements of types + converted following the rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../deque.html" title="deque"><code class="computeroutput"><span class="identifier">deque</span></code></a> from <code class="computeroutput"><span class="identifier">Elements</span><span class="special">...</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.header"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_deque</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_deque.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_deque.example"></a></span><a class="link" href="make_deque.html#fusion.container.generation.metafunctions.make_deque.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_deque</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">(&)[</span><span class="number">7</span><span class="special">],</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_vector.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_set.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_list.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_list.html new file mode 100644 index 000000000..eb72effd8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_list.html @@ -0,0 +1,143 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_list</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="../metafunctions.html" title="MetaFunctions"> +<link rel="next" href="make_cons.html" title="make_cons"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_cons.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_list"></a><a class="link" href="make_list.html" title="make_list">make_list</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.description"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.synopsis"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_list</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_LIST_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.parameters"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Template arguments to <code class="computeroutput"><span class="identifier">make_list</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.expression_semantics"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_list</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> with elements of types + converted following the rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> from <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.header"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_list.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_list.example"></a></span><a class="link" href="make_list.html#fusion.container.generation.metafunctions.make_list.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_list</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">(&)[</span><span class="number">7</span><span class="special">],</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_cons.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html new file mode 100644 index 000000000..bda9895e0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html @@ -0,0 +1,178 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_map</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_set.html" title="make_set"> +<link rel="next" href="list_tie.html" title="list_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_map"></a><a class="link" href="make_map.html" title="make_map">make_map</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.description"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">make_map</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.synopsis"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">K0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">KN</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_map</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> before + including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_MAP_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.parameters"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> + <span class="identifier">K1</span><span class="special">,...</span> + <span class="identifier">KN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Keys associated with <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Data associated with keys <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.expression_semantics"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">resulf_of</span><span class="special">::</span><span class="identifier">make_map</span><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">,</span> <span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="make_map.html" title="make_map"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_map</span></code></a><code class="computeroutput"><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K0</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">,</span> <span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: A <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> with <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a> elements where the <code class="computeroutput"><span class="identifier">second_type</span></code> is converted following + the rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.header"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.example"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_map.h6"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_map.see_also"></a></span><a class="link" href="make_map.html#fusion.container.generation.metafunctions.make_map.see_also">See + also</a> + </h6> +<p> + <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_set.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="list_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_set.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_set.html new file mode 100644 index 000000000..de19fbbea --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_set.html @@ -0,0 +1,147 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_set</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_deque.html" title="make_deque"> +<link rel="next" href="make_map.html" title="make_map"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_set"></a><a class="link" href="make_set.html" title="make_set">make_set</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.description"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_set.html" title="make_set"><code class="computeroutput"><span class="identifier">make_set</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.synopsis"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_set</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> before + including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_SET_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.parameters"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">make_set</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.expression_semantics"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> with elements of types converted + following the rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> from <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: There may be no duplicate + key types. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.header"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_set.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_set.example"></a></span><a class="link" href="make_set.html#fusion.container.generation.metafunctions.make_set.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_set</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_deque.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_map.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_vector.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_vector.html new file mode 100644 index 000000000..2ef0ca331 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_vector.html @@ -0,0 +1,143 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_vector</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="make_cons.html" title="make_cons"> +<link rel="next" href="make_deque.html" title="make_deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_cons.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.make_vector"></a><a class="link" href="make_vector.html" title="make_vector">make_vector</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.description"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.synopsis"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">make_vector</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.parameters"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Template arguments to <code class="computeroutput"><span class="identifier">make_vector</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.expression_semantics"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> with elements of types + converted following the rules for <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> from <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.header"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.make_vector.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.make_vector.example"></a></span><a class="link" href="make_vector.html#fusion.container.generation.metafunctions.make_vector.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">(&)[</span><span class="number">7</span><span class="special">],</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="make_cons.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_deque.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/map_tie.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/map_tie.html new file mode 100644 index 000000000..0fc0c502f --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/map_tie.html @@ -0,0 +1,167 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>map_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="deque_tie.html" title="deque_tie"> +<link rel="next" href="../../conversion.html" title="Conversion"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../conversion.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.map_tie"></a><a class="link" href="map_tie.html" title="map_tie">map_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.description"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">map_tie</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.synopsis"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">K0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">KN</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">D0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">D1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">DN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">map_tie</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> before + including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_MAP_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.parameters"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> + <span class="identifier">K1</span><span class="special">,...</span> + <span class="identifier">KN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The key types for <code class="computeroutput"><span class="identifier">map_tie</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">D0</span><span class="special">,</span> + <span class="identifier">D1</span><span class="special">,...</span> + <span class="identifier">DN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The arguments types for <code class="computeroutput"><span class="identifier">map_tie</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.expression_semantics"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">map_tie</span><span class="special"><</span><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span><span class="special">,</span> <span class="identifier">D0</span><span class="special">,</span> <span class="identifier">D1</span><span class="special">,...</span> <span class="identifier">DN</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><<a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><K0, D0&>, <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><K1, + D1&>,... <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><KN, + DN&> > + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> of references from <code class="computeroutput"><span class="identifier">D0</span><span class="special">,</span> <span class="identifier">D1</span><span class="special">,...</span> <span class="identifier">DN</span></code> with keys <code class="computeroutput"><span class="identifier">K0</span><span class="special">,</span> <span class="identifier">K1</span><span class="special">,...</span> <span class="identifier">KN</span></code> + </p> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.header"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">map_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">map_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.map_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.map_tie.example"></a></span><a class="link" href="map_tie.html#fusion.container.generation.metafunctions.map_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">int_key</span><span class="special">;</span> +<span class="keyword">struct</span> <span class="identifier">double_key</span><span class="special">;</span> +<span class="special">...</span> +<span class="identifier">result_of</span><span class="special">::</span><span class="identifier">map_tie</span><span class="special"><</span><span class="identifier">int_key</span><span class="special">,</span> <span class="identifier">double_key</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../conversion.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/generation/metafunctions/vector_tie.html b/libs/fusion/doc/html/fusion/container/generation/metafunctions/vector_tie.html new file mode 100644 index 000000000..0edd1cbe5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/generation/metafunctions/vector_tie.html @@ -0,0 +1,142 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>vector_tie</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="MetaFunctions"> +<link rel="prev" href="list_tie.html" title="list_tie"> +<link rel="next" href="deque_tie.html" title="deque_tie"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.container.generation.metafunctions.vector_tie"></a><a class="link" href="vector_tie.html" title="vector_tie">vector_tie</a> +</h5></div></div></div> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h0"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.description"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h1"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.synopsis"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vector_tie</span><span class="special">;</span> +</pre> +<p> + The variadic function accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + elements, where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. You may define the preprocessor constant + <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h2"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.parameters"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> + <span class="identifier">T1</span><span class="special">,...</span> + <span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The arguments to <code class="computeroutput"><span class="identifier">vector_tie</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h3"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.expression_semantics"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">vector_tie</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><T0&, T1&,... + TN&> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Create a <a class="link" href="../../vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> of references from <code class="computeroutput"><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">,...</span> <span class="identifier">TN</span></code>. + </p> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h4"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.header"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">vector_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector_tie</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.container.generation.metafunctions.vector_tie.h5"></a> + <span class="phrase"><a name="fusion.container.generation.metafunctions.vector_tie.example"></a></span><a class="link" href="vector_tie.html#fusion.container.generation.metafunctions.vector_tie.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">vector_tie</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="list_tie.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque_tie.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/list.html b/libs/fusion/doc/html/fusion/container/list.html new file mode 100644 index 000000000..fb55de5d9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/list.html @@ -0,0 +1,289 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>list</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="cons.html" title="cons"> +<link rel="next" href="deque.html" title="deque"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.list"></a><a class="link" href="list.html" title="list">list</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.list.h0"></a> + <span class="phrase"><a name="fusion.container.list.description"></a></span><a class="link" href="list.html#fusion.container.list.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">list</span></code> is a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> of heterogenous typed data built on top of <a class="link" href="cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a>. It is more efficient than + <a class="link" href="vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + when the target sequence is constructed piecemeal (a data at a time). The + runtime cost of access to each element is peculiarly constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive Inlined Functions</a>). + </p> +<h5> +<a name="fusion.container.list.h1"></a> + <span class="phrase"><a name="fusion.container.list.header"></a></span><a class="link" href="list.html#fusion.container.list.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">/</span><span class="identifier">list_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">list_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.list.h2"></a> + <span class="phrase"><a name="fusion.container.list.synopsis"></a></span><a class="link" href="list.html#fusion.container.list.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T0</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">...</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TN</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> +<span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">list</span><span class="special">;</span> +</pre> +<p> + The variadic class interface accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> elements, + where <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. + Example: + </p> +<pre class="programlisting"><span class="identifier">list</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> +</pre> +<p> + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_LIST_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_LIST_SIZE</span> <span class="number">20</span> +</pre> +<h5> +<a name="fusion.container.list.h3"></a> + <span class="phrase"><a name="fusion.container.list.template_parameters"></a></span><a class="link" href="list.html#fusion.container.list.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span></code>...<code class="computeroutput"><span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Element types + </p> + </td> +<td> + <p> + <span class="emphasis"><em>unspecified</em></span> + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.container.list.h4"></a> + <span class="phrase"><a name="fusion.container.list.model_of"></a></span><a class="link" href="list.html#fusion.container.list.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">L</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">list</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">l</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">list</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.list.h5"></a> + <span class="phrase"><a name="fusion.container.list.expression_semantics"></a></span><a class="link" href="list.html#fusion.container.list.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">L</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a list with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">L</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a list with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">L</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a list from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">l</span> <span class="special">=</span> + <span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Assigns to a list, <code class="computeroutput"><span class="identifier">l</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">n</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span></code> is provided + for convenience and compatibility with the original <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a> + library, despite <code class="computeroutput"><span class="identifier">list</span></code> being + a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + only (<a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> is supposed to be a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> requirement). The runtime complexity of <a class="link" href="../sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> is constant (see <a class="link" href="../notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a>). + </p> +</div> +<h5> +<a name="fusion.container.list.h6"></a> + <span class="phrase"><a name="fusion.container.list.example"></a></span><a class="link" href="list.html#fusion.container.list.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">list</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">l</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">l</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="cons.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deque.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/map.html b/libs/fusion/doc/html/fusion/container/map.html new file mode 100644 index 000000000..da1d85595 --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/map.html @@ -0,0 +1,277 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>map</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="set.html" title="set"> +<link rel="next" href="generation.html" title="Generation"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="set.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.map"></a><a class="link" href="map.html" title="map">map</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.map.h0"></a> + <span class="phrase"><a name="fusion.container.map.description"></a></span><a class="link" href="map.html#fusion.container.map.description">Description</a> + </h5> +<p> + map is an <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> of heteregenous typed data elements. Each element is a key/data + pair (see <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a>) + where the key has no data (type only). Type identity is used to impose an + equivalence relation on keys. A map may contain at most one element for each + key. Membership testing and element key lookup has constant runtime complexity + (see <a class="link" href="../notes.html#fusion.notes.overloaded_functions">Overloaded Functions</a>). + </p> +<h5> +<a name="fusion.container.map.h1"></a> + <span class="phrase"><a name="fusion.container.map.header"></a></span><a class="link" href="map.html#fusion.container.map.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">map</span><span class="special">/</span><span class="identifier">map_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">map_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.map.h2"></a> + <span class="phrase"><a name="fusion.container.map.synopsis"></a></span><a class="link" href="map.html#fusion.container.map.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T0</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">...</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TN</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> +<span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">map</span><span class="special">;</span> +</pre> +<p> + The variadic class interface accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> elements, + where <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. + Example: + </p> +<pre class="programlisting"><span class="identifier">map</span><span class="special"><</span><a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="special">></span> +</pre> +<p> + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_MAP_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_MAP_SIZE</span> <span class="number">20</span> +</pre> +<h5> +<a name="fusion.container.map.h3"></a> + <span class="phrase"><a name="fusion.container.map.template_parameters"></a></span><a class="link" href="map.html#fusion.container.map.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span></code>...<code class="computeroutput"><span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Element types + </p> + </td> +<td> + <p> + <span class="emphasis"><em>unspecified</em></span> + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.container.map.h4"></a> + <span class="phrase"><a name="fusion.container.map.model_of"></a></span><a class="link" href="map.html#fusion.container.map.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">M</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">map</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">m</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">map</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous key/value pairs (see <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a>) + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.map.h5"></a> + <span class="phrase"><a name="fusion.container.map.expression_semantics"></a></span><a class="link" href="map.html#fusion.container.map.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a map with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a map with element pairs <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a map from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">m</span> <span class="special">=</span> + <span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Assigns to a map, <code class="computeroutput"><span class="identifier">m</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.container.map.h6"></a> + <span class="phrase"><a name="fusion.container.map.example"></a></span><a class="link" href="map.html#fusion.container.map.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">map</span><span class="special"><</span> + <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> + <span class="special">,</span> <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="special">></span> +<span class="identifier">map_type</span><span class="special">;</span> + +<span class="identifier">map_type</span> <span class="identifier">m</span><span class="special">(</span> + <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">make_pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="char">'X'</span><span class="special">)</span> + <span class="special">,</span> <a class="link" href="../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">make_pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="string">"Men"</span><span class="special">));</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="identifier">m</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">>(</span><span class="identifier">m</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="set.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/set.html b/libs/fusion/doc/html/fusion/container/set.html new file mode 100644 index 000000000..ec9c3063b --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/set.html @@ -0,0 +1,270 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>set</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="back_extended_deque.html" title="back_extended_deque"> +<link rel="next" href="map.html" title="map"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back_extended_deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.set"></a><a class="link" href="set.html" title="set">set</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.set.h0"></a> + <span class="phrase"><a name="fusion.container.set.description"></a></span><a class="link" href="set.html#fusion.container.set.description">Description</a> + </h5> +<p> + set is an <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> of heteregenous typed data elements. Type identity is used + to impose an equivalence relation on keys. The element's type is its key. + A set may contain at most one element for each key. Membership testing and + element key lookup has constant runtime complexity (see <a class="link" href="../notes.html#fusion.notes.overloaded_functions">Overloaded + Functions</a>). + </p> +<h5> +<a name="fusion.container.set.h1"></a> + <span class="phrase"><a name="fusion.container.set.header"></a></span><a class="link" href="set.html#fusion.container.set.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">set</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">set</span><span class="special">/</span><span class="identifier">set_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">set_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.set.h2"></a> + <span class="phrase"><a name="fusion.container.set.synopsis"></a></span><a class="link" href="set.html#fusion.container.set.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T0</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">...</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TN</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> +<span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">set</span><span class="special">;</span> +</pre> +<p> + The variadic class interface accepts <code class="computeroutput"><span class="number">0</span></code> + to <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> elements, + where <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. + Example: + </p> +<pre class="programlisting"><span class="identifier">set</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> +</pre> +<p> + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_SET_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_SET_SIZE</span> <span class="number">20</span> +</pre> +<h5> +<a name="fusion.container.set.h3"></a> + <span class="phrase"><a name="fusion.container.set.template_parameters"></a></span><a class="link" href="set.html#fusion.container.set.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span></code>...<code class="computeroutput"><span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Element types + </p> + </td> +<td> + <p> + <span class="emphasis"><em>unspecified</em></span> + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.container.set.h4"></a> + <span class="phrase"><a name="fusion.container.set.model_of"></a></span><a class="link" href="set.html#fusion.container.set.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">set</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">set</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.set.h5"></a> + <span class="phrase"><a name="fusion.container.set.expression_semantics"></a></span><a class="link" href="set.html#fusion.container.set.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> and <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">S</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a set with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a set with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a set from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span> <span class="special">=</span> + <span class="identifier">fs</span></code> + </p> + </td> +<td> + <p> + Assigns to a set, <code class="computeroutput"><span class="identifier">s</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> <code class="computeroutput"><span class="identifier">fs</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.container.set.h6"></a> + <span class="phrase"><a name="fusion.container.set.example"></a></span><a class="link" href="set.html#fusion.container.set.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">set</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">S</span><span class="special">;</span> +<span class="identifier">S</span> <span class="identifier">s</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/metafunctions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>::</span><span class="identifier">value</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back_extended_deque.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="map.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/container/vector.html b/libs/fusion/doc/html/fusion/container/vector.html new file mode 100644 index 000000000..04c80634a --- /dev/null +++ b/libs/fusion/doc/html/fusion/container/vector.html @@ -0,0 +1,301 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>vector</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../container.html" title="Container"> +<link rel="prev" href="../container.html" title="Container"> +<link rel="next" href="cons.html" title="cons"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../container.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.container.vector"></a><a class="link" href="vector.html" title="vector">vector</a> +</h3></div></div></div> +<h5> +<a name="fusion.container.vector.h0"></a> + <span class="phrase"><a name="fusion.container.vector.description"></a></span><a class="link" href="vector.html#fusion.container.vector.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">vector</span></code> is a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> of heterogenous typed data structured as a simple + <code class="computeroutput"><span class="keyword">struct</span></code> where each element is + held as a member variable. <code class="computeroutput"><span class="identifier">vector</span></code> + is the simplest of the Fusion sequence container (a vector with N elements + is just a struct with N members), and in many cases the most efficient. + </p> +<h5> +<a name="fusion.container.vector.h1"></a> + <span class="phrase"><a name="fusion.container.vector.header"></a></span><a class="link" href="vector.html#fusion.container.vector.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> + +<span class="comment">// numbered forms</span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector10</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector10</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector20</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector20</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector30</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector30</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector40</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector40</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">vector</span><span class="special">/</span><span class="identifier">vector50</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">vector50</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.container.vector.h2"></a> + <span class="phrase"><a name="fusion.container.vector.synopsis"></a></span><a class="link" href="vector.html#fusion.container.vector.synopsis">Synopsis</a> + </h5> +<p> + <span class="bold"><strong>Numbered forms</strong></span> + </p> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">vector0</span><span class="special">;</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vector1</span><span class="special">;</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vector2</span><span class="special">;</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vector3</span><span class="special">;</span> + +<span class="special">...</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vectorN</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Variadic form</strong></span> + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T0</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> + <span class="special">...</span> + <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TN</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span> +<span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">vector</span><span class="special">;</span> +</pre> +<p> + The numbered form accepts the exact number of elements. Example: + </p> +<pre class="programlisting"><span class="identifier">vector3</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> +</pre> +<p> + The variadic form accepts <code class="computeroutput"><span class="number">0</span></code> to + <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> elements, + where <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + is a user definable predefined maximum that defaults to <code class="computeroutput"><span class="number">10</span></code>. + Example: + </p> +<pre class="programlisting"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> +</pre> +<p> + You may define the preprocessor constant <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code> + before including any Fusion header to change the default. Example: + </p> +<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">FUSION_MAX_VECTOR_SIZE</span> <span class="number">20</span> +</pre> +<h5> +<a name="fusion.container.vector.h3"></a> + <span class="phrase"><a name="fusion.container.vector.template_parameters"></a></span><a class="link" href="vector.html#fusion.container.vector.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T0</span></code>...<code class="computeroutput"><span class="identifier">TN</span></code> + </p> + </td> +<td> + <p> + Element types + </p> + </td> +<td> + <p> + <span class="emphasis"><em>unspecified</em></span> + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.container.vector.h4"></a> + <span class="phrase"><a name="fusion.container.vector.model_of"></a></span><a class="link" href="vector.html#fusion.container.vector.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">v</span></code></span></dt> +<dd><p> + Instance of <code class="computeroutput"><span class="identifier">vector</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">V</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">vector</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code></span></dt> +<dd><p> + Heterogeneous values + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.container.vector.h5"></a> + <span class="phrase"><a name="fusion.container.vector.expression_semantics"></a></span><a class="link" href="vector.html#fusion.container.vector.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">V</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a vector with default constructed elements. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">V</span><span class="special">(</span><span class="identifier">e0</span><span class="special">,</span> + <span class="identifier">e1</span><span class="special">,...</span> + <span class="identifier">en</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a vector with elements <code class="computeroutput"><span class="identifier">e0</span></code>...<code class="computeroutput"><span class="identifier">en</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">V</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a vector from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">v</span> <span class="special">=</span> + <span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Assigns to a vector, <code class="computeroutput"><span class="identifier">v</span></code>, + from a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.container.vector.h6"></a> + <span class="phrase"><a name="fusion.container.vector.example"></a></span><a class="link" href="vector.html#fusion.container.vector.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">12</span><span class="special">,</span> <span class="number">5.5f</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../container.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../container.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="cons.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/extension.html b/libs/fusion/doc/html/fusion/extension.html new file mode 100644 index 000000000..8c0cb4d73 --- /dev/null +++ b/libs/fusion/doc/html/fusion/extension.html @@ -0,0 +1,49 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Extension</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="tuple/pairs.html" title="Pairs"> +<link rel="next" href="extension/ext_full.html" title="The Full Extension Mechanism"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple/pairs.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="extension/ext_full.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.extension"></a><a class="link" href="extension.html" title="Extension">Extension</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="extension/ext_full.html">The Full Extension Mechanism</a></span></dt> +<dt><span class="section"><a href="extension/sequence_facade.html">Sequence Facade</a></span></dt> +<dt><span class="section"><a href="extension/iterator_facade.html">Iterator Facade</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple/pairs.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="extension/ext_full.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/extension/ext_full.html b/libs/fusion/doc/html/fusion/extension/ext_full.html new file mode 100644 index 000000000..d25ca4795 --- /dev/null +++ b/libs/fusion/doc/html/fusion/extension/ext_full.html @@ -0,0 +1,527 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>The Full Extension Mechanism</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../extension.html" title="Extension"> +<link rel="prev" href="../extension.html" title="Extension"> +<link rel="next" href="sequence_facade.html" title="Sequence Facade"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../extension.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sequence_facade.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.extension.ext_full"></a><a class="link" href="ext_full.html" title="The Full Extension Mechanism">The Full Extension Mechanism</a> +</h3></div></div></div> +<p> + The Fusion library is designed to be extensible, new sequences types can + easily be added. In fact, the library support for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>, + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> and <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences is entirely provided using the extension mechanism. + </p> +<p> + The process for adding a new sequence type to Fusion is: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + Enable the <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag + dispatching</em></span></a> mechanism used by Fusion for your sequence + type + </li> +<li class="listitem"> + Design an iterator type for the sequence + </li> +<li class="listitem"> + Provide specialized behaviour for the intrinsic operations of the new + Fusion sequence + </li> +</ol></div> +<h5> +<a name="fusion.extension.ext_full.h0"></a> + <span class="phrase"><a name="fusion.extension.ext_full.our_example"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.our_example">Our + example</a> + </h5> +<p> + In order to illustrate enabling a new sequence type for use with Fusion, + we are going to use the type: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">example</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">example_struct</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">age</span><span class="special">;</span> + <span class="identifier">example_struct</span><span class="special">(</span> + <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">n</span><span class="special">,</span> + <span class="keyword">int</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">:</span> <span class="identifier">name</span><span class="special">(</span><span class="identifier">n</span><span class="special">),</span> <span class="identifier">age</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> + <span class="special">{}</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<p> + We are going to pretend that this type has been provided by a 3rd party library, + and therefore cannot be modified. We shall work through all the necessary + steps to enable <code class="computeroutput"><span class="identifier">example_struct</span></code> + to serve as an <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> as described in the <a class="link" href="../quick_start.html" title="Quick Start">Quick + Start</a> guide. + </p> +<h5> +<a name="fusion.extension.ext_full.h1"></a> + <span class="phrase"><a name="fusion.extension.ext_full.enabling_tag_dispatching"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_tag_dispatching">Enabling + Tag Dispatching</a> + </h5> +<p> + The Fusion extensibility mechanism uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag + dispatching</em></span></a> to call the correct code for a given sequence + type. In order to exploit the tag dispatching mechanism we must first declare + a new tag type for the mechanism to use. For example: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">example</span> <span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">example_sequence_tag</span><span class="special">;</span> <span class="comment">// Only definition needed</span> +<span class="special">}</span> +</pre> +<p> + Next we need to enable the <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code> + metafunction to return our newly chosen tag type for operations involving + our sequence. This is done by specializing <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code> + for our sequence type. + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">tag_of_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">tag_of_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> + +<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">traits</span> <span class="special">{</span> + <span class="keyword">template</span><span class="special"><></span> + <span class="keyword">struct</span> <span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">example_struct</span><span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">example</span><span class="special">::</span><span class="identifier">example_sequence_tag</span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}}}</span> +</pre> +<p> + <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code> also has a second template argument, + that can be used in conjuction with <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span></code> + to provide tag support for groups of related types. This feature is not necessary + for our sequence, but for an example see the code in: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">array</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.extension.ext_full.h2"></a> + <span class="phrase"><a name="fusion.extension.ext_full.designing_a_suitable_iterator"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.designing_a_suitable_iterator">Designing + a suitable iterator</a> + </h5> +<p> + We need an iterator to describe positions, and provide access to the data + within our sequence. As it is straightforward to do, we are going to provide + a random access iterator in our example. + </p> +<p> + We will use a simple design, in which the 2 members of <code class="computeroutput"><span class="identifier">example_struct</span></code> + are given numbered indices, 0 for <code class="computeroutput"><span class="identifier">name</span></code> + and 1 for <code class="computeroutput"><span class="identifier">age</span></code> respectively. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">Pos</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">example_struct_iterator</span> + <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">iterator_base</span><span class="special"><</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="identifier">Pos</span><span class="special">></span> <span class="special">></span> +<span class="special">{</span> + <span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">(</span><span class="identifier">Pos</span> <span class="special">>=</span><span class="number">0</span> <span class="special">&&</span> <span class="identifier">Pos</span> <span class="special"><</span> <span class="number">3</span><span class="special">);</span> + <span class="keyword">typedef</span> <span class="identifier">Struct</span> <span class="identifier">struct_type</span><span class="special">;</span> + <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="identifier">Pos</span><span class="special">></span> <span class="identifier">index</span><span class="special">;</span> + <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">random_access_traversal_tag</span> <span class="identifier">category</span><span class="special">;</span> + + <span class="identifier">example_struct_iterator</span><span class="special">(</span><span class="identifier">Struct</span><span class="special">&</span> <span class="identifier">str</span><span class="special">)</span> + <span class="special">:</span> <span class="identifier">struct_</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span> <span class="special">{}</span> + + <span class="identifier">Struct</span><span class="special">&</span> <span class="identifier">struct_</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<p> + A quick summary of the details of our iterator: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + The iterator is parameterized by the type it is iterating over, and the + index of the current element. + </li> +<li class="listitem"> + The typedefs <code class="computeroutput"><span class="identifier">struct_type</span></code> + and <code class="computeroutput"><span class="identifier">index</span></code> provide convenient + access to information we will need later in the implementation. + </li> +<li class="listitem"> + The typedef <code class="computeroutput"><span class="identifier">category</span></code> + allows the <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><a class="link" href="../support/category_of.html" title="category_of"><code class="computeroutput"><span class="identifier">category_of</span></code></a></code> + metafunction to establish the traversal category of the iterator. + </li> +<li class="listitem"> + The constructor stores a reference to the <code class="computeroutput"><span class="identifier">example_struct</span></code> + being iterated over. + </li> +</ol></div> +<p> + We also need to enable <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag + dispatching</em></span></a> for our iterator type, with another specialization + of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code>. + </p> +<p> + In isolation, the iterator implementation is pretty dry. Things should become + clearer as we add features to our implementation. + </p> +<h5> +<a name="fusion.extension.ext_full.h3"></a> + <span class="phrase"><a name="fusion.extension.ext_full.a_first_couple_of_instructive_features"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.a_first_couple_of_instructive_features">A + first couple of instructive features</a> + </h5> +<p> + To start with, we will get the <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> metafunction working. To + do this, we provide a specialization of the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">extension</span><span class="special">::</span><span class="identifier">value_of_impl</span></code> + template for our iterator's tag type. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">value_of_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">0</span><span class="special">></span> <span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">1</span><span class="special">></span> <span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">};</span> +</pre> +<p> + The implementation itself is pretty simple, it just uses 2 partial specializations + to provide the type of the 2 different members of <code class="computeroutput"><span class="identifier">example_struct</span></code>, + based on the index of the iterator. + </p> +<p> + To understand how <code class="computeroutput"><span class="identifier">value_of_impl</span></code> + is used by the library we will look at the implementation of <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a>: + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_of</span> + <span class="special">:</span> <span class="identifier">extension</span><span class="special">::</span><span class="identifier">value_of_impl</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span> + <span class="keyword">template</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span> +<span class="special">{};</span> +</pre> +<p> + So <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> + uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag dispatching</em></span></a> + to select an <a href="http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html" target="_top">MPL + Metafunction Class</a> to provide its functionality. You will notice + this pattern throughout the implementation of Fusion. + </p> +<p> + Ok, lets enable dereferencing of our iterator. In this case we must provide + a suitable specialization of <code class="computeroutput"><span class="identifier">deref_impl</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">deref_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">0</span><span class="special">></span> <span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">if_</span><span class="special"><</span> + <span class="identifier">is_const</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">>,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">0</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">it</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">it</span><span class="special">.</span><span class="identifier">struct_</span><span class="special">.</span><span class="identifier">name</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">1</span><span class="special">></span> <span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">if_</span><span class="special"><</span> + <span class="identifier">is_const</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">>,</span> <span class="keyword">int</span> <span class="keyword">const</span><span class="special">&,</span> <span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Struct</span><span class="special">,</span> <span class="number">1</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">it</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">it</span><span class="special">.</span><span class="identifier">struct_</span><span class="special">.</span><span class="identifier">age</span><span class="special">;</span> + <span class="special">}</span> + <span class="special">};</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<p> + The use of <code class="computeroutput"><span class="identifier">deref_impl</span></code> is + very similar to that of <code class="computeroutput"><span class="identifier">value_of_impl</span></code>, + but it also provides some runtime functionality this time via the <code class="computeroutput"><span class="identifier">call</span></code> static member function. To see how + <code class="computeroutput"><span class="identifier">deref_impl</span></code> is used, lets + have a look at the implementation of <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> + <span class="keyword">struct</span> <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> + <span class="special">:</span> <span class="identifier">extension</span><span class="special">::</span><span class="identifier">deref_impl</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span> + <span class="keyword">template</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span> + <span class="special">{};</span> +<span class="special">}</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span> +<a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">Iterator</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">)</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span> <span class="identifier">deref_meta</span><span class="special">;</span> + <span class="keyword">return</span> <span class="identifier">deref_meta</span><span class="special">::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span> +<span class="special">}</span> +</pre> +<p> + So again <a class="link" href="../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a> uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag + dispatching</em></span></a> in exactly the same way as the <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> implementation. The runtime + functionality used by <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> is provided by the <code class="computeroutput"><span class="identifier">call</span></code> static function of the selected <a href="http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html" target="_top">MPL + Metafunction Class</a>. + </p> +<p> + The actual implementation of <code class="computeroutput"><span class="identifier">deref_impl</span></code> + is slightly more complex than that of <code class="computeroutput"><span class="identifier">value_of_impl</span></code>. + We also need to implement the <code class="computeroutput"><span class="identifier">call</span></code> + function, which returns a reference to the appropriate member of the underlying + sequence. We also require a little bit of metaprogramming to return <code class="computeroutput"><span class="keyword">const</span></code> references if the underlying sequence + is const. + </p> +<div class="note"><table border="0" summary="Note"> +<tr> +<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td> +<th align="left">Note</th> +</tr> +<tr><td align="left" valign="top"><p> + Although there is a fair amount of left to do to produce a fully fledged + Fusion sequence, <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> and <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> illustrate all the signficant + concepts required. The remainder of the process is very repetitive, simply + requiring implementation of a suitable <code class="computeroutput"><span class="identifier">xxxx_impl</span></code> + for each feature <code class="computeroutput"><span class="identifier">xxxx</span></code>. + </p></td></tr> +</table></div> +<h5> +<a name="fusion.extension.ext_full.h4"></a> + <span class="phrase"><a name="fusion.extension.ext_full.implementing_the_remaining_iterator_functionality"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_remaining_iterator_functionality">Implementing + the remaining iterator functionality</a> + </h5> +<p> + Ok, now we have seen the way <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> and <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> work, everything else will + work in pretty much the same way. Lets start with forward iteration, by providing + a <code class="computeroutput"><span class="identifier">next_impl</span></code>: + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">next_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">::</span><span class="identifier">struct_type</span> <span class="identifier">struct_type</span><span class="special">;</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">::</span><span class="identifier">index</span> <span class="identifier">index</span><span class="special">;</span> + <span class="keyword">typedef</span> <span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">struct_type</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span> <span class="special">+</span> <span class="number">1</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">i</span><span class="special">.</span><span class="identifier">struct_</span><span class="special">);</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">};</span> +</pre> +<p> + This should be very familiar from our <code class="computeroutput"><span class="identifier">deref_impl</span></code> + implementation, we will be using this approach again and again now. Our design + is simply to increment the <code class="computeroutput"><span class="identifier">index</span></code> + counter to move on to the next element. The various other iterator manipulations + we need to perform will all just involve simple calculations with the <code class="computeroutput"><span class="identifier">index</span></code> variables. + </p> +<p> + We also need to provide a suitable <code class="computeroutput"><span class="identifier">equal_to_impl</span></code> + so that iterators can be correctly compared. A <a class="link" href="../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> will also need an implementation of <code class="computeroutput"><span class="identifier">prior_impl</span></code>. + For a <a class="link" href="../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> <code class="computeroutput"><span class="identifier">distance_impl</span></code> + and <code class="computeroutput"><span class="identifier">advance_impl</span></code> also need + to be provided in order to satisfy the necessary complexity guarantees. As + our iterator is a <a class="link" href="../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> we will have to implement all of these functions. + </p> +<p> + Full implementations of <code class="computeroutput"><span class="identifier">prior_impl</span></code>, + <code class="computeroutput"><span class="identifier">advance_impl</span></code>, <code class="computeroutput"><span class="identifier">distance_impl</span></code> and <code class="computeroutput"><span class="identifier">equal_to_impl</span></code> + are provided in the example code. + </p> +<h5> +<a name="fusion.extension.ext_full.h5"></a> + <span class="phrase"><a name="fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence">Implementing + the intrinsic functions of the sequence</a> + </h5> +<p> + In order that Fusion can correctly identify our sequence as a Fusion sequence, + we need to enable <code class="computeroutput"><span class="identifier">is_sequence</span></code> + for our sequence type. As usual we just create an <code class="computeroutput"><span class="identifier">impl</span></code> + type specialized for our sequence tag: + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">is_sequence_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_sequence_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span> +<span class="special">};</span> +</pre> +<p> + We've some similar formalities to complete, providing <code class="computeroutput"><span class="identifier">category_of_impl</span></code> + so Fusion can correctly identify our sequence type, and <code class="computeroutput"><span class="identifier">is_view_impl</span></code> + so Fusion can correctly identify our sequence as not being a <a class="link" href="../view.html" title="View">View</a> + type. Implementations are provide in the example code. + </p> +<p> + Now we've completed some formalities, on to more interesting features. Lets + get <a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a> working so that we can get + an iterator to start accessing the data in our sequence. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">begin_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_sequence_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="number">0</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">type</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> + <span class="special">}</span> + <span class="special">};</span> +<span class="special">};</span> +</pre> +<p> + The implementation uses the same ideas we have applied throughout, in this + case we are just creating one of the iterators we developed earlier, pointing + to the first element in the sequence. The implementation of <a class="link" href="../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a> is very similar, and is provided + in the example code. + </p> +<p> + For our <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> we will also need to implement <code class="computeroutput"><span class="identifier">size_impl</span></code>, + <code class="computeroutput"><span class="identifier">value_at_impl</span></code> and <code class="computeroutput"><span class="identifier">at_impl</span></code>. + </p> +<h5> +<a name="fusion.extension.ext_full.h6"></a> + <span class="phrase"><a name="fusion.extension.ext_full.enabling_our_type_as_an_associative_sequence"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_our_type_as_an_associative_sequence">Enabling + our type as an associative sequence</a> + </h5> +<p> + In order for <code class="computeroutput"><span class="identifier">example_struct</span></code> + to serve as an associative forward sequence, we need to adapt the traversal + category of our sequence and our iterator accordingly and enable 3 intrinsic + sequence lookup features, <a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>, __value_at_key__ and <a class="link" href="../sequence/intrinsic/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>. + We also need to enable 3 iterator lookup features, <a class="link" href="../iterator/metafunctions/key_of.html" title="key_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">key_of</span></code></a>, <a class="link" href="../iterator/metafunctions/value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a> and <a class="link" href="../iterator/functions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a>. + </p> +<p> + To implement <code class="computeroutput"><span class="identifier">at_key_impl</span></code> + we need to associate the <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span></code> + and <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></code> types described in the <a class="link" href="../quick_start.html" title="Quick Start">Quick + Start</a> guide with the appropriate members of <code class="computeroutput"><span class="identifier">example_struct</span></code>. + Our implementation is as follows: + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span> +<span class="keyword">struct</span> <span class="identifier">at_key_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_sequence_tag</span><span class="special">></span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span><span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">if_</span><span class="special"><</span> + <span class="identifier">is_const</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>,</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&,</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">seq</span><span class="special">.</span><span class="identifier">name</span><span class="special">;</span> + <span class="special">};</span> + <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span><span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">if_</span><span class="special"><</span> + <span class="identifier">is_const</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>,</span> + <span class="keyword">int</span> <span class="keyword">const</span><span class="special">&,</span> + <span class="keyword">int</span><span class="special">&>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> + + <span class="keyword">static</span> <span class="identifier">type</span> + <span class="identifier">call</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">seq</span><span class="special">.</span><span class="identifier">age</span><span class="special">;</span> + <span class="special">};</span> + <span class="special">};</span> +<span class="special">};</span> +</pre> +<p> + Its all very similar to the implementations we've seen previously, such as + <code class="computeroutput"><span class="identifier">deref_impl</span></code> and <code class="computeroutput"><span class="identifier">value_of_impl</span></code>. Instead of identifying the + members by index or position, we are now selecting them using the types + <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span></code> and <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></code>. + The implementations of the other functions are equally straightforward, and + are provided in the example code. + </p> +<h5> +<a name="fusion.extension.ext_full.h7"></a> + <span class="phrase"><a name="fusion.extension.ext_full.summary"></a></span><a class="link" href="ext_full.html#fusion.extension.ext_full.summary">Summary</a> + </h5> +<p> + We've now worked through the entire process for adding a new random access + sequence and we've also enabled our type to serve as an associative sequence. + The implementation was slightly longwinded, but followed a simple repeating + pattern. + </p> +<p> + The support for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>, <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences, and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> all use the same approach, and provide + additional examples of the approach for a variety of types. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../extension.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sequence_facade.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/extension/iterator_facade.html b/libs/fusion/doc/html/fusion/extension/iterator_facade.html new file mode 100644 index 000000000..0fc73c8c5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/extension/iterator_facade.html @@ -0,0 +1,474 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Iterator Facade</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../extension.html" title="Extension"> +<link rel="prev" href="sequence_facade.html" title="Sequence Facade"> +<link rel="next" href="../functional.html" title="Functional"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="sequence_facade.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../functional.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.extension.iterator_facade"></a><a class="link" href="iterator_facade.html" title="Iterator Facade">Iterator Facade</a> +</h3></div></div></div> +<h5> +<a name="fusion.extension.iterator_facade.h0"></a> + <span class="phrase"><a name="fusion.extension.iterator_facade.description"></a></span><a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.description">Description</a> + </h5> +<p> + The <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a> + template provides an intrusive mechanism for producing a conforming Fusion + iterator. + </p> +<h5> +<a name="fusion.extension.iterator_facade.h1"></a> + <span class="phrase"><a name="fusion.extension.iterator_facade.synopsis"></a></span><a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TravesalTag</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">iterator_facade</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.extension.iterator_facade.h2"></a> + <span class="phrase"><a name="fusion.extension.iterator_facade.usage"></a></span><a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.usage">Usage</a> + </h5> +<p> + The user of iterator_facade derives his iterator type from a specialization + of iterator_facade and passes the derived iterator type as the first template + parameter. The second template parameter should be the traversal category + of the iterator being implemented. + </p> +<p> + The user must the implement the key expressions required by their iterator + type. + </p> +<div class="table"> +<a name="fusion.extension.iterator_facade.t0"></a><p class="title"><b>Table 1.104. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Name + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span></code>, <code class="computeroutput"><span class="identifier">It</span></code>, <code class="computeroutput"><span class="identifier">It1</span></code>, + <code class="computeroutput"><span class="identifier">It2</span></code> + </p> + </td> +<td> + <p> + A type derived from <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><div class="table"> +<a name="fusion.extension.iterator_facade.t1"></a><p class="title"><b>Table 1.105. Key Expressions</b></p> +<div class="table-contents"><table class="table" summary="Key Expressions"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Result + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_of</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The element stored at iterator position <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type returned when dereferencing an iterator of type <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Dereferences iterator <code class="computeroutput"><span class="identifier">it</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of the next element from <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The next iterator after <code class="computeroutput"><span class="identifier">it</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of the next element from <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The next iterator after <code class="computeroutput"><span class="identifier">it</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of an iterator advanced <code class="computeroutput"><span class="identifier">N</span></code> + elements from <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + Implemented in terms of <code class="computeroutput"><span class="identifier">next</span></code> + and <code class="computeroutput"><span class="identifier">prior</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + An iterator advanced <code class="computeroutput"><span class="identifier">N</span></code> + elements from <code class="computeroutput"><span class="identifier">it</span></code> + </p> + </td> +<td> + <p> + Implemented in terms of <code class="computeroutput"><span class="identifier">next</span></code> + and <code class="computeroutput"><span class="identifier">prior</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The distance between iterators of type <code class="computeroutput"><span class="identifier">It1</span></code> + and <code class="computeroutput"><span class="identifier">It2</span></code> as an + <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The distance between iterator <code class="computeroutput"><span class="identifier">it1</span></code> + and <code class="computeroutput"><span class="identifier">it2</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Returns <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if <code class="computeroutput"><span class="identifier">It1</span></code> + is equal to <code class="computeroutput"><span class="identifier">It2</span></code>, + <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> otherwise. + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> + <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Returns a type convertible to <code class="computeroutput"><span class="keyword">bool</span></code> + that evaluates to <code class="computeroutput"><span class="keyword">true</span></code> + if <code class="computeroutput"><span class="identifier">It1</span></code> is equal + to <code class="computeroutput"><span class="identifier">It2</span></code>, <code class="computeroutput"><span class="keyword">false</span></code> otherwise. + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> + <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">()</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">key_of</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The key type associated with the element from <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_of_data</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of the data property associated with the element from + <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref_data</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type that will be returned by dereferencing the data property + of the element from <code class="computeroutput"><span class="identifier">It</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref_data</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Deferences the data property associated with the element referenced + by <code class="computeroutput"><span class="identifier">it</span></code> + </p> + </td> +<td> + <p> + None + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h5> +<a name="fusion.extension.iterator_facade.h3"></a> + <span class="phrase"><a name="fusion.extension.iterator_facade.header"></a></span><a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">iterator_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">iterator_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.extension.iterator_facade.h4"></a> + <span class="phrase"><a name="fusion.extension.iterator_facade.example"></a></span><a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.example">Example</a> + </h5> +<p> + A full working example using <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a> is provided in triple.cpp + in the extension examples. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="sequence_facade.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../functional.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/extension/sequence_facade.html b/libs/fusion/doc/html/fusion/extension/sequence_facade.html new file mode 100644 index 000000000..0f5ef0e3c --- /dev/null +++ b/libs/fusion/doc/html/fusion/extension/sequence_facade.html @@ -0,0 +1,304 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Sequence Facade</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../extension.html" title="Extension"> +<link rel="prev" href="ext_full.html" title="The Full Extension Mechanism"> +<link rel="next" href="iterator_facade.html" title="Iterator Facade"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="ext_full.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_facade.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.extension.sequence_facade"></a><a class="link" href="sequence_facade.html" title="Sequence Facade">Sequence Facade</a> +</h3></div></div></div> +<h5> +<a name="fusion.extension.sequence_facade.h0"></a> + <span class="phrase"><a name="fusion.extension.sequence_facade.description"></a></span><a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.description">Description</a> + </h5> +<p> + The <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> + template provides an intrusive mechanism for producing a conforming Fusion + sequence. + </p> +<h5> +<a name="fusion.extension.sequence_facade.h1"></a> + <span class="phrase"><a name="fusion.extension.sequence_facade.synopsis"></a></span><a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TravesalTag</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IsView</span> <span class="special">=</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">sequence_facade</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.extension.sequence_facade.h2"></a> + <span class="phrase"><a name="fusion.extension.sequence_facade.usage"></a></span><a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.usage">Usage</a> + </h5> +<p> + The user of <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> derives his sequence + type from a specialization of <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> and passes the derived + sequence type as the first template parameter. The second template parameter + should be the traversal category of the sequence being implemented. The 3rd + parameter should be set to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if the sequence is a view. + </p> +<p> + The user must the implement the key expressions required by their sequence + type. + </p> +<div class="table"> +<a name="fusion.extension.sequence_facade.t0"></a><p class="title"><b>Table 1.102. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Name + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span></code>, <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A type derived from <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><div class="table"> +<a name="fusion.extension.sequence_facade.t1"></a><p class="title"><b>Table 1.103. Key Expressions</b></p> +<div class="table-contents"><table class="table" summary="Key Expressions"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Result + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of an iterator to the beginning of a sequence of type + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + An iterator to the beginning of sequence <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of an iterator to the end of a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + An iterator to the end of sequence <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The size of a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code> + as an <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The size of sequence <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">empty</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Returns <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if <code class="computeroutput"><span class="identifier">Seq</span></code> + has zero elements, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> + otherwise. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">empty</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span></code> + </p> + </td> +<td> + <p> + Returns a type convertible to <code class="computeroutput"><span class="keyword">bool</span></code> + that evaluates to true if the sequence is empty, else, evaluates + to false. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of element <code class="computeroutput"><span class="identifier">N</span></code> + in a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Element <code class="computeroutput"><span class="identifier">N</span></code> in sequence + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_at</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + The type of the <code class="computeroutput"><span class="identifier">N</span></code>th + element in a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h5> +<a name="fusion.extension.sequence_facade.h3"></a> + <span class="phrase"><a name="fusion.extension.sequence_facade.include"></a></span><a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.include">Include</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">sequence_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">sequence_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.extension.sequence_facade.h4"></a> + <span class="phrase"><a name="fusion.extension.sequence_facade.example"></a></span><a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.example">Example</a> + </h5> +<p> + A full working example using <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> is provided in triple.cpp + in the extension examples. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="ext_full.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_facade.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional.html b/libs/fusion/doc/html/fusion/functional.html new file mode 100644 index 000000000..611bded28 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional.html @@ -0,0 +1,171 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functional</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="extension/iterator_facade.html" title="Iterator Facade"> +<link rel="next" href="functional/concepts.html" title="Concepts"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="extension/iterator_facade.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functional/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.functional"></a><a class="link" href="functional.html" title="Functional">Functional</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functional/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="functional/concepts/callable.html">Callable Object</a></span></dt> +<dt><span class="section"><a href="functional/concepts/reg_callable.html">Regular Callable + Object</a></span></dt> +<dt><span class="section"><a href="functional/concepts/def_callable.html">Deferred Callable + Object</a></span></dt> +<dt><span class="section"><a href="functional/concepts/poly.html">Polymorphic Function + Object</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="functional/invocation.html">Invocation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="functional/invocation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="functional/invocation/metafunctions.html">Metafunctions</a></span></dt> +<dt><span class="section"><a href="functional/invocation/limits.html">Limits</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="functional/adapters.html">Adapters</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="functional/adapters/fused.html">fused</a></span></dt> +<dt><span class="section"><a href="functional/adapters/fused_procedure.html">fused_procedure</a></span></dt> +<dt><span class="section"><a href="functional/adapters/fused_function_object.html">fused_function_object</a></span></dt> +<dt><span class="section"><a href="functional/adapters/unfused.html">unfused</a></span></dt> +<dt><span class="section"><a href="functional/adapters/unfused_typed.html">unfused_typed</a></span></dt> +<dt><span class="section"><a href="functional/adapters/limits.html">Limits</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="functional/generation.html">Generation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="functional/generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="functional/generation/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></div> +<p> + Components to call functions and function objects and to make Fusion code callable + through a function object interface. + </p> +<h4> +<a name="fusion.functional.h0"></a> + <span class="phrase"><a name="fusion.functional.header"></a></span><a class="link" href="functional.html#fusion.functional.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h4> +<a name="fusion.functional.h1"></a> + <span class="phrase"><a name="fusion.functional.fused_and_unfused_forms"></a></span><a class="link" href="functional.html#fusion.functional.fused_and_unfused_forms">Fused + and unfused forms</a> + </h4> +<p> + What is a function call? + </p> +<pre class="programlisting"><span class="identifier">f</span> <span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">)</span> +</pre> +<p> + It is a name and a tuple written next to each other, left-to-right. + </p> +<p> + Although the C++ syntax does not allow to replace <code class="literal">(a,b,c)</code> + with some Fusion <a class="link" href="sequence.html" title="Sequence">Sequence</a>, introducing + yet another function provides a solution: + </p> +<pre class="programlisting"><span class="identifier">invoke</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">my_sequence</span><span class="special">)</span> +</pre> +<p> + Alternatively it is possible to apply a simple transformation to <code class="literal">f</code> + in order to achieve the same effect: + </p> +<pre class="programlisting"><span class="identifier">f</span> <span class="identifier">tuple</span> <span class="special"><=></span> f' <span class="special">(</span><span class="identifier">tuple</span><span class="special">)</span> +</pre> +<p> + Now, <code class="literal">f'</code> is an unary function that takes the arguments to + <code class="computeroutput"><span class="identifier">f</span></code> as a tuple; <code class="literal">f'</code> + is the <span class="emphasis"><em>fused</em></span> form of <code class="computeroutput"><span class="identifier">f</span></code>. + Reading the above equivalence right-to-left to get the inverse transformation, + <code class="computeroutput"><span class="identifier">f</span></code> is the <span class="emphasis"><em>unfused</em></span> + form of <code class="literal">f'</code>. + </p> +<h4> +<a name="fusion.functional.h2"></a> + <span class="phrase"><a name="fusion.functional.calling_functions_and_function_objects"></a></span><a class="link" href="functional.html#fusion.functional.calling_functions_and_function_objects">Calling + functions and function objects</a> + </h4> +<p> + Having generic C++ code call back arbitrary functions provided by the client + used to be a heavily repetitive task, as different functions can differ in + arity, invocation syntax and other properties that might be part of the type. + Transporting arguments as Fusion sequences and factoring out the invocation + makes Fusion algorithms applicable to function arguments and also reduces the + problem to one invocation syntax and a fixed arity (instead of an arbitrary + number of arbitrary arguments times several syntactic variants times additional + properties). + </p> +<p> + Transforming an unfused function into its fused counterpart allows n-ary calls + from an algorithm that invokes an unary <a class="link" href="functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> with <a class="link" href="sequence.html" title="Sequence">Sequence</a> + arguments. + </p> +<p> + The library provides several function templates to invoke different kinds of + functions and adapters to transform them into fused form, respectively. Every + variant has a corresponding generator function template that returns an adapter + instance for the given argument. + </p> +<p> + Constructors can be called applying <a href="http://www.boost.org/libs/functional/factory/doc/html/index.html" target="_top">Boost.Functional/Factory</a>. + </p> +<h4> +<a name="fusion.functional.h3"></a> + <span class="phrase"><a name="fusion.functional.making_fusion_code_callable_through_a_function_object_interface"></a></span><a class="link" href="functional.html#fusion.functional.making_fusion_code_callable_through_a_function_object_interface">Making + Fusion code callable through a function object interface</a> + </h4> +<p> + Transforming a fused function into its unfused counterpart allows to create + function objects to accept arbitrary calls. In other words, an unary function + object can be implemented instead of (maybe heavily overloaded) function templates + or function call operators. + </p> +<p> + The library provides both a strictly typed and a generic variant for this transformation. + The latter should be used in combination with <a href="http://www.boost.org/libs/functional/forward/doc/html/index.html" target="_top">Boost.Functional/Forward</a> + to attack <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">The + Forwarding Problem</a>. + </p> +<p> + Both variants have a corresponding generator function template that returns + an adapter instance for the given argument. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="extension/iterator_facade.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functional/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters.html b/libs/fusion/doc/html/fusion/functional/adapters.html new file mode 100644 index 000000000..f6a5c4f75 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters.html @@ -0,0 +1,55 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Adapters</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functional.html" title="Functional"> +<link rel="prev" href="invocation/limits.html" title="Limits"> +<link rel="next" href="adapters/fused.html" title="fused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invocation/limits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapters/fused.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.functional.adapters"></a><a class="link" href="adapters.html" title="Adapters">Adapters</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="adapters/fused.html">fused</a></span></dt> +<dt><span class="section"><a href="adapters/fused_procedure.html">fused_procedure</a></span></dt> +<dt><span class="section"><a href="adapters/fused_function_object.html">fused_function_object</a></span></dt> +<dt><span class="section"><a href="adapters/unfused.html">unfused</a></span></dt> +<dt><span class="section"><a href="adapters/unfused_typed.html">unfused_typed</a></span></dt> +<dt><span class="section"><a href="adapters/limits.html">Limits</a></span></dt> +</dl></div> +<p> + Function object templates to transform a particular target function. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invocation/limits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="adapters/fused.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/fused.html b/libs/fusion/doc/html/fusion/functional/adapters/fused.html new file mode 100644 index 000000000..e89258425 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/fused.html @@ -0,0 +1,260 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>fused</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="../adapters.html" title="Adapters"> +<link rel="next" href="fused_procedure.html" title="fused_procedure"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../adapters.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fused_procedure.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.fused"></a><a class="link" href="fused.html" title="fused">fused</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.fused.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.description"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.description">Description</a> + </h6> +<p> + An unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> adapter template for <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> target functions. It takes a <a class="link" href="../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> that contains the arguments for the target function. + </p> +<p> + The type of the target function is allowed to be const qualified or a reference. + Const qualification is preserved and propagated appropriately (in other + words, only const versions of <code class="literal">operator()</code> can be used + for a target function object that is const or, if the target function object + is held by value, the adapter is const - these semantics have nothing to + do with the const qualification of a member function, which is referring + to the type of object pointed to by <code class="literal">this</code> which is specified + with the first element in the sequence passed to the adapter). + </p> +<p> + If the target function is a pointer to a class members, the corresponding + object can be specified as a reference, pointer, or smart pointer. In case + of the latter, a freestanding <code class="literal">get_pointer</code> function must + be defined (Boost provides this function for <code class="literal">std::auto_ptr</code> + and <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>). + </p> +<h6> +<a name="fusion.functional.adapters.fused.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.header"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused.h2"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.synopsis"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">fused</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused.h3"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.template_parameters"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.template_parameters">Template + parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Function</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused.h4"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.model_of"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.model_of">Model + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> + </li> +<li class="listitem"> + <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">R</span></code></span></dt> +<dd><p> + A possibly const qualified <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> type or reference type thereof + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt> +<dd><p> + An object convertible to <code class="computeroutput"><span class="identifier">R</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> of arguments that + are accepted by <code class="computeroutput"><span class="identifier">r</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.adapters.fused.h5"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.expression_semantics"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, initializes the + target function with <code class="computeroutput"><span class="identifier">r</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, attempts to use + <code class="computeroutput"><span class="identifier">R</span></code>'s default constructor. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Calls <code class="computeroutput"><span class="identifier">r</span></code> with + the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as its arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused.h6"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.example"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">fused</span><span class="special"><</span> <a href="http://www.sgi.com/tech/stl/plus.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">plus</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">></span> <span class="special">></span> <span class="identifier">f</span><span class="special">;</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">f</span><span class="special">(</span><a class="link" href="../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2l</span><span class="special">))</span> <span class="special">==</span> <span class="number">3l</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused.h7"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused.see_also"></a></span><a class="link" href="fused.html#fusion.functional.adapters.fused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../invocation/functions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../generation/functions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../adapters.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fused_procedure.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/fused_function_object.html b/libs/fusion/doc/html/fusion/functional/adapters/fused_function_object.html new file mode 100644 index 000000000..b13b0a240 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/fused_function_object.html @@ -0,0 +1,280 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>fused_function_object</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="fused_procedure.html" title="fused_procedure"> +<link rel="next" href="unfused.html" title="unfused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused_procedure.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unfused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.fused_function_object"></a><a class="link" href="fused_function_object.html" title="fused_function_object">fused_function_object</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.description"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.description">Description</a> + </h6> +<p> + An unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> adapter template for a <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> target function. It takes a <a class="link" href="../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> that contains the arguments for the target function. + </p> +<p> + The type of the target function is allowed to be const qualified or a reference. + Const qualification is preserved and propagated appropriately (in other + words, only const versions of <code class="literal">operator()</code> can be used + for an target function object that is const or, if the target function + object is held by value, the adapter is const). + </p> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.header"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h2"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.synopsis"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">fused_function_object</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h3"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.template_parameters"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.template_parameters">Template + parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Function</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> type + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h4"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.model_of"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.model_of">Model + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> + </li> +<li class="listitem"> + <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">R</span></code></span></dt> +<dd><p> + A possibly const qualified <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> type or reference type thereof + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt> +<dd><p> + An object convertible to <code class="computeroutput"><span class="identifier">R</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> of arguments that + are accepted by <code class="computeroutput"><span class="identifier">r</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h5"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.expression_semantics"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, initializes the + target function with <code class="computeroutput"><span class="identifier">r</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, attempts to use + <code class="computeroutput"><span class="identifier">R</span></code>'s default constructor. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Calls <code class="computeroutput"><span class="identifier">r</span></code> with + the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as its arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h6"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.example"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">SeqOfSeqs</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Func</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../../algorithm/transformation/metafunctions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span> <span class="identifier">zip_view</span><span class="special"><</span><span class="identifier">SeqOfSeqs</span><span class="special">></span> <span class="keyword">const</span><span class="special">,</span> + <span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&></span> <span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">n_ary_transform</span><span class="special">(</span><span class="identifier">SeqOfSeqs</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">)</span> +<span class="special">{</span> + <span class="keyword">return</span> <a class="link" href="../../algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><span class="identifier">zip_view</span><span class="special"><</span><span class="identifier">SeqOfSeqs</span><span class="special">>(</span><span class="identifier">s</span><span class="special">),</span> + <span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&>(</span><span class="identifier">f</span><span class="special">));</span> +<span class="special">}</span> + +<span class="keyword">struct</span> <span class="identifier">sub</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sig</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Self</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special"><</span> <span class="identifier">Self</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">T</span><span class="special">)</span> <span class="special">></span> + <span class="special">{</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">lhs</span> <span class="special">-</span> <span class="identifier">rhs</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">c</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">0.5f</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">c</span> <span class="special">==</span> <span class="identifier">n_ary_transform</span><span class="special">(</span><a class="link" href="../../container/generation/functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">sub</span><span class="special">()));</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_function_object.h7"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_function_object.see_also"></a></span><a class="link" href="fused_function_object.html#fusion.functional.adapters.fused_function_object.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../invocation/functions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused_procedure.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unfused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/fused_procedure.html b/libs/fusion/doc/html/fusion/functional/adapters/fused_procedure.html new file mode 100644 index 000000000..8a1d58c13 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/fused_procedure.html @@ -0,0 +1,276 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>fused_procedure</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="fused.html" title="fused"> +<link rel="next" href="fused_function_object.html" title="fused_function_object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fused_function_object.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.fused_procedure"></a><a class="link" href="fused_procedure.html" title="fused_procedure">fused_procedure</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.description"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.description">Description</a> + </h6> +<p> + An unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> adapter template for <a class="link" href="../concepts/callable.html" title="Callable Object">Callable + Object</a> target functions. It takes a <a class="link" href="../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> that contains the arguments for the target function. + </p> +<p> + The result is discared and the adapter's return type is <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<p> + The type of the target function is allowed to be const qualified or a reference. + Const qualification is preserved and propagated appropriately (in other + words, only const versions of <code class="literal">operator()</code> can be used + for a target function object that is const or, if the target function object + is held by value, the adapter is const - these semantics have nothing to + do with the const qualification of a member function, which is referring + to the type of object pointed to by <code class="literal">this</code> which is specified + with the first element in the sequence passed to the adapter). + </p> +<p> + If the target function is a pointer to a members function, the corresponding + object can be specified as a reference, pointer, or smart pointer. In case + of the latter, a freestanding <code class="literal">get_pointer</code> function must + be defined (Boost provides this function for <code class="literal">std::auto_ptr</code> + and <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>). + </p> +<p> + The target function must not be a pointer to a member object (dereferencing + such a pointer without returning anything does not make sense, so this + case is not implemented). + </p> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.header"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h2"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.synopsis"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">fused_procedure</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h3"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.template_parameters"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.template_parameters">Template + parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Function</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../concepts/callable.html" title="Callable Object">Callable + Object</a> type + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h4"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.model_of"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.model_of">Model of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> + </li> +<li class="listitem"> + <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">R</span></code></span></dt> +<dd><p> + A possibly const qualified <a class="link" href="../concepts/callable.html" title="Callable Object">Callable + Object</a> type or reference type thereof + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt> +<dd><p> + An object convertible to <code class="computeroutput"><span class="identifier">R</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> of arguments that + are accepted by <code class="computeroutput"><span class="identifier">r</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h5"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.expression_semantics"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, initializes the + target function with <code class="computeroutput"><span class="identifier">r</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, attempts to use + <code class="computeroutput"><span class="identifier">R</span></code>'s default constructor. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Calls <code class="computeroutput"><span class="identifier">r</span></code> with + the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as its arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h6"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.example"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">SequenceOfSequences</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Func</span><span class="special">></span> +<span class="keyword">void</span> <span class="identifier">n_ary_for_each</span><span class="special">(</span><span class="identifier">SequenceOfSequences</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">)</span> +<span class="special">{</span> + <a class="link" href="../../algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><a class="link" href="../../view/zip_view.html" title="zip_view"><code class="computeroutput"><span class="identifier">zip_view</span></code></a><span class="special"><</span><span class="identifier">SequenceOfSequences</span><span class="special">>(</span><span class="identifier">s</span><span class="special">),</span> + <span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&>(</span><span class="identifier">f</span><span class="special">));</span> +<span class="special">}</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span> + <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">;</span> + <span class="identifier">n_ary_for_each</span><span class="special">(</span><a class="link" href="../../container/generation/functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">_1</span> <span class="special">-=</span> <span class="identifier">_2</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <a class="link" href="../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">0.5f</span><span class="special">));</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.adapters.fused_procedure.h7"></a> + <span class="phrase"><a name="fusion.functional.adapters.fused_procedure.see_also"></a></span><a class="link" href="fused_procedure.html#fusion.functional.adapters.fused_procedure.see_also">See also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../invocation/functions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../generation/functions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fused_function_object.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/limits.html b/libs/fusion/doc/html/fusion/functional/adapters/limits.html new file mode 100644 index 000000000..f8f190bf3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/limits.html @@ -0,0 +1,67 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Limits</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="unfused_typed.html" title="unfused_typed"> +<link rel="next" href="../generation.html" title="Generation"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="unfused_typed.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../generation.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.limits"></a><a class="link" href="limits.html" title="Limits">Limits</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.limits.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.limits.header"></a></span><a class="link" href="limits.html#fusion.functional.adapters.limits.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">limits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.limits.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.limits.macros"></a></span><a class="link" href="limits.html#fusion.functional.adapters.limits.macros">Macros</a> + </h6> +<p> + The following macros can be defined to change the maximum arity. The value + used for these macros must not exceed <code class="computeroutput"><span class="identifier">FUSION_MAX_VECTOR_SIZE</span></code>. + The default is 6. + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + BOOST_FUSION_UNFUSED_MAX_ARITY + </li> +<li class="listitem"> + BOOST_FUSION_UNFUSED_TYPE_MAX_ARITY + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="unfused_typed.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../generation.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/unfused.html b/libs/fusion/doc/html/fusion/functional/adapters/unfused.html new file mode 100644 index 000000000..f708d7ec5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/unfused.html @@ -0,0 +1,297 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>unfused</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="fused_function_object.html" title="fused_function_object"> +<link rel="next" href="unfused_typed.html" title="unfused_typed"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused_function_object.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unfused_typed.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.unfused"></a><a class="link" href="unfused.html" title="unfused">unfused</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.unfused.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.description"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.description">Description</a> + </h6> +<p> + An n-ary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> adapter template for an unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> target function. When called, its arguments are + bundled to a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> of references that is passed to the target function + object. + </p> +<p> + The nullary overload of the call operator can be removed by setting the + second template parameter to <code class="computeroutput"><span class="keyword">false</span></code>, + which is very useful if the result type computation would result in a compile + error, otherwise (nullary call operator's prototypes can't be templates + and thus are instantiated as early as the class template). + </p> +<p> + Only LValue arguments are accepted. To overcome this limitation, apply + <a href="http://www.boost.org/libs/functional/forward/doc/html/index.html" target="_top">Boost.Functional/Forward</a>. + </p> +<p> + The type of the target function is allowed to be const qualified or a reference. + Const qualification is preserved and propagated appropriately. In other + words, only const versions of <code class="literal">operator()</code> can be used + if the target function object is const - or, in case the target function + object is held by value, the adapter is const. + </p> +<h6> +<a name="fusion.functional.adapters.unfused.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.header"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused.h2"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.synopsis"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">AllowNullary</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">unfused</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused.h3"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.template_parameters"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.template_parameters">Template + parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Function</span></code> + </p> + </td> +<td> + <p> + A unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">AllowNullary</span></code> + </p> + </td> +<td> + <p> + Boolean constant + </p> + </td> +<td> + <p> + true + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.unfused.h4"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.model_of"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.model_of">Model + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> + </li> +<li class="listitem"> + <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A possibly const qualified, unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> type or reference type thereof + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An object convertible to <code class="computeroutput"><span class="identifier">F</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">UL</span></code></span></dt> +<dd><p> + The type <code class="computeroutput"><span class="identifier">unfused</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">ul</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">UL</span></code>, + initialized with <code class="computeroutput"><span class="identifier">f</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt> +<dd><p> + Arguments to <code class="computeroutput"><span class="identifier">ul</span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.adapters.unfused.h5"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.expression_semantics"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">UL</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, initializes the + target function with <code class="computeroutput"><span class="identifier">f</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">UL</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, attempts to use + <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">ul</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Calls <code class="computeroutput"><span class="identifier">f</span></code> with + a <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> that contains + references to the arguments <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.unfused.h6"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.example"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">fused_incrementer</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <a class="link" href="../../algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">,++</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span><span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <span class="identifier">unfused</span><span class="special"><</span><span class="identifier">fused_incrementer</span><span class="special">></span> <span class="identifier">increment</span><span class="special">;</span> + <span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">b</span> <span class="special">=</span> <span class="char">'X'</span><span class="special">;</span> + <span class="identifier">increment</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="number">3</span> <span class="special">&&</span> <span class="identifier">b</span> <span class="special">==</span> <span class="char">'Y'</span><span class="special">);</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused.h7"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused.see_also"></a></span><a class="link" href="unfused.html#fusion.functional.adapters.unfused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../generation/functions/mk_unfused.html" title="make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="fused_function_object.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unfused_typed.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/adapters/unfused_typed.html b/libs/fusion/doc/html/fusion/functional/adapters/unfused_typed.html new file mode 100644 index 000000000..944519096 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/adapters/unfused_typed.html @@ -0,0 +1,354 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>unfused_typed</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../adapters.html" title="Adapters"> +<link rel="prev" href="unfused.html" title="unfused"> +<link rel="next" href="limits.html" title="Limits"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="unfused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="limits.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.adapters.unfused_typed"></a><a class="link" href="unfused_typed.html" title="unfused_typed">unfused_typed</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h0"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.description"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.description">Description</a> + </h6> +<p> + An n-ary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> adapter template for an unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> target function. When called, its arguments are + bundled to a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> that is passed to the target function object. + </p> +<p> + The call operators of esulting function objects are strictly typed (in + other words, non-templatized) with the types from a <a class="link" href="../../sequence.html" title="Sequence">Sequence</a>. + </p> +<p> + The type of the target function is allowed to be const qualified or a reference. + Const qualification is preserved and propagated appropriately (in other + words, only const versions of <code class="literal">operator()</code> can be used + if the target function object is const - or, in case the target function + object is held by value, the adapter is const). + </p> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../../images/note.png" alt="note"></span> For Microsoft Visual C++ 7.1 (Visual Studio 2003) + the detection of the Function Object's const qualification easily causes + an internal error. Therefore the adapter is always treated as if it was + const. + </p> +</div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> If the type sequence passed to this template contains + non-reference elements, the element is copied only once - the call operator's + signature is optimized automatically to avoid by-value parameters. + </p> +</div> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h1"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.header"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused_typed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h2"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.synopsis"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">unfused_typed</span><span class="special">;</span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h3"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.template_parameters"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.template_parameters">Template + parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Function</span></code> + </p> + </td> +<td> + <p> + A unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h4"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.model_of"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.model_of">Model + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> + </li> +<li class="listitem"> + <a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A possibly const qualified, unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> type or reference type thereof + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An object convertible to <code class="computeroutput"><span class="identifier">F</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> of parameter types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">UT</span></code></span></dt> +<dd><p> + The type <code class="computeroutput"><span class="identifier">unfused_typed</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">S</span><span class="special">></span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">ut</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">UT</span></code>, + initialized with <code class="computeroutput"><span class="identifier">f</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt> +<dd><p> + Arguments to <code class="computeroutput"><span class="identifier">ut</span></code>, + convertible to the types in <code class="computeroutput"><span class="identifier">S</span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h5"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.expression_semantics"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">UT</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, initializes the + target function with <code class="computeroutput"><span class="identifier">f</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">UT</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Creates a fused function as described above, attempts to use + <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">ut</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Calls <code class="computeroutput"><span class="identifier">f</span></code> with + an instance of <code class="computeroutput"><span class="identifier">S</span></code> + (or a subsequence of <code class="computeroutput"><span class="identifier">S</span></code> + starting at the first element, if fewer arguments are given and + the overload hasn't been disabled) initialized with <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h6"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.example"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">add_assign</span> <span class="comment">// applies operator+=</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">result_type</span><span class="special">;</span> <span class="comment">// for simplicity</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="special">&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="identifier">lhs</span> <span class="special">+=</span> <span class="identifier">rhs</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Tie</span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">fused_parallel_adder</span> +<span class="special">{</span> + <span class="identifier">Tie</span> <span class="identifier">tie_dest</span><span class="special">;</span> +<span class="keyword">public</span><span class="special">:</span> + <span class="keyword">explicit</span> <span class="identifier">fused_parallel_adder</span><span class="special">(</span><span class="identifier">Tie</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">dest</span><span class="special">)</span> + <span class="special">:</span> <span class="identifier">tie_dest</span><span class="special">(</span><span class="identifier">dest</span><span class="special">)</span> + <span class="special">{</span> <span class="special">}</span> + + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">result_type</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="identifier">for_each</span><span class="special">(</span> <span class="identifier">zip</span><span class="special">(</span><span class="identifier">tie_dest</span><span class="special">,</span><span class="identifier">s</span><span class="special">),</span> <span class="identifier">fused</span><span class="special"><</span><span class="identifier">add_assign</span><span class="special">>()</span> <span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="comment">// accepts a tie and creates a typed function object from it</span> +<span class="keyword">struct</span> <span class="identifier">fused_parallel_adder_maker</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sig</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Self</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special"><</span> <span class="identifier">Self</span><span class="special">(</span><span class="identifier">Seq</span><span class="special">)</span> <span class="special">></span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">seq</span><span class="special">;</span> + + <span class="keyword">typedef</span> <span class="identifier">unfused_typed</span><span class="special"><</span> <span class="identifier">fused_parallel_adder</span><span class="special"><</span><span class="identifier">seq</span><span class="special">>,</span> + <span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">transform</span><span class="special"><</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="special">></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span> <span class="keyword">void</span><span class="special">(</span><span class="identifier">Seq</span><span class="special">)</span> <span class="special">>::</span><span class="identifier">type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">tie</span><span class="special">)</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span> <span class="keyword">void</span><span class="special">(</span><span class="identifier">Seq</span><span class="special">)</span> <span class="special">>::</span><span class="identifier">type</span><span class="special">(</span> + <span class="identifier">fused_parallel_adder</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>(</span><span class="identifier">tie</span><span class="special">)</span> <span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> +<span class="identifier">unfused</span><span class="special"><</span><span class="identifier">fused_parallel_adder_maker</span><span class="special">></span> <span class="identifier">parallel_add</span><span class="special">;</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">b</span> <span class="special">=</span> <span class="char">'X'</span><span class="special">;</span> + <span class="comment">// the second call is strictly typed with the types deduced from the</span> + <span class="comment">// first call</span> + <span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)(</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> + <span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)(</span><span class="number">3</span><span class="special">);</span> + <span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)();</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="number">8</span> <span class="special">&&</span> <span class="identifier">b</span> <span class="special">==</span> <span class="char">'Z'</span><span class="special">);</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.adapters.unfused_typed.h7"></a> + <span class="phrase"><a name="fusion.functional.adapters.unfused_typed.see_also"></a></span><a class="link" href="unfused_typed.html#fusion.functional.adapters.unfused_typed.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="unfused.html" title="unfused"><code class="computeroutput"><span class="identifier">unfused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../support/deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="unfused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="limits.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/concepts.html b/libs/fusion/doc/html/fusion/functional/concepts.html new file mode 100644 index 000000000..bf6ccd1b8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/concepts.html @@ -0,0 +1,53 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Concepts</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functional.html" title="Functional"> +<link rel="prev" href="../functional.html" title="Functional"> +<link rel="next" href="concepts/callable.html" title="Callable Object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functional.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/callable.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.functional.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="concepts/callable.html">Callable Object</a></span></dt> +<dt><span class="section"><a href="concepts/reg_callable.html">Regular Callable + Object</a></span></dt> +<dt><span class="section"><a href="concepts/def_callable.html">Deferred Callable + Object</a></span></dt> +<dt><span class="section"><a href="concepts/poly.html">Polymorphic Function + Object</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functional.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/callable.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/concepts/callable.html b/libs/fusion/doc/html/fusion/functional/concepts/callable.html new file mode 100644 index 000000000..9368f086f --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/concepts/callable.html @@ -0,0 +1,82 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Callable Object</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="../concepts.html" title="Concepts"> +<link rel="next" href="reg_callable.html" title="Regular Callable Object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reg_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.concepts.callable"></a><a class="link" href="callable.html" title="Callable Object">Callable Object</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.concepts.callable.h0"></a> + <span class="phrase"><a name="fusion.functional.concepts.callable.description"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.description">Description</a> + </h6> +<p> + A pointer to a function, a pointer to member function, a pointer to member + data, or a class type whose objects can appear immediately to the left + of a function call operator. + </p> +<h6> +<a name="fusion.functional.concepts.callable.h1"></a> + <span class="phrase"><a name="fusion.functional.concepts.callable.models"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + function pointer types + </li> +<li class="listitem"> + member (function or data) pointer types + </li> +<li class="listitem"> + all kinds of function objects + </li> +</ul></div> +<h6> +<a name="fusion.functional.concepts.callable.h2"></a> + <span class="phrase"><a name="fusion.functional.concepts.callable.examples"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.examples">Examples</a> + </h6> +<pre class="programlisting"><span class="special">&</span> <span class="identifier">a_free_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_data_member</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_member_function</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>()</span> +<span class="comment">// using namespace boost;</span> +<span class="identifier">bind</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> +<span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span> <span class="special">+=</span> <span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_2</span><span class="special">;</span> +<span class="identifier">fusion</span><span class="special">::</span><a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>())</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reg_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/concepts/def_callable.html b/libs/fusion/doc/html/fusion/functional/concepts/def_callable.html new file mode 100644 index 000000000..a315cab0e --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/concepts/def_callable.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Deferred Callable Object</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="reg_callable.html" title="Regular Callable Object"> +<link rel="next" href="poly.html" title="Polymorphic Function Object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reg_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="poly.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.concepts.def_callable"></a><a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.concepts.def_callable.h0"></a> + <span class="phrase"><a name="fusion.functional.concepts.def_callable.description"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.description">Description</a> + </h6> +<p> + <a class="link" href="callable.html" title="Callable Object">Callable Object</a> + types that work with <a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top">Boost.ResultOf</a> + to determine the result of a call. + </p> +<h6> +<a name="fusion.functional.concepts.def_callable.h1"></a> + <span class="phrase"><a name="fusion.functional.concepts.def_callable.refinement_of"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.refinement_of">Refinement + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="callable.html" title="Callable Object">Callable Object</a> + </li></ul></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + note Once C++ supports the <code class="literal">decltype</code> keyword, all models + of <a class="link" href="callable.html" title="Callable Object">Callable Object</a> + will also be models of <a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a>, because function objects won't need client-side + support for <code class="computeroutput"><span class="identifier">result_of</span></code>. + </p> +</div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A possibly const qualified Deferred Callable Object type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">A1</span> <span class="special">...</span><span class="identifier">AN</span></code></span></dt> +<dd><p> + Argument types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span> <span class="special">...</span><span class="identifier">aN</span></code></span></dt> +<dd><p> + Objects or references to objects with types <code class="computeroutput"><span class="identifier">A1</span> + <span class="special">...</span><span class="identifier">AN</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span><span class="identifier">TN</span></code></span></dt> +<dd><p> + <code class="computeroutput"><span class="identifier">T</span></code>i is <code class="computeroutput"><span class="identifier">A</span></code>i <code class="computeroutput"><span class="special">&</span></code> + if <code class="computeroutput"><span class="identifier">a</span></code>i is an LValue, + same as <code class="computeroutput"><span class="identifier">A</span></code>i, otherwise + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.concepts.def_callable.h2"></a> + <span class="phrase"><a name="fusion.functional.concepts.def_callable.expression_requirements"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.expression_requirements">Expression + requirements</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Type + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><code class="computeroutput"><span class="special"><</span> <span class="identifier">F</span><span class="special">(</span><span class="identifier">T1</span> + <span class="special">...</span><span class="identifier">TN</span><span class="special">)</span> <span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Result of a call with <code class="computeroutput"><span class="identifier">A1</span> + <span class="special">...</span><span class="identifier">AN</span></code>-typed + arguments + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.concepts.def_callable.h3"></a> + <span class="phrase"><a name="fusion.functional.concepts.def_callable.models"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> types + </li> +<li class="listitem"> + member (function or data) pointer types + </li> +</ul></div> +<h6> +<a name="fusion.functional.concepts.def_callable.h4"></a> + <span class="phrase"><a name="fusion.functional.concepts.def_callable.examples"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.examples">Examples</a> + </h6> +<pre class="programlisting"><span class="special">&</span> <span class="identifier">a_free_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_data_member</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_member_function</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>()</span> +<span class="comment">// using namespace boost;</span> +<span class="identifier">bind</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> +<span class="comment">// Note: Boost.Lambda expressions don't work with __boost_result_of__</span> +<span class="identifier">fusion</span><span class="special">::</span><a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>())</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reg_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="poly.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/concepts/poly.html b/libs/fusion/doc/html/fusion/functional/concepts/poly.html new file mode 100644 index 000000000..eaf9e3926 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/concepts/poly.html @@ -0,0 +1,172 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Polymorphic Function Object</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="def_callable.html" title="Deferred Callable Object"> +<link rel="next" href="../invocation.html" title="Invocation"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="def_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../invocation.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.concepts.poly"></a><a class="link" href="poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.concepts.poly.h0"></a> + <span class="phrase"><a name="fusion.functional.concepts.poly.description"></a></span><a class="link" href="poly.html#fusion.functional.concepts.poly.description">Description</a> + </h6> +<p> + A non-member-pointer <a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> type. + </p> +<h6> +<a name="fusion.functional.concepts.poly.h1"></a> + <span class="phrase"><a name="fusion.functional.concepts.poly.refinement_of"></a></span><a class="link" href="poly.html#fusion.functional.concepts.poly.refinement_of">Refinement + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="reg_callable.html" title="Regular Callable Object">Regular Callable + Object</a> + </li> +<li class="listitem"> + <a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred Callable + Object</a> + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A possibly const-qualified Polymorphic Function Object type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An object or reference to an object of type F + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">A1</span> <span class="special">...</span><span class="identifier">AN</span></code></span></dt> +<dd><p> + Argument types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span> <span class="special">...</span><span class="identifier">aN</span></code></span></dt> +<dd><p> + Objects or references to objects with types <code class="computeroutput"><span class="identifier">A1</span> + <span class="special">...</span><span class="identifier">AN</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span><span class="identifier">TN</span></code></span></dt> +<dd><p> + <code class="computeroutput"><span class="identifier">T</span></code>i is <code class="computeroutput"><span class="identifier">A</span></code>i <code class="computeroutput"><span class="special">&</span></code> + if <code class="computeroutput"><span class="identifier">a</span></code>i is an LValue, + same as <code class="computeroutput"><span class="identifier">A</span></code>i, otherwise + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.concepts.poly.h2"></a> + <span class="phrase"><a name="fusion.functional.concepts.poly.expression_requirements"></a></span><a class="link" href="poly.html#fusion.functional.concepts.poly.expression_requirements">Expression + requirements</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return Type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span> + <span class="special">...</span><span class="identifier">aN</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">result_of</span><span class="special"><</span> + <span class="identifier">F</span><span class="special">(</span><span class="identifier">T1</span><span class="special">,</span> + <span class="special">...</span><span class="identifier">TN</span><span class="special">)</span> <span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Unspecified + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.concepts.poly.h3"></a> + <span class="phrase"><a name="fusion.functional.concepts.poly.models"></a></span><a class="link" href="poly.html#fusion.functional.concepts.poly.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + function pointers + </li> +<li class="listitem"> + function objects of the Standard Library + </li> +<li class="listitem"> + all Fusion <a class="link" href="../adapters.html" title="Adapters">functional adapters</a> + </li> +</ul></div> +<h6> +<a name="fusion.functional.concepts.poly.h4"></a> + <span class="phrase"><a name="fusion.functional.concepts.poly.examples"></a></span><a class="link" href="poly.html#fusion.functional.concepts.poly.examples">Examples</a> + </h6> +<pre class="programlisting"><span class="special">&</span> <span class="identifier">a_free_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>()</span> +<span class="comment">// using namespace boost;</span> +<span class="identifier">bind</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> +<span class="comment">// Note: Boost.Lambda expressions don't work with __boost_result_of__</span> +<span class="identifier">fusion</span><span class="special">::</span><a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>())</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="def_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../invocation.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/concepts/reg_callable.html b/libs/fusion/doc/html/fusion/functional/concepts/reg_callable.html new file mode 100644 index 000000000..702e1aab6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/concepts/reg_callable.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Regular Callable Object</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="callable.html" title="Callable Object"> +<link rel="next" href="def_callable.html" title="Deferred Callable Object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="def_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.concepts.reg_callable"></a><a class="link" href="reg_callable.html" title="Regular Callable Object">Regular Callable + Object</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.concepts.reg_callable.h0"></a> + <span class="phrase"><a name="fusion.functional.concepts.reg_callable.description"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.description">Description</a> + </h6> +<p> + A non-member-pointer <a class="link" href="callable.html" title="Callable Object">Callable + Object</a> type: A pointer to a function or a class type whose objects + can appear immediately to the left of a function call operator. + </p> +<h6> +<a name="fusion.functional.concepts.reg_callable.h1"></a> + <span class="phrase"><a name="fusion.functional.concepts.reg_callable.refinement_of"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.refinement_of">Refinement + of</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="callable.html" title="Callable Object">Callable Object</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A possibly const qualified Deferred Callable Object type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An object or reference to an object of type F + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">A1</span> <span class="special">...</span><span class="identifier">AN</span></code></span></dt> +<dd><p> + Argument types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span> <span class="special">...</span><span class="identifier">aN</span></code></span></dt> +<dd><p> + Objects or references to objects with types <code class="computeroutput"><span class="identifier">A1</span> + <span class="special">...</span><span class="identifier">AN</span></code> + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.functional.concepts.reg_callable.h2"></a> + <span class="phrase"><a name="fusion.functional.concepts.reg_callable.expression_requirements"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.expression_requirements">Expression + requirements</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return Type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span> + <span class="special">...</span><span class="identifier">aN</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Unspecified + </p> + </td> +<td> + <p> + Unspecified + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.concepts.reg_callable.h3"></a> + <span class="phrase"><a name="fusion.functional.concepts.reg_callable.models"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + function pointer types + </li> +<li class="listitem"> + all kinds of function objects + </li> +</ul></div> +<h6> +<a name="fusion.functional.concepts.reg_callable.h4"></a> + <span class="phrase"><a name="fusion.functional.concepts.reg_callable.examples"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.examples">Examples</a> + </h6> +<pre class="programlisting"><span class="special">&</span> <span class="identifier">a_free_function</span> +<span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>()</span> +<span class="comment">// using namespace boost;</span> +<span class="identifier">bind</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> +<span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span> <span class="special">+=</span> <span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_2</span><span class="special">;</span> +<span class="identifier">fusion</span><span class="special">::</span><a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>())</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="def_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation.html b/libs/fusion/doc/html/fusion/functional/generation.html new file mode 100644 index 000000000..4a11c336f --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation.html @@ -0,0 +1,48 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Generation</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functional.html" title="Functional"> +<link rel="prev" href="adapters/limits.html" title="Limits"> +<link rel="next" href="generation/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapters/limits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.functional.generation"></a><a class="link" href="generation.html" title="Generation">Generation</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="generation/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="adapters/limits.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/functions.html b/libs/fusion/doc/html/fusion/functional/generation/functions.html new file mode 100644 index 000000000..828875c36 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/functions.html @@ -0,0 +1,50 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../generation.html" title="Generation"> +<link rel="prev" href="../generation.html" title="Generation"> +<link rel="next" href="functions/mk_fused.html" title="make_fused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../generation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/mk_fused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.generation.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/mk_fused.html">make_fused</a></span></dt> +<dt><span class="section"><a href="functions/mk_fused_proc.html">make_fused_procedure</a></span></dt> +<dt><span class="section"><a href="functions/mk_fused_fobj.html">make_fused_function_object</a></span></dt> +<dt><span class="section"><a href="functions/mk_unfused.html">make_unfused</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../generation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/mk_fused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused.html b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused.html new file mode 100644 index 000000000..cb7bcc279 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused.html @@ -0,0 +1,158 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="mk_fused_proc.html" title="make_fused_procedure"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.functions.mk_fused"></a><a class="link" href="mk_fused.html" title="make_fused">make_fused</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.description"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.description">Description</a> + </h6> +<p> + Creates a <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> adapter for a given <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable Object</a>. + The usual <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> is applied to the target function. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.synopsis"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="link" href="../metafunctions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_fused</span><span class="special">(</span><span class="identifier">F</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.parameters"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> + </p> + </td> +<td> + <p> + The function to transform. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.expression_semantics"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_fused</span><span class="special">(</span><span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A specialization of <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> adapter for <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h4"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.header"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h5"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.example"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">float</span> <span class="identifier">sub</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">float</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">a</span> <span class="special">-</span> <span class="identifier">b</span><span class="special">;</span> <span class="special">}</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">c</span><span class="special">(</span><span class="number">1.0f</span><span class="special">,</span><span class="number">0.5f</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">c</span> <span class="special">==</span> <a class="link" href="../../../algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><a class="link" href="../../../algorithm/transformation/functions/zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">make_fused</span><span class="special">(&</span> <span class="identifier">sub</span><span class="special">)));</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">c</span> <span class="special">==</span> <a class="link" href="../../../algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><a class="link" href="../../../algorithm/transformation/functions/zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">make_fused</span><span class="special">(</span><a href="http://www.sgi.com/tech/stl/minus.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">minus</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">>())));</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused.h6"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused.see_also"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.functions.mk_fused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html new file mode 100644 index 000000000..cef6693bb --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html @@ -0,0 +1,173 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused_function_object</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="mk_fused_proc.html" title="make_fused_procedure"> +<link rel="next" href="mk_unfused.html" title="make_unfused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_unfused.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.functions.mk_fused_fobj"></a><a class="link" href="mk_fused_fobj.html" title="make_fused_function_object">make_fused_function_object</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.description"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.description">Description</a> + </h6> +<p> + Creates a <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> adapter + for a given <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a>. The usual <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> is applied to the target function. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.synopsis"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="link" href="../metafunctions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_fused_function_object</span><span class="special">(</span><span class="identifier">F</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.parameters"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + The function to transform. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.expression_semantics"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_fused_function_object</span><span class="special">(</span><span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A specialization of <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> adapter + for <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h4"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.header"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h5"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.example"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">sub</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sig</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Self</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special"><</span> <span class="identifier">Self</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">T</span><span class="special">)</span> <span class="special">></span> + <span class="special">{</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">lhs</span> <span class="special">-</span> <span class="identifier">rhs</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span> + <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">c</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">0.5f</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">c</span> <span class="special">==</span> <a class="link" href="../../../algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><a class="link" href="../../../algorithm/transformation/functions/zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">make_fused_function_object</span><span class="special">(</span><span class="identifier">sub</span><span class="special">())));</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_fobj.h6"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_fobj.see_also"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.functions.mk_fused_fobj.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_unfused.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_proc.html b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_proc.html new file mode 100644 index 000000000..16783d89d --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_fused_proc.html @@ -0,0 +1,154 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused_procedure</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="mk_fused.html" title="make_fused"> +<link rel="next" href="mk_fused_fobj.html" title="make_fused_function_object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.functions.mk_fused_proc"></a><a class="link" href="mk_fused_proc.html" title="make_fused_procedure">make_fused_procedure</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.description"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.description">Description</a> + </h6> +<p> + Creates a <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> adapter for + a given <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a>. The usual <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> applied to the target function. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.synopsis"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="link" href="../metafunctions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_fused_procedure</span><span class="special">(</span><span class="identifier">F</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.parameters"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/callable.html" title="Callable Object">Callable + Object</a> + </p> + </td> +<td> + <p> + The function to transform. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.expression_semantics"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_fused_procedure</span><span class="special">(</span><span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A specialization of <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> adapter for + <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h4"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.header"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h5"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.example"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">;</span> +<span class="identifier">make_fused_procedure</span><span class="special">(</span><span class="identifier">_1</span> <span class="special">+=</span> <span class="identifier">_2</span> <span class="special">-</span> <span class="identifier">_3</span><span class="special">)(</span><span class="identifier">v</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_fused_proc.h6"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_fused_proc.see_also"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.functions.mk_fused_proc.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/functions/mk_unfused.html b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_unfused.html new file mode 100644 index 000000000..7e41fe5ae --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/functions/mk_unfused.html @@ -0,0 +1,170 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_unfused</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="mk_fused_fobj.html" title="make_fused_function_object"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.functions.mk_unfused"></a><a class="link" href="mk_unfused.html" title="make_unfused">make_unfused</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.description"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.description">Description</a> + </h6> +<p> + Creates a <a class="link" href="../../adapters/unfused.html" title="unfused"><code class="computeroutput"><span class="identifier">unfused</span></code></a> adapter for a given, + unary <a class="link" href="../../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a>. The usual <a class="link" href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> is applied to the target function. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.synopsis"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span> +<span class="keyword">inline</span> <span class="keyword">typename</span> <a class="link" href="../metafunctions/mk_unfused.html" title="make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a><span class="special"><</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_unfused</span><span class="special">(</span><span class="identifier">F</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.parameters"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + The function to transform. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.expression_semantics"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">make_unfused</span><span class="special">(</span><span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A specialization of <a class="link" href="../../adapters/unfused.html" title="unfused"><code class="computeroutput"><span class="identifier">unfused</span></code></a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns a <a class="link" href="../../adapters/unfused.html" title="unfused"><code class="computeroutput"><span class="identifier">unfused</span></code></a> adapter for <code class="computeroutput"><span class="identifier">f</span></code>. + </p> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h4"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.header"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h5"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.example"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">fused_incrementer</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <a class="link" href="../../../algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">,++</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span><span class="special">);</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">b</span> <span class="special">=</span> <span class="char">'X'</span><span class="special">;</span> + <span class="identifier">make_unfused</span><span class="special">(</span><span class="identifier">fused_incrementer</span><span class="special">())(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="number">3</span> <span class="special">&&</span> <span class="identifier">b</span> <span class="special">==</span> <span class="char">'Y'</span><span class="special">);</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.functions.mk_unfused.h6"></a> + <span class="phrase"><a name="fusion.functional.generation.functions.mk_unfused.see_also"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapters/unfused.html" title="unfused"><code class="computeroutput"><span class="identifier">unfused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/mk_unfused.html" title="make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/metafunctions.html b/libs/fusion/doc/html/fusion/functional/generation/metafunctions.html new file mode 100644 index 000000000..ca9056e00 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/metafunctions.html @@ -0,0 +1,50 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../generation.html" title="Generation"> +<link rel="prev" href="functions/mk_unfused.html" title="make_unfused"> +<link rel="next" href="metafunctions/mk_fused.html" title="make_fused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/mk_unfused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/mk_fused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.generation.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/mk_fused.html">make_fused</a></span></dt> +<dt><span class="section"><a href="metafunctions/mk_fused_proc.html">make_fused_procedure</a></span></dt> +<dt><span class="section"><a href="metafunctions/mk_fused_fobj.html">make_fused_function_object</a></span></dt> +<dt><span class="section"><a href="metafunctions/mk_unfused.html">make_unfused</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/mk_unfused.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/mk_fused.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused.html b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused.html new file mode 100644 index 000000000..0b378dbe7 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="mk_fused_proc.html" title="make_fused_procedure"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.metafunctions.mk_fused"></a><a class="link" href="mk_fused.html" title="make_fused">make_fused</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused.description"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.metafunctions.mk_fused.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a>. + </p> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused.header"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.metafunctions.mk_fused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused.synopsis"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.metafunctions.mk_fused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">make_fused</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused.see_also"></a></span><a class="link" href="mk_fused.html#fusion.functional.generation.metafunctions.mk_fused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../functions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html new file mode 100644 index 000000000..6868f2a22 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused_function_object</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="mk_fused_proc.html" title="make_fused_procedure"> +<link rel="next" href="mk_unfused.html" title="make_unfused"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_unfused.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.metafunctions.mk_fused_fobj"></a><a class="link" href="mk_fused_fobj.html" title="make_fused_function_object">make_fused_function_object</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_fobj.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_fobj.description"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.metafunctions.mk_fused_fobj.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a>. + </p> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_fobj.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_fobj.header"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.metafunctions.mk_fused_fobj.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_fobj.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_fobj.synopsis"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.metafunctions.mk_fused_fobj.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">make_fused_function_object</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_fobj.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_fobj.see_also"></a></span><a class="link" href="mk_fused_fobj.html#fusion.functional.generation.metafunctions.mk_fused_fobj.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_unfused.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html new file mode 100644 index 000000000..4c93542b9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_fused_procedure</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="mk_fused.html" title="make_fused"> +<link rel="next" href="mk_fused_fobj.html" title="make_fused_function_object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.metafunctions.mk_fused_proc"></a><a class="link" href="mk_fused_proc.html" title="make_fused_procedure">make_fused_procedure</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_proc.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_proc.description"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.metafunctions.mk_fused_proc.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a>. + </p> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_proc.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_proc.header"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.metafunctions.mk_fused_proc.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_proc.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_proc.synopsis"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.metafunctions.mk_fused_proc.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">make_fused_procedure</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_fused_proc.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_fused_proc.see_also"></a></span><a class="link" href="mk_fused_proc.html#fusion.functional.generation.metafunctions.mk_fused_proc.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../functions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html new file mode 100644 index 000000000..27a3a74af --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>make_unfused</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="mk_fused_fobj.html" title="make_fused_function_object"> +<link rel="next" href="../../../notes.html" title="Notes"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../notes.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.generation.metafunctions.mk_unfused"></a><a class="link" href="mk_unfused.html" title="make_unfused">make_unfused</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_unfused.h0"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_unfused.description"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.metafunctions.mk_unfused.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/mk_unfused.html" title="make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a>. + </p> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_unfused.h1"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_unfused.header"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.metafunctions.mk_unfused.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">generation</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_unfused.h2"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_unfused.synopsis"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.metafunctions.mk_unfused.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">make_unfused</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.generation.metafunctions.mk_unfused.h3"></a> + <span class="phrase"><a name="fusion.functional.generation.metafunctions.mk_unfused.see_also"></a></span><a class="link" href="mk_unfused.html#fusion.functional.generation.metafunctions.mk_unfused.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../functions/mk_unfused.html" title="make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../notes.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation.html b/libs/fusion/doc/html/fusion/functional/invocation.html new file mode 100644 index 000000000..1cada7b37 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation.html @@ -0,0 +1,49 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Invocation</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functional.html" title="Functional"> +<link rel="prev" href="concepts/poly.html" title="Polymorphic Function Object"> +<link rel="next" href="invocation/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/poly.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invocation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.functional.invocation"></a><a class="link" href="invocation.html" title="Invocation">Invocation</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="invocation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="invocation/metafunctions.html">Metafunctions</a></span></dt> +<dt><span class="section"><a href="invocation/limits.html">Limits</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/poly.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functional.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invocation/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/functions.html b/libs/fusion/doc/html/fusion/functional/invocation/functions.html new file mode 100644 index 000000000..21c071e19 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/functions.html @@ -0,0 +1,49 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../invocation.html" title="Invocation"> +<link rel="prev" href="../invocation.html" title="Invocation"> +<link rel="next" href="functions/invoke.html" title="invoke"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../invocation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/invoke.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.invocation.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/invoke.html">invoke</a></span></dt> +<dt><span class="section"><a href="functions/invoke_proc.html">invoke_procedure</a></span></dt> +<dt><span class="section"><a href="functions/invoke_fobj.html">invoke_function_object</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../invocation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/invoke.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke.html b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke.html new file mode 100644 index 000000000..42b5b37ab --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke.html @@ -0,0 +1,201 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="invoke_proc.html" title="invoke_procedure"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.functions.invoke"></a><a class="link" href="invoke.html" title="invoke">invoke</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.description"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.description">Description</a> + </h6> +<p> + Calls a <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> with the arguments from a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> +<p> + The first template parameter can be specialized explicitly to avoid copying + and/or to control the const qualification of a function object. + </p> +<p> + If the target function is a pointer to a class members, the corresponding + object can be specified as a reference, pointer, or smart pointer. In + case of the latter, a freestanding <code class="literal">get_pointer</code> function + must be defined (Boost provides this function for <code class="literal">std::auto_ptr</code> + and <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>). + </p> +<p> + Constructors can be called applying <a href="http://www.boost.org/libs/functional/factory/doc/html/index.html" target="_top">Boost.Functional/Factory</a>. + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.synopsis"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.parameters"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../../concepts/def_callable.html" title="Deferred Callable Object">Deferred + Callable Object</a> + </p> + </td> +<td> + <p> + The function to call. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h3"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.expression_semantics"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">invoke</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">s</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Return type of <code class="computeroutput"><span class="identifier">f</span></code> when invoked with the elements in + <code class="computeroutput"><span class="identifier">s</span></code> as its arguments. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Invokes <code class="computeroutput"><span class="identifier">f</span></code> + with the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as arguments and returns the result of the call expression. + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h4"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.header"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">invocation</span><span class="special">/</span><span class="identifier">invoke</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h5"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.example"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.example">Example</a> + </h6> +<pre class="programlisting"><a href="http://www.sgi.com/tech/stl/plus.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">plus</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">add</span><span class="special">;</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">invoke</span><span class="special">(</span><span class="identifier">add</span><span class="special">,</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">))</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke.h6"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke.see_also"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.functions.invoke.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../generation/functions/mk_fused.html" title="make_fused"><code class="computeroutput"><span class="identifier">make_fused</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_fobj.html b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_fobj.html new file mode 100644 index 000000000..ecdb93abb --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_fobj.html @@ -0,0 +1,213 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke_function_object</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="invoke_proc.html" title="invoke_procedure"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.functions.invoke_fobj"></a><a class="link" href="invoke_fobj.html" title="invoke_function_object">invoke_function_object</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.description"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.description">Description</a> + </h6> +<p> + Calls a <a class="link" href="../../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function + Object</a> with the arguments from a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> +<p> + The first template parameter can be specialized explicitly to avoid copying + and/or to control the const qualification of a function object. + </p> +<p> + Constructors can be called applying <a href="http://www.boost.org/libs/functional/factory/doc/html/index.html" target="_top">Boost.Functional/Factory</a>. + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.synopsis"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_function_object</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke_function_object</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_function_object</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke_function_object</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.parameters"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/poly.html" title="Polymorphic Function Object">Polymorphic + Function Object</a> + </p> + </td> +<td> + <p> + The function object to call. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h3"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.expression_semantics"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">invoke_function_object</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">s</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Return type of <code class="computeroutput"><span class="identifier">f</span></code> when invoked with the elements in + <code class="computeroutput"><span class="identifier">s</span></code> as its arguments. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Invokes <code class="computeroutput"><span class="identifier">f</span></code> + with the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as arguments and returns the result of the call expression. + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h4"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.header"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">invocation</span><span class="special">/</span><span class="identifier">invoke_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h5"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.example"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">sub</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sig</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Self</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special"><</span> <span class="identifier">Self</span><span class="special">(</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">T</span><span class="special">)</span> <span class="special">></span> + <span class="special">{</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span> <span class="special">};</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">lhs</span> <span class="special">-</span> <span class="identifier">rhs</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span> +<span class="special">{</span> + <span class="identifier">sub</span> <span class="identifier">f</span><span class="special">;</span> + <span class="identifier">assert</span><span class="special">(</span><span class="identifier">f</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">invoke_function_object</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">1</span><span class="special">)));</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_fobj.h6"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_fobj.see_also"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.functions.invoke_fobj.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_proc.html b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_proc.html new file mode 100644 index 000000000..7207eccdd --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/functions/invoke_proc.html @@ -0,0 +1,204 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke_procedure</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="invoke.html" title="invoke"> +<link rel="next" href="invoke_fobj.html" title="invoke_function_object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.functions.invoke_proc"></a><a class="link" href="invoke_proc.html" title="invoke_procedure">invoke_procedure</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.description"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.description">Description</a> + </h6> +<p> + Calls a <a class="link" href="../../concepts/callable.html" title="Callable Object">Callable + Object</a> with the arguments from a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + The result of the call is ignored. + </p> +<p> + The first template parameter can be specialized explicitly to avoid copying + and/or to control the const qualification of a function object. + </p> +<p> + For pointers to class members corresponding object can be specified as + a reference, pointer, or smart pointer. In case of the latter, a freestanding + <code class="literal">get_pointer</code> function must be defined (Boost provides + this function for <code class="literal">std::auto_ptr</code> and <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>). + </p> +<p> + The target function must not be a pointer to a member object (dereferencing + such a pointer without returning anything does not make sense, so it + isn't implemented). + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.synopsis"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_procedure</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke_procedure</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_procedure</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">invoke_procedure</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">Sequence</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.parameters"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/callable.html" title="Callable Object">Callable + Object</a> + </p> + </td> +<td> + <p> + The function to call. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The arguments. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h3"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.expression_semantics"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">invoke_procedure</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">s</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Invokes <code class="computeroutput"><span class="identifier">f</span></code> + with the elements in <code class="computeroutput"><span class="identifier">s</span></code> + as arguments. + </p> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h4"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.header"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">booost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">invocation</span><span class="special">/</span><span class="identifier">invoke_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h5"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.example"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">;</span> +<span class="identifier">invoke_procedure</span><span class="special">(</span><span class="identifier">_1</span> <span class="special">+=</span> <span class="identifier">_2</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="../../../sequence/intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.functional.invocation.functions.invoke_proc.h6"></a> + <span class="phrase"><a name="fusion.functional.invocation.functions.invoke_proc.see_also"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.functions.invoke_proc.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../metafunctions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../generation/functions/mk_fused_proc.html" title="make_fused_procedure"><code class="computeroutput"><span class="identifier">make_fused_procedure</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/limits.html b/libs/fusion/doc/html/fusion/functional/invocation/limits.html new file mode 100644 index 000000000..86db05222 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/limits.html @@ -0,0 +1,69 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Limits</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../invocation.html" title="Invocation"> +<link rel="prev" href="metafunctions/invoke_fobj.html" title="invoke_function_object"> +<link rel="next" href="../adapters.html" title="Adapters"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="metafunctions/invoke_fobj.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../adapters.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.invocation.limits"></a><a class="link" href="limits.html" title="Limits">Limits</a> +</h4></div></div></div> +<h6> +<a name="fusion.functional.invocation.limits.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.limits.header"></a></span><a class="link" href="limits.html#fusion.functional.invocation.limits.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">invocation</span><span class="special">/</span><span class="identifier">limits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.functional.invocation.limits.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.limits.macros"></a></span><a class="link" href="limits.html#fusion.functional.invocation.limits.macros">Macros</a> + </h6> +<p> + The following macros can be defined to change the maximum arity. The default + is 6. + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + BOOST_FUSION_INVOKE_MAX_ARITY + </li> +<li class="listitem"> + BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY + </li> +<li class="listitem"> + BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="metafunctions/invoke_fobj.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../adapters.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/metafunctions.html b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions.html new file mode 100644 index 000000000..89f3f8024 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions.html @@ -0,0 +1,49 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../invocation.html" title="Invocation"> +<link rel="prev" href="functions/invoke_fobj.html" title="invoke_function_object"> +<link rel="next" href="metafunctions/invoke.html" title="invoke"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/invoke_fobj.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/invoke.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.functional.invocation.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/invoke.html">invoke</a></span></dt> +<dt><span class="section"><a href="metafunctions/invoke_proc.html">invoke_procedure</a></span></dt> +<dt><span class="section"><a href="metafunctions/invoke_fobj.html">invoke_function_object</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/invoke_fobj.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../invocation.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/invoke.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke.html b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke.html new file mode 100644 index 000000000..b92b969b2 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke.html @@ -0,0 +1,80 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="invoke_proc.html" title="invoke_procedure"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.metafunctions.invoke"></a><a class="link" href="invoke.html" title="invoke">invoke</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke.description"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.metafunctions.invoke.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a>. + </p> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke.synopsis"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.metafunctions.invoke.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">invoke</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke.see_also"></a></span><a class="link" href="invoke.html#fusion.functional.invocation.metafunctions.invoke.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../functions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html new file mode 100644 index 000000000..1d51c9cd1 --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html @@ -0,0 +1,80 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke_function_object</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="invoke_proc.html" title="invoke_procedure"> +<link rel="next" href="../limits.html" title="Limits"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../limits.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.metafunctions.invoke_fobj"></a><a class="link" href="invoke_fobj.html" title="invoke_function_object">invoke_function_object</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_fobj.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_fobj.description"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.metafunctions.invoke_fobj.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a>. + </p> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_fobj.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_fobj.synopsis"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.metafunctions.invoke_fobj.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span> + <span class="keyword">class</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">invoke_function_object</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_fobj.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_fobj.see_also"></a></span><a class="link" href="invoke_fobj.html#fusion.functional.invocation.metafunctions.invoke_fobj.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../functions/invoke_fobj.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke_proc.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../limits.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html new file mode 100644 index 000000000..6e981988b --- /dev/null +++ b/libs/fusion/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html @@ -0,0 +1,80 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>invoke_procedure</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="invoke.html" title="invoke"> +<link rel="next" href="invoke_fobj.html" title="invoke_function_object"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.functional.invocation.metafunctions.invoke_proc"></a><a class="link" href="invoke_proc.html" title="invoke_procedure">invoke_procedure</a> +</h5></div></div></div> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_proc.h0"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_proc.description"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.metafunctions.invoke_proc.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a>. + </p> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_proc.h1"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_proc.synopsis"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.metafunctions.invoke_proc.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> + <span class="keyword">class</span> <span class="identifier">Sequence</span> + <span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">invoke_procedure</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h6> +<a name="fusion.functional.invocation.metafunctions.invoke_proc.h2"></a> + <span class="phrase"><a name="fusion.functional.invocation.metafunctions.invoke_proc.see_also"></a></span><a class="link" href="invoke_proc.html#fusion.functional.invocation.metafunctions.invoke_proc.see_also">See + also</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../functions/invoke_proc.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapters/fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="invoke.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="invoke_fobj.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/introduction.html b/libs/fusion/doc/html/fusion/introduction.html new file mode 100644 index 000000000..41aaa986e --- /dev/null +++ b/libs/fusion/doc/html/fusion/introduction.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Introduction</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="preface.html" title="Preface"> +<link rel="next" href="quick_start.html" title="Quick Start"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="preface.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="quick_start.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.introduction"></a><a class="link" href="introduction.html" title="Introduction">Introduction</a> +</h2></div></div></div> +<p> + An advantage other languages such as Python and Lisp/ Scheme, ML and Haskell, + etc., over C++ is the ability to have heterogeneous containers that can hold + arbitrary element types. All the containers in the standard library can only + hold a specific type. A <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code> + can only hold <code class="computeroutput"><span class="keyword">int</span></code>s. A <code class="computeroutput"><span class="identifier">list</span><span class="special"><</span><span class="identifier">X</span><span class="special">></span></code> can + only hold elements of type <code class="computeroutput"><span class="identifier">X</span></code>, + and so on. + </p> +<p> + True, you can use inheritance to make the containers hold different types, + related through subclassing. However, you have to hold the objects through + a pointer or smart reference of some sort. Doing this, you'll have to rely + on virtual functions to provide polymorphic behavior since the actual type + is erased as soon as you store a pointer to a derived class to a pointer to + its base. The held objects must be related: you cannot hold objects of unrelated + types such as <code class="computeroutput"><span class="keyword">char</span></code>, <code class="computeroutput"><span class="keyword">int</span></code>, <code class="computeroutput"><span class="keyword">class</span> + <span class="identifier">X</span></code>, <code class="computeroutput"><span class="keyword">float</span></code>, + etc. Oh sure you can use something like <a href="http://boost.org/doc/html/any.html" target="_top">Boost.Any</a> + to hold arbitrary types, but then you pay more in terms of runtime costs and + due to the fact that you practically erased all type information, you'll have + to perform dangerous casts to get back the original type. + </p> +<p> + The <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a> + library written by <a href="http://www.boost.org/people/jaakko_jarvi.htm" target="_top">Jaakko + Jarvi</a> provides heterogeneous containers in C++. The <code class="computeroutput"><span class="identifier">tuple</span></code> + is a basic data structure that can hold heterogeneous types. It's a good first + step, but it's not complete. What's missing are the algorithms. It's nice that + we can store and retrieve data to and from tuples, pass them around as arguments + and return types. As it is, the <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a> + facility is already very useful. Yet, as soon as you use it more often, usage + patterns emerge. Eventually, you collect these patterns into algorithm libraries. + </p> +<p> + Hmmm, kinda reminds us of STL right? Right! Can you imagine how it would be + like if you used STL without the algorithms? Everyone will have to reinvent + their own <span class="emphasis"><em>algorithm</em></span> wheels. + </p> +<p> + Fusion is a library and a framework similar to both <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + and the boost <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>. + The structure is modeled after <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, + which is modeled after <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>. + It is named "fusion" because the library is reminiscent of the "fusion" + of compile time meta-programming with runtime programming. The library inherently + has some interesting flavors and characteristics of both <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + and <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>. + It lives in the twilight zone between compile time meta-programming and run + time programming. <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + containers work on values. MPL containers work on types. Fusion containers + work on both types and values. + </p> +<p> + Unlike <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, Fusion + algorithms are lazy and non sequence-type preserving. What does that mean? + It means that when you operate on a sequence through a Fusion algorithm that + returns a sequence, the sequence returned may not be of the same class as the + original. This is by design. Runtime efficiency is given a high priority. Like + <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, and unlike + <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>, + fusion algorithms are functional in nature such that algorithms are non mutating + (no side effects). However, due to the high cost of returning full sequences + such as vectors and lists, <span class="emphasis"><em>Views</em></span> are returned from Fusion + algorithms instead. For example, the <a class="link" href="algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a> algorithm does not actually + return a transformed version of the original sequence. <a class="link" href="algorithm/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a> returns a <a class="link" href="view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a>. This view holds a + reference to the original sequence plus the transform function. Iteration over + the <a class="link" href="view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + will apply the transform function over the sequence elements on demand. This + <span class="emphasis"><em>lazy</em></span> evaluation scheme allows us to chain as many algorithms + as we want without incurring a high runtime penalty. + </p> +<p> + The <span class="emphasis"><em>lazy</em></span> evaluation scheme where algorithms return views + allows operations such as <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> to be totally generic. In + Fusion, <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> is actually a generic algorithm + that works on all sequences. Given an input sequence <code class="computeroutput"><span class="identifier">s</span></code> + and a value <code class="computeroutput"><span class="identifier">x</span></code>, Fusion's <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> algorithm simply returns + a <a class="link" href="view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a>: + a view that holds a reference to the original sequence <code class="computeroutput"><span class="identifier">s</span></code> + and the value <code class="computeroutput"><span class="identifier">x</span></code>. Functions + that were once sequence specific and need to be implemented N times over N + different sequences are now implemented only once. + </p> +<p> + Fusion provides full round compatibility with <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>. + Fusion sequences are fully conforming <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences and <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences are fully compatible with Fusion. You can work with Fusion sequences + on <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> if you + wish to work solely on types <a href="#ftn.fusion.introduction.f0" class="footnote" name="fusion.introduction.f0"><sup class="footnote">[1]</sup></a>. In <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, + Fusion sequences follow <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>'s + sequence-type preserving semantics (i.e. algorithms preserve the original sequence + type. e.g. transforming a vector returns a vector). You can also convert from + an <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> sequence + to a Fusion sequence. For example, there are times when it is convenient to + work solely on <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + using pure <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences, then, convert them to Fusion sequences as a final step before actual + instantiation of real runtime objects with data. You have the best of both + worlds. + </p> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.introduction.f0" class="footnote"><p><a href="#fusion.introduction.f0" class="para"><sup class="para">[1] </sup></a> + Choose <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + over fusion when doing pure type calculations. Once the static type calculation + is finished, you can instantiate a fusion sequence (see <a class="link" href="container/conversion/functions.html" title="Functions">Conversion</a>) + for the runtime part. + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="preface.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="quick_start.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator.html b/libs/fusion/doc/html/fusion/iterator.html new file mode 100644 index 000000000..fc4890608 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator.html @@ -0,0 +1,105 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Iterator</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="support/pair.html" title="pair"> +<link rel="next" href="iterator/concepts.html" title="Concepts"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="support/pair.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.iterator"></a><a class="link" href="iterator.html" title="Iterator">Iterator</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="iterator/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="iterator/concepts/forward_iterator.html">Forward + Iterator</a></span></dt> +<dt><span class="section"><a href="iterator/concepts/bidirectional_iterator.html">Bidirectional + Iterator</a></span></dt> +<dt><span class="section"><a href="iterator/concepts/random_access_iterator.html">Random + Access Iterator</a></span></dt> +<dt><span class="section"><a href="iterator/concepts/associative_iterator.html">Associative + Iterator</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="iterator/functions.html">Functions</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="iterator/functions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="iterator/functions/next.html">next</a></span></dt> +<dt><span class="section"><a href="iterator/functions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="iterator/functions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="iterator/functions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="iterator/functions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="iterator/functions/deref_data.html">deref_data</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="iterator/operator.html">Operator</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="iterator/operator/operator_unary_star.html">Operator + *</a></span></dt> +<dt><span class="section"><a href="iterator/operator/operator_equality.html">Operator + ==</a></span></dt> +<dt><span class="section"><a href="iterator/operator/operator_inequality.html">Operator + !=</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="iterator/metafunctions.html">Metafunctions</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="iterator/metafunctions/value_of.html">value_of</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/next.html">next</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/equal_to.html">equal_to</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/key_of.html">key_of</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/value_of_data.html">value_of_data</a></span></dt> +<dt><span class="section"><a href="iterator/metafunctions/deref_data.html">deref_data</a></span></dt> +</dl></dd> +</dl></div> +<p> + Like <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> and + <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>, + iterators are a fundamental concept in Fusion. As with <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + and <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + iterators describe positions, and provide access to data within an underlying + <a class="link" href="sequence.html" title="Sequence">Sequence</a>. + </p> +<h4> +<a name="fusion.iterator.h0"></a> + <span class="phrase"><a name="fusion.iterator.header"></a></span><a class="link" href="iterator.html#fusion.iterator.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="support/pair.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/concepts.html b/libs/fusion/doc/html/fusion/iterator/concepts.html new file mode 100644 index 000000000..49e00511a --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/concepts.html @@ -0,0 +1,66 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Concepts</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iterator.html" title="Iterator"> +<link rel="prev" href="../iterator.html" title="Iterator"> +<link rel="next" href="concepts/forward_iterator.html" title="Forward Iterator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/forward_iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.iterator.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="concepts/forward_iterator.html">Forward + Iterator</a></span></dt> +<dt><span class="section"><a href="concepts/bidirectional_iterator.html">Bidirectional + Iterator</a></span></dt> +<dt><span class="section"><a href="concepts/random_access_iterator.html">Random + Access Iterator</a></span></dt> +<dt><span class="section"><a href="concepts/associative_iterator.html">Associative + Iterator</a></span></dt> +</dl></div> +<p> + Fusion iterators are divided into different traversal categories. <a class="link" href="concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> is the most basic concept. <a class="link" href="concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> is a refinement of <a class="link" href="concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a>. <a class="link" href="concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> is a refinement of <a class="link" href="concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a>. <a class="link" href="concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> is a refinement of <a class="link" href="concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a>, <a class="link" href="concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> or <a class="link" href="concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/forward_iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/concepts/associative_iterator.html b/libs/fusion/doc/html/fusion/iterator/concepts/associative_iterator.html new file mode 100644 index 000000000..b78ce9827 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/concepts/associative_iterator.html @@ -0,0 +1,228 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Associative Iterator</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="random_access_iterator.html" title="Random Access Iterator"> +<link rel="next" href="../functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="random_access_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../functions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.concepts.associative_iterator"></a><a class="link" href="associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.concepts.associative_iterator.h0"></a> + <span class="phrase"><a name="fusion.iterator.concepts.associative_iterator.description"></a></span><a class="link" href="associative_iterator.html#fusion.iterator.concepts.associative_iterator.description">Description</a> + </h6> +<p> + An Associative Iterator provides additional semantics to obtain the properties + of the element of an associative forward, bidirectional or random access + sequence. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code></span></dt> +<dd><p> + Associative Iterator + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">I</span></code></span></dt> +<dd><p> + Associative Iterator type + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.iterator.concepts.associative_iterator.h1"></a> + <span class="phrase"><a name="fusion.iterator.concepts.associative_iterator.refinement_of"></a></span><a class="link" href="associative_iterator.html#fusion.iterator.concepts.associative_iterator.refinement_of">Refinement + of</a> + </h6> +<p> + <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward Iterator</a>, + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> or <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> +<h6> +<a name="fusion.iterator.concepts.associative_iterator.h2"></a> + <span class="phrase"><a name="fusion.iterator.concepts.associative_iterator.expression_requirements"></a></span><a class="link" href="associative_iterator.html#fusion.iterator.concepts.associative_iterator.expression_requirements">Expression + requirements</a> + </h6> +<p> + In addition to the requirements defined in <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a>, <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> or <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> the following expressions must be valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.associative_iterator.h3"></a> + <span class="phrase"><a name="fusion.iterator.concepts.associative_iterator.meta_expressions"></a></span><a class="link" href="associative_iterator.html#fusion.iterator.concepts.associative_iterator.meta_expressions">Meta + Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/key_of.html" title="key_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">key_of</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.associative_iterator.h4"></a> + <span class="phrase"><a name="fusion.iterator.concepts.associative_iterator.models"></a></span><a class="link" href="associative_iterator.html#fusion.iterator.concepts.associative_iterator.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a> + iterator (where adapted sequence is an <a class="link" href="../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> and a <a class="link" href="../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + iterator (where adapted iterators are <a class="link" href="associative_iterator.html" title="Associative Iterator">Associative + Iterator</a>s) + </li> +<li class="listitem"> + <a class="link" href="../../view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a> + iterator (where adapted sequences are <a class="link" href="../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>s and <a class="link" href="../../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>s) + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + iterator (where adapted sequence is an <a class="link" href="../../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> and a <a class="link" href="../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="random_access_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../functions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/concepts/bidirectional_iterator.html b/libs/fusion/doc/html/fusion/iterator/concepts/bidirectional_iterator.html new file mode 100644 index 000000000..a97035fa5 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/concepts/bidirectional_iterator.html @@ -0,0 +1,321 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Bidirectional Iterator</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="forward_iterator.html" title="Forward Iterator"> +<link rel="next" href="random_access_iterator.html" title="Random Access Iterator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="forward_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.concepts.bidirectional_iterator"></a><a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h0"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.description"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.description">Description</a> + </h6> +<p> + A Bidirectional Iterator traverses a <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + allowing movement in either direction one element at a time. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code></span></dt> +<dd><p> + A Bidirectional Iterator + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">I</span></code></span></dt> +<dd><p> + A Bidirectional Iterator type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">M</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + integral constant + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An integral constant + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h1"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.refinement_of"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.refinement_of">Refinement + of</a> + </h6> +<p> + <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward Iterator</a> + </p> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h2"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.expression_requirements"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.expression_requirements">Expression + requirements</a> + </h6> +<p> + In addition to the requirements defined in <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a>, the following expressions must be valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">M</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h3"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.meta_expressions"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.meta_expressions">Meta + Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h4"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.expression_semantics"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.expression_semantics">Expression + Semantics</a> + </h6> +<p> + The semantics of an expression are defined only where they differ from, + or are not defined in <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + An iterator to the element preceding <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h5"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.invariants"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.invariants">Invariants</a> + </h6> +<p> + In addition to the invariants of <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a>, the following invariants always hold: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">))</span> <span class="special">==</span> <span class="identifier">i</span> <span class="special">&&</span> + <a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">))</span> <span class="special">==</span> <a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">))</span></code> + </li> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><-</span><span class="number">1</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </li> +<li class="listitem"> + Using <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a></code> to traverse a + sequence will never return a previously seen position + </li> +</ul></div> +<h6> +<a name="fusion.iterator.concepts.bidirectional_iterator.h6"></a> + <span class="phrase"><a name="fusion.iterator.concepts.bidirectional_iterator.models"></a></span><a class="link" href="bidirectional_iterator.html#fusion.iterator.concepts.bidirectional_iterator.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + (where adapted sequence is a <a class="link" href="../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + (where adapted sequence is a <a class="link" href="../../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="forward_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/concepts/forward_iterator.html b/libs/fusion/doc/html/fusion/iterator/concepts/forward_iterator.html new file mode 100644 index 000000000..50c4511ea --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/concepts/forward_iterator.html @@ -0,0 +1,476 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Forward Iterator</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="../concepts.html" title="Concepts"> +<link rel="next" href="bidirectional_iterator.html" title="Bidirectional Iterator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.concepts.forward_iterator"></a><a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h0"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.description"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.description">Description</a> + </h6> +<p> + A Forward Iterator traverses a <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + allowing movement in only one direction through it's elements, one element + at a time. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code></span></dt> +<dd><p> + Forward Iterators + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">I</span></code>, <code class="computeroutput"><span class="identifier">J</span></code></span></dt> +<dd><p> + Forward Iterator types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">M</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + integral constant + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An integral constant + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h1"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.expression_requirements"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.expression_requirements">Expression + requirements</a> + </h6> +<p> + A type models Forward Iterator if, in addition to being CopyConstructable, + the following expressions are valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span> <span class="special">==</span> + <span class="identifier">j</span></code> + </p> + </td> +<td> + <p> + Convertible to bool + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span> <span class="special">!=</span> + <span class="identifier">j</span></code> + </p> + </td> +<td> + <p> + Convertible to bool + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">M</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">distance</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> + <span class="identifier">j</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> + <span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h2"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.meta_expressions"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.meta_expressions">Meta + Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> + <span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> + <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Linear + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">I</span> <span class="special">,</span><span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Linear + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">I</span> <span class="special">,</span><span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Linear + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h3"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.expression_semantics"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.expression_semantics">Expression + Semantics</a> + </h6> +<p> + [ table [[Expression] [Semantics]] [[<code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>] [An + iterator to the element following <code class="computeroutput"><span class="identifier">i</span></code>]] + [[<code class="computeroutput"><span class="identifier">i</span> <span class="special">==</span> + <span class="identifier">j</span></code>] [Iterator equality comparison]] + [[<code class="computeroutput"><span class="identifier">i</span> <span class="special">!=</span> + <span class="identifier">j</span></code>] [Iterator inequality comparison]] + [[<code class="computeroutput"><a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code>] [An + iterator n elements after <code class="computeroutput"><span class="identifier">i</span></code> + in the sequence]] [[<code class="computeroutput"><a class="link" href="../functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">M</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code>] [Equivalent + to <code class="computeroutput"><span class="identifier">advance_c</span><span class="special"><</span><span class="identifier">M</span><span class="special">::</span><span class="identifier">value</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code>]] [[<code class="computeroutput"><a class="link" href="../functions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">distance</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span><span class="special">)</span></code>] [The number of elements between <code class="computeroutput"><span class="identifier">i</span></code> and <code class="computeroutput"><span class="identifier">j</span></code>]] + [[<code class="computeroutput"><a class="link" href="../functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>] + [The element at position<code class="computeroutput"><span class="identifier">i</span></code>]] + [[<code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code>] + [Equivalent to <code class="computeroutput"><span class="identifier">deref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>]] + ] + </p> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h4"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.invariants"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.invariants">Invariants</a> + </h6> +<p> + The following invariants always hold: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <code class="computeroutput"><span class="special">!(</span><span class="identifier">i</span> + <span class="special">==</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">==</span> <span class="special">(</span><span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">j</span><span class="special">)</span></code> + </li> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </li> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../functions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">distance</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">))</span> <span class="special">==</span> <span class="identifier">N</span></code> + </li> +<li class="listitem"> + Using <code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a></code> to traverse the + sequence will never return to a previously seen position + </li> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + is equivalent to <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code> + </li> +<li class="listitem"> + If <code class="computeroutput"><span class="identifier">i</span> <span class="special">==</span> + <span class="identifier">j</span></code> then <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code> is equivalent to <code class="computeroutput"><span class="special">*</span><span class="identifier">j</span></code> + </li> +</ul></div> +<h6> +<a name="fusion.iterator.concepts.forward_iterator.h5"></a> + <span class="phrase"><a name="fusion.iterator.concepts.forward_iterator.models"></a></span><a class="link" href="forward_iterator.html#fusion.iterator.concepts.forward_iterator.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + iterator + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/concepts/random_access_iterator.html b/libs/fusion/doc/html/fusion/iterator/concepts/random_access_iterator.html new file mode 100644 index 000000000..64ac50d96 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/concepts/random_access_iterator.html @@ -0,0 +1,292 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Random Access Iterator</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="bidirectional_iterator.html" title="Bidirectional Iterator"> +<link rel="next" href="associative_iterator.html" title="Associative Iterator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="bidirectional_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="associative_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.concepts.random_access_iterator"></a><a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.concepts.random_access_iterator.h0"></a> + <span class="phrase"><a name="fusion.iterator.concepts.random_access_iterator.description"></a></span><a class="link" href="random_access_iterator.html#fusion.iterator.concepts.random_access_iterator.description">Description</a> + </h6> +<p> + A Random Access Iterator traverses a <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + moving in either direction, permitting efficient arbitrary distance movements + back and forward through the sequence. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code></span></dt> +<dd><p> + Random Access Iterators + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">I</span></code>, <code class="computeroutput"><span class="identifier">J</span></code></span></dt> +<dd><p> + Random Access Iterator types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">M</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + integral constant + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An integral constant + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.iterator.concepts.random_access_iterator.h1"></a> + <span class="phrase"><a name="fusion.iterator.concepts.random_access_iterator.refinement_of"></a></span><a class="link" href="random_access_iterator.html#fusion.iterator.concepts.random_access_iterator.refinement_of">Refinement + of</a> + </h6> +<p> + <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> +<h6> +<a name="fusion.iterator.concepts.random_access_iterator.h2"></a> + <span class="phrase"><a name="fusion.iterator.concepts.random_access_iterator.expression_requirements"></a></span><a class="link" href="random_access_iterator.html#fusion.iterator.concepts.random_access_iterator.expression_requirements">Expression + requirements</a> + </h6> +<p> + In addition to the requirements defined in <a class="link" href="bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a>, the following expressions must be valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">M</span><span class="special">>(</span><span class="identifier">i</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.random_access_iterator.h3"></a> + <span class="phrase"><a name="fusion.iterator.concepts.random_access_iterator.meta_expressions"></a></span><a class="link" href="random_access_iterator.html#fusion.iterator.concepts.random_access_iterator.meta_expressions">Meta + Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> + <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> + <span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../metafunctions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">I</span> <span class="special">,</span><span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.iterator.concepts.random_access_iterator.h4"></a> + <span class="phrase"><a name="fusion.iterator.concepts.random_access_iterator.models"></a></span><a class="link" href="random_access_iterator.html#fusion.iterator.concepts.random_access_iterator.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + iterator + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + iterator (where adapted sequence is a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + iterator (where adapted sequence is a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + iterator (where adapted sequence is a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="bidirectional_iterator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="associative_iterator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions.html b/libs/fusion/doc/html/fusion/iterator/functions.html new file mode 100644 index 000000000..39793b728 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions.html @@ -0,0 +1,58 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iterator.html" title="Iterator"> +<link rel="prev" href="concepts/associative_iterator.html" title="Associative Iterator"> +<link rel="next" href="functions/deref.html" title="deref"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/associative_iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/deref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.iterator.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="functions/next.html">next</a></span></dt> +<dt><span class="section"><a href="functions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="functions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="functions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="functions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="functions/deref_data.html">deref_data</a></span></dt> +</dl></div> +<p> + Fusion provides functions for manipulating iterators, analogous to the similar + functions from the <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + library. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/associative_iterator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/deref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/advance.html b/libs/fusion/doc/html/fusion/iterator/functions/advance.html new file mode 100644 index 000000000..7f0fadc88 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/advance.html @@ -0,0 +1,161 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>advance</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="distance.html" title="distance"> +<link rel="next" href="advance_c.html" title="advance_c"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="distance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance_c.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.advance"></a><a class="link" href="advance.html" title="advance">advance</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.advance.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance.description"></a></span><a class="link" href="advance.html#fusion.iterator.functions.advance.description">Description</a> + </h6> +<p> + Moves an iterator by a specified distance. + </p> +<h6> +<a name="fusion.iterator.functions.advance.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance.synopsis"></a></span><a class="link" href="advance.html#fusion.iterator.functions.advance.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">M</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">advance</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.advance.t0"></a><p class="title"><b>Table 1.6. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator to move relative to + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + Number of positions to move + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.advance.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance.expression_semantics"></a></span><a class="link" href="advance.html#fusion.iterator.functions.advance.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">M</span><span class="special">>(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + element <code class="computeroutput"><span class="identifier">M</span></code> positions from + <code class="computeroutput"><span class="identifier">i</span></code>. If <code class="computeroutput"><span class="identifier">i</span></code> + is a <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> then <code class="computeroutput"><span class="identifier">M</span></code> + may be negative. + </p> +<h6> +<a name="fusion.iterator.functions.advance.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance.header"></a></span><a class="link" href="advance.html#fusion.iterator.functions.advance.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.advance.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance.example"></a></span><a class="link" href="advance.html#fusion.iterator.functions.advance.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="number">2</span><span class="special">></span> <span class="special">>(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="distance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance_c.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/advance_c.html b/libs/fusion/doc/html/fusion/iterator/functions/advance_c.html new file mode 100644 index 000000000..74b5f3ed0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/advance_c.html @@ -0,0 +1,160 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>advance_c</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="advance.html" title="advance"> +<link rel="next" href="deref_data.html" title="deref_data"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.advance_c"></a><a class="link" href="advance_c.html" title="advance_c">advance_c</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.advance_c.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance_c.description"></a></span><a class="link" href="advance_c.html#fusion.iterator.functions.advance_c.description">Description</a> + </h6> +<p> + Moves an iterator by a specified distance. + </p> +<h6> +<a name="fusion.iterator.functions.advance_c.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance_c.synopsis"></a></span><a class="link" href="advance_c.html#fusion.iterator.functions.advance_c.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">int</span> <span class="identifier">N</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">advance_c</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.advance_c.t0"></a><p class="title"><b>Table 1.7. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator to move relative to + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + Integer constant + </p> + </td> +<td> + <p> + Number of positions to move + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.advance_c.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance_c.expression_semantics"></a></span><a class="link" href="advance_c.html#fusion.iterator.functions.advance_c.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + element <code class="computeroutput"><span class="identifier">N</span></code> positions from + <code class="computeroutput"><span class="identifier">i</span></code>. If <code class="computeroutput"><span class="identifier">i</span></code> + is a <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> then <code class="computeroutput"><span class="identifier">N</span></code> + may be negative. + </p> +<h6> +<a name="fusion.iterator.functions.advance_c.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance_c.header"></a></span><a class="link" href="advance_c.html#fusion.iterator.functions.advance_c.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.advance_c.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.advance_c.example"></a></span><a class="link" href="advance_c.html#fusion.iterator.functions.advance_c.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/deref.html b/libs/fusion/doc/html/fusion/iterator/functions/deref.html new file mode 100644 index 000000000..c9af47cae --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/deref.html @@ -0,0 +1,138 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deref</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="next.html" title="next"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="next.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.deref"></a><a class="link" href="deref.html" title="deref">deref</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.deref.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref.description"></a></span><a class="link" href="deref.html#fusion.iterator.functions.deref.description">Description</a> + </h6> +<p> + Deferences an iterator. + </p> +<h6> +<a name="fusion.iterator.functions.deref.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref.synopsis"></a></span><a class="link" href="deref.html#fusion.iterator.functions.deref.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">deref</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.deref.t0"></a><p class="title"><b>Table 1.2. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.deref.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref.expression_semantics"></a></span><a class="link" href="deref.html#fusion.iterator.functions.deref.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Dereferences the iterator + <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<h6> +<a name="fusion.iterator.functions.deref.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref.header"></a></span><a class="link" href="deref.html#fusion.iterator.functions.deref.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.deref.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref.example"></a></span><a class="link" href="deref.html#fusion.iterator.functions.deref.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="keyword">int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">0</span><span class="special">);</span> +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="identifier">i</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(&(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))))</span> <span class="special">==</span> <span class="special">&</span><span class="identifier">i</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="next.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/deref_data.html b/libs/fusion/doc/html/fusion/iterator/functions/deref_data.html new file mode 100644 index 000000000..843f878f9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/deref_data.html @@ -0,0 +1,138 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deref_data</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="advance_c.html" title="advance_c"> +<link rel="next" href="../operator.html" title="Operator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance_c.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../operator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.deref_data"></a><a class="link" href="deref_data.html" title="deref_data">deref_data</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.deref_data.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref_data.description"></a></span><a class="link" href="deref_data.html#fusion.iterator.functions.deref_data.description">Description</a> + </h6> +<p> + Deferences the data property associated with the element referenced by + an associative iterator. + </p> +<h6> +<a name="fusion.iterator.functions.deref_data.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref_data.synopsis"></a></span><a class="link" href="deref_data.html#fusion.iterator.functions.deref_data.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">deref</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.deref_data.t0"></a><p class="title"><b>Table 1.8. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.deref_data.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref_data.expression_semantics"></a></span><a class="link" href="deref_data.html#fusion.iterator.functions.deref_data.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><a class="link" href="../metafunctions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Dereferences the data property + associated with the element referenced by an associative iterator <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<h6> +<a name="fusion.iterator.functions.deref_data.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref_data.header"></a></span><a class="link" href="deref_data.html#fusion.iterator.functions.deref_data.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">deref_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deref_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.deref_data.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.deref_data.example"></a></span><a class="link" href="deref_data.html#fusion.iterator.functions.deref_data.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">int</span><span class="special">&></span> <span class="special">></span> <span class="identifier">map</span><span class="special">;</span> + +<span class="keyword">int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">0</span><span class="special">);</span> +<span class="identifier">map</span> <span class="identifier">m</span><span class="special">(</span><span class="number">1.0f</span><span class="special">,</span><span class="identifier">i</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">m</span><span class="special">))</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(&(</span><a class="link" href="deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">m</span><span class="special">)))</span> <span class="special">==</span> <span class="special">&</span><span class="identifier">i</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance_c.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../operator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/distance.html b/libs/fusion/doc/html/fusion/iterator/functions/distance.html new file mode 100644 index 000000000..842a612e3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/distance.html @@ -0,0 +1,136 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>distance</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="prior.html" title="prior"> +<link rel="next" href="advance.html" title="advance"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="prior.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.distance"></a><a class="link" href="distance.html" title="distance">distance</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.distance.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.distance.description"></a></span><a class="link" href="distance.html#fusion.iterator.functions.distance.description">Description</a> + </h6> +<p> + Returns the distance between 2 iterators. + </p> +<h6> +<a name="fusion.iterator.functions.distance.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.distance.synopsis"></a></span><a class="link" href="distance.html#fusion.iterator.functions.distance.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">J</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">J</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">j</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.distance.t0"></a><p class="title"><b>Table 1.5. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code> + </p> + </td> +<td> + <p> + Models of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> into the same sequence + </p> + </td> +<td> + <p> + The start and end points of the distance to be measured + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.distance.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.distance.expression_semantics"></a></span><a class="link" href="distance.html#fusion.iterator.functions.distance.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="distance.html" title="distance"><code class="computeroutput"><span class="identifier">distance</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">,</span><span class="identifier">j</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">int</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the distance between + iterators <code class="computeroutput"><span class="identifier">i</span></code> and <code class="computeroutput"><span class="identifier">j</span></code>. + </p> +<h6> +<a name="fusion.iterator.functions.distance.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.distance.header"></a></span><a class="link" href="distance.html#fusion.iterator.functions.distance.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.distance.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.distance.example"></a></span><a class="link" href="distance.html#fusion.iterator.functions.distance.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="distance.html" title="distance"><code class="computeroutput"><span class="identifier">distance</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">),</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))))</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="prior.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/next.html b/libs/fusion/doc/html/fusion/iterator/functions/next.html new file mode 100644 index 000000000..e84d22486 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/next.html @@ -0,0 +1,138 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>next</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="deref.html" title="deref"> +<link rel="next" href="prior.html" title="prior"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deref.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="prior.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.next"></a><a class="link" href="next.html" title="next">next</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.next.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.next.description"></a></span><a class="link" href="next.html#fusion.iterator.functions.next.description">Description</a> + </h6> +<p> + Moves an iterator 1 position forwards. + </p> +<h6> +<a name="fusion.iterator.functions.next.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.next.synopsis"></a></span><a class="link" href="next.html#fusion.iterator.functions.next.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">next</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.next.t0"></a><p class="title"><b>Table 1.3. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.next.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.next.expression_semantics"></a></span><a class="link" href="next.html#fusion.iterator.functions.next.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">next</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + next element after <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<h6> +<a name="fusion.iterator.functions.next.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.next.header"></a></span><a class="link" href="next.html#fusion.iterator.functions.next.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">next</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">next</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.next.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.next.example"></a></span><a class="link" href="next.html#fusion.iterator.functions.next.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))))</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deref.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="prior.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/functions/prior.html b/libs/fusion/doc/html/fusion/iterator/functions/prior.html new file mode 100644 index 000000000..b198ddf31 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/functions/prior.html @@ -0,0 +1,137 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>prior</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="next.html" title="next"> +<link rel="next" href="distance.html" title="distance"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="next.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.functions.prior"></a><a class="link" href="prior.html" title="prior">prior</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.functions.prior.h0"></a> + <span class="phrase"><a name="fusion.iterator.functions.prior.description"></a></span><a class="link" href="prior.html#fusion.iterator.functions.prior.description">Description</a> + </h6> +<p> + Moves an iterator 1 position backwards. + </p> +<h6> +<a name="fusion.iterator.functions.prior.h1"></a> + <span class="phrase"><a name="fusion.iterator.functions.prior.synopsis"></a></span><a class="link" href="prior.html#fusion.iterator.functions.prior.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">prior</span><span class="special">(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.functions.prior.t0"></a><p class="title"><b>Table 1.4. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.functions.prior.h2"></a> + <span class="phrase"><a name="fusion.iterator.functions.prior.expression_semantics"></a></span><a class="link" href="prior.html#fusion.iterator.functions.prior.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + element prior to <code class="computeroutput"><span class="identifier">i</span></code>. + </p> +<h6> +<a name="fusion.iterator.functions.prior.h3"></a> + <span class="phrase"><a name="fusion.iterator.functions.prior.header"></a></span><a class="link" href="prior.html#fusion.iterator.functions.prior.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">prior</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">prior</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.functions.prior.h4"></a> + <span class="phrase"><a name="fusion.iterator.functions.prior.example"></a></span><a class="link" href="prior.html#fusion.iterator.functions.prior.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))))</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="next.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions.html b/libs/fusion/doc/html/fusion/iterator/metafunctions.html new file mode 100644 index 000000000..fb7427626 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions.html @@ -0,0 +1,57 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iterator.html" title="Iterator"> +<link rel="prev" href="operator/operator_inequality.html" title="Operator !="> +<link rel="next" href="metafunctions/value_of.html" title="value_of"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator/operator_inequality.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/value_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.iterator.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/value_of.html">value_of</a></span></dt> +<dt><span class="section"><a href="metafunctions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="metafunctions/next.html">next</a></span></dt> +<dt><span class="section"><a href="metafunctions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="metafunctions/equal_to.html">equal_to</a></span></dt> +<dt><span class="section"><a href="metafunctions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="metafunctions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="metafunctions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="metafunctions/key_of.html">key_of</a></span></dt> +<dt><span class="section"><a href="metafunctions/value_of_data.html">value_of_data</a></span></dt> +<dt><span class="section"><a href="metafunctions/deref_data.html">deref_data</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator/operator_inequality.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/value_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/advance.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/advance.html new file mode 100644 index 000000000..4c2172bdf --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/advance.html @@ -0,0 +1,165 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>advance</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="distance.html" title="distance"> +<link rel="next" href="advance_c.html" title="advance_c"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="distance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance_c.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.advance"></a><a class="link" href="advance.html" title="advance">advance</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.advance.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance.description"></a></span><a class="link" href="advance.html#fusion.iterator.metafunctions.advance.description">Description</a> + </h6> +<p> + Moves an iterator a specified distance. + </p> +<h6> +<a name="fusion.iterator.metafunctions.advance.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance.synopsis"></a></span><a class="link" href="advance.html#fusion.iterator.metafunctions.advance.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">M</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">advance</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.advance.t0"></a><p class="title"><b>Table 1.18. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator to move relative to + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span></code> + </p> + </td> +<td> + <p> + Model of <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + Number of positions to move + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.advance.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance.expression_semantics"></a></span><a class="link" href="advance.html#fusion.iterator.metafunctions.advance.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator a distance + <code class="computeroutput"><span class="identifier">M</span></code> from <code class="computeroutput"><span class="identifier">I</span></code>. + If <code class="computeroutput"><span class="identifier">I</span></code> is a <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> then <code class="computeroutput"><span class="identifier">M</span></code> + may be negative. + </p> +<h6> +<a name="fusion.iterator.metafunctions.advance.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance.header"></a></span><a class="link" href="advance.html#fusion.iterator.metafunctions.advance.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.advance.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance.example"></a></span><a class="link" href="advance.html#fusion.iterator.metafunctions.advance.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">third</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><a class="link" href="advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="number">2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">third</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="distance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance_c.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/advance_c.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/advance_c.html new file mode 100644 index 000000000..90e1983c8 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/advance_c.html @@ -0,0 +1,164 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>advance_c</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="advance.html" title="advance"> +<link rel="next" href="key_of.html" title="key_of"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="key_of.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.advance_c"></a><a class="link" href="advance_c.html" title="advance_c">advance_c</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.advance_c.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance_c.description"></a></span><a class="link" href="advance_c.html#fusion.iterator.metafunctions.advance_c.description">Description</a> + </h6> +<p> + Moves an iterator by a specified distance. + </p> +<h6> +<a name="fusion.iterator.metafunctions.advance_c.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance_c.synopsis"></a></span><a class="link" href="advance_c.html#fusion.iterator.metafunctions.advance_c.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">int</span> <span class="identifier">N</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">advance_c</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.advance_c.t0"></a><p class="title"><b>Table 1.19. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Iterator to move relative to + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + Integer constant + </p> + </td> +<td> + <p> + Number of positions to move + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.advance_c.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance_c.expression_semantics"></a></span><a class="link" href="advance_c.html#fusion.iterator.metafunctions.advance_c.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator a distance + <code class="computeroutput"><span class="identifier">N</span></code> from <code class="computeroutput"><span class="identifier">I</span></code>. + If <code class="computeroutput"><span class="identifier">I</span></code> is a <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> then <code class="computeroutput"><span class="identifier">N</span></code> + may be negative. Equivalent to <code class="computeroutput"><a class="link" href="advance.html" title="advance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.advance_c.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance_c.header"></a></span><a class="link" href="advance_c.html#fusion.iterator.metafunctions.advance_c.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.advance_c.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.advance_c.example"></a></span><a class="link" href="advance_c.html#fusion.iterator.metafunctions.advance_c.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">third</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><a class="link" href="advance_c.html" title="advance_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">advance_c</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span> <span class="number">2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">third</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="key_of.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/deref.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/deref.html new file mode 100644 index 000000000..a9a46f8fa --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/deref.html @@ -0,0 +1,144 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deref</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="value_of.html" title="value_of"> +<link rel="next" href="next.html" title="next"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_of.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="next.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.deref"></a><a class="link" href="deref.html" title="deref">deref</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.deref.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref.description"></a></span><a class="link" href="deref.html#fusion.iterator.metafunctions.deref.description">Description</a> + </h6> +<p> + Returns the type that will be returned by dereferencing an iterator. + </p> +<h6> +<a name="fusion.iterator.metafunctions.deref.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref.synposis"></a></span><a class="link" href="deref.html#fusion.iterator.metafunctions.deref.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">deref</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.deref.t0"></a><p class="title"><b>Table 1.13. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.deref.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref.expression_semantics"></a></span><a class="link" href="deref.html#fusion.iterator.metafunctions.deref.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of dereferencing + an iterator of type <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.deref.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref.header"></a></span><a class="link" href="deref.html#fusion.iterator.metafunctions.deref.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.deref.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref.example"></a></span><a class="link" href="deref.html#fusion.iterator.metafunctions.deref.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">vec</span> <span class="identifier">const_vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> + +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">const_vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">const_first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">const_first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">const_second</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_of.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="next.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/deref_data.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/deref_data.html new file mode 100644 index 000000000..b0a52ffac --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/deref_data.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deref_data</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="value_of_data.html" title="value_of_data"> +<link rel="next" href="../../sequence.html" title="Sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_of_data.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.deref_data"></a><a class="link" href="deref_data.html" title="deref_data">deref_data</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.deref_data.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref_data.description"></a></span><a class="link" href="deref_data.html#fusion.iterator.metafunctions.deref_data.description">Description</a> + </h6> +<p> + Returns the type that will be returned by dereferencing the data property + referenced by an associative iterator. + </p> +<h6> +<a name="fusion.iterator.metafunctions.deref_data.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref_data.synposis"></a></span><a class="link" href="deref_data.html#fusion.iterator.metafunctions.deref_data.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">deref_data</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.deref_data.t0"></a><p class="title"><b>Table 1.22. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.deref_data.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref_data.expression_semantics"></a></span><a class="link" href="deref_data.html#fusion.iterator.metafunctions.deref_data.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of dereferencing + the data property referenced by an associative iterator of type <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.deref_data.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref_data.header"></a></span><a class="link" href="deref_data.html#fusion.iterator.metafunctions.deref_data.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boosta</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">deref_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deref_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.deref_data.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.deref_data.example"></a></span><a class="link" href="deref_data.html#fusion.iterator.metafunctions.deref_data.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">map</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref_data</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_of_data.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/distance.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/distance.html new file mode 100644 index 000000000..34c7474cf --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/distance.html @@ -0,0 +1,144 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>distance</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="equal_to.html" title="equal_to"> +<link rel="next" href="advance.html" title="advance"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="equal_to.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.distance"></a><a class="link" href="distance.html" title="distance">distance</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.distance.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.distance.description"></a></span><a class="link" href="distance.html#fusion.iterator.metafunctions.distance.description">Description</a> + </h6> +<p> + Returns the distance between two iterators. + </p> +<h6> +<a name="fusion.iterator.metafunctions.distance.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.distance.synopsis"></a></span><a class="link" href="distance.html#fusion.iterator.metafunctions.distance.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">J</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">distance</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.distance.t0"></a><p class="title"><b>Table 1.17. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code>, <code class="computeroutput"><span class="identifier">J</span></code> + </p> + </td> +<td> + <p> + Models of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> into the same sequence + </p> + </td> +<td> + <p> + The start and end points of the distance to be measured + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.distance.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.distance.expression_semantics"></a></span><a class="link" href="distance.html#fusion.iterator.metafunctions.distance.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the distance between + iterators of types <code class="computeroutput"><span class="identifier">I</span></code> and + <code class="computeroutput"><span class="identifier">J</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.distance.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.distance.header"></a></span><a class="link" href="distance.html#fusion.iterator.metafunctions.distance.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.distance.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.distance.example"></a></span><a class="link" href="distance.html#fusion.iterator.metafunctions.distance.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">third</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="distance.html" title="distance"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">distance</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span><span class="identifier">third</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">dist</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT_RELATION</span><span class="special">(</span><span class="identifier">dist</span><span class="special">::</span><span class="identifier">value</span><span class="special">,</span> <span class="special">==,</span> <span class="number">2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="equal_to.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="advance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/equal_to.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/equal_to.html new file mode 100644 index 000000000..4674f19f0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/equal_to.html @@ -0,0 +1,143 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>equal_to</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="prior.html" title="prior"> +<link rel="next" href="distance.html" title="distance"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="prior.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.equal_to"></a><a class="link" href="equal_to.html" title="equal_to">equal_to</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.equal_to.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.equal_to.description"></a></span><a class="link" href="equal_to.html#fusion.iterator.metafunctions.equal_to.description">Description</a> + </h6> +<p> + Returns a true-valued <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> if <code class="computeroutput"><span class="identifier">I</span></code> + and <code class="computeroutput"><span class="identifier">J</span></code> are equal. + </p> +<h6> +<a name="fusion.iterator.metafunctions.equal_to.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.equal_to.synopsis"></a></span><a class="link" href="equal_to.html#fusion.iterator.metafunctions.equal_to.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">J</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">equal_to</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.equal_to.t0"></a><p class="title"><b>Table 1.16. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code>, <code class="computeroutput"><span class="identifier">J</span></code> + </p> + </td> +<td> + <p> + Any fusion iterators + </p> + </td> +<td> + <p> + Operation's arguments + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.equal_to.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.equal_to.expression_semantics"></a></span><a class="link" href="equal_to.html#fusion.iterator.metafunctions.equal_to.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">J</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if <code class="computeroutput"><span class="identifier">I</span></code> and <code class="computeroutput"><span class="identifier">J</span></code> are iterators to the same position. + Returns <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> otherwise. + </p> +<h6> +<a name="fusion.iterator.metafunctions.equal_to.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.equal_to.header"></a></span><a class="link" href="equal_to.html#fusion.iterator.metafunctions.equal_to.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.equal_to.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.equal_to.example"></a></span><a class="link" href="equal_to.html#fusion.iterator.metafunctions.equal_to.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">last</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">first</span><span class="special">>));</span> +<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span><a class="link" href="equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span><span class="identifier">last</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="prior.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distance.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/key_of.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/key_of.html new file mode 100644 index 000000000..6b970adde --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/key_of.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>key_of</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="advance_c.html" title="advance_c"> +<link rel="next" href="value_of_data.html" title="value_of_data"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance_c.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_of_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.key_of"></a><a class="link" href="key_of.html" title="key_of">key_of</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.key_of.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.key_of.description"></a></span><a class="link" href="key_of.html#fusion.iterator.metafunctions.key_of.description">Description</a> + </h6> +<p> + Returns the key type associated with the element referenced by an associative + iterator. + </p> +<h6> +<a name="fusion.iterator.metafunctions.key_of.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.key_of.synopsis"></a></span><a class="link" href="key_of.html#fusion.iterator.metafunctions.key_of.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">key_of</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.key_of.t0"></a><p class="title"><b>Table 1.20. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.key_of.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.key_of.expression_semantics"></a></span><a class="link" href="key_of.html#fusion.iterator.metafunctions.key_of.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="key_of.html" title="key_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">key_of</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the key type associated + with the element referenced by an associative iterator <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.key_of.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.key_of.header"></a></span><a class="link" href="key_of.html#fusion.iterator.metafunctions.key_of.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">key_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">key_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.key_of.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.key_of.example"></a></span><a class="link" href="key_of.html#fusion.iterator.metafunctions.key_of.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="key_of.html" title="key_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">key_of</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">float</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="advance_c.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_of_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/next.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/next.html new file mode 100644 index 000000000..fcec06881 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/next.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>next</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="deref.html" title="deref"> +<link rel="next" href="prior.html" title="prior"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deref.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="prior.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.next"></a><a class="link" href="next.html" title="next">next</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.next.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.next.description"></a></span><a class="link" href="next.html#fusion.iterator.metafunctions.next.description">Description</a> + </h6> +<p> + Returns the type of the next iterator in a sequence. + </p> +<h6> +<a name="fusion.iterator.metafunctions.next.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.next.synposis"></a></span><a class="link" href="next.html#fusion.iterator.metafunctions.next.synposis">Synposis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">next</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.next.t0"></a><p class="title"><b>Table 1.14. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.next.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.next.expression_semantics"></a></span><a class="link" href="next.html#fusion.iterator.metafunctions.next.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + next element in the sequence after <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.next.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.next.header"></a></span><a class="link" href="next.html#fusion.iterator.metafunctions.next.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">next</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">next</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.next.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.next.example"></a></span><a class="link" href="next.html#fusion.iterator.metafunctions.next.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deref.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="prior.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/prior.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/prior.html new file mode 100644 index 000000000..ae866a9d6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/prior.html @@ -0,0 +1,142 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>prior</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="next.html" title="next"> +<link rel="next" href="equal_to.html" title="equal_to"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="next.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="equal_to.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.prior"></a><a class="link" href="prior.html" title="prior">prior</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.prior.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.prior.description"></a></span><a class="link" href="prior.html#fusion.iterator.metafunctions.prior.description">Description</a> + </h6> +<p> + Returns the type of the previous iterator in a sequence. + </p> +<h6> +<a name="fusion.iterator.metafunctions.prior.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.prior.synopsis"></a></span><a class="link" href="prior.html#fusion.iterator.metafunctions.prior.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">prior</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.prior.t0"></a><p class="title"><b>Table 1.15. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.prior.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.prior.expression_semantics"></a></span><a class="link" href="prior.html#fusion.iterator.metafunctions.prior.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: A model of the same iterator + concept as <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator to the + previous element in the sequence before <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.prior.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.prior.header"></a></span><a class="link" href="prior.html#fusion.iterator.metafunctions.prior.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">prior</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">prior</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.prior.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.prior.example"></a></span><a class="link" href="prior.html#fusion.iterator.metafunctions.prior.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">double</span><span class="special">>));</span> + +<span class="keyword">typedef</span> <a class="link" href="prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="next.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="equal_to.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of.html new file mode 100644 index 000000000..71c6dc6f9 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of.html @@ -0,0 +1,142 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>value_of</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="deref.html" title="deref"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.value_of"></a><a class="link" href="value_of.html" title="value_of">value_of</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.value_of.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of.description"></a></span><a class="link" href="value_of.html#fusion.iterator.metafunctions.value_of.description">Description</a> + </h6> +<p> + Returns the type stored at the position of an iterator. + </p> +<h6> +<a name="fusion.iterator.metafunctions.value_of.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of.synopsis"></a></span><a class="link" href="value_of.html#fusion.iterator.metafunctions.value_of.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_of</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.value_of.t0"></a><p class="title"><b>Table 1.12. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.value_of.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of.expression_semantics"></a></span><a class="link" href="value_of.html#fusion.iterator.metafunctions.value_of.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the type stored in + a sequence at iterator position <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.value_of.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of.header"></a></span><a class="link" href="value_of.html#fusion.iterator.metafunctions.value_of.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">value_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">value_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.value_of.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of.example"></a></span><a class="link" href="value_of.html#fusion.iterator.metafunctions.value_of.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&,</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">&></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">second</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">third</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">second</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a><span class="special"><</span><span class="identifier">third</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">int</span><span class="special">&>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of_data.html b/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of_data.html new file mode 100644 index 000000000..8c2263c1e --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/metafunctions/value_of_data.html @@ -0,0 +1,140 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>value_of_data</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="key_of.html" title="key_of"> +<link rel="next" href="deref_data.html" title="deref_data"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="key_of.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.metafunctions.value_of_data"></a><a class="link" href="value_of_data.html" title="value_of_data">value_of_data</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.metafunctions.value_of_data.h0"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of_data.description"></a></span><a class="link" href="value_of_data.html#fusion.iterator.metafunctions.value_of_data.description">Description</a> + </h6> +<p> + Returns the type of the data property associated with the element referenced + by an associative iterator references. + </p> +<h6> +<a name="fusion.iterator.metafunctions.value_of_data.h1"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of_data.synopsis"></a></span><a class="link" href="value_of_data.html#fusion.iterator.metafunctions.value_of_data.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_of_data</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.iterator.metafunctions.value_of_data.t0"></a><p class="title"><b>Table 1.21. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.metafunctions.value_of_data.h2"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of_data.expression_semantics"></a></span><a class="link" href="value_of_data.html#fusion.iterator.metafunctions.value_of_data.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><a class="link" href="value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the type of the data + property associated with the element referenced by an associative iterator + <code class="computeroutput"><span class="identifier">I</span></code>. + </p> +<h6> +<a name="fusion.iterator.metafunctions.value_of_data.h3"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of_data.header"></a></span><a class="link" href="value_of_data.html#fusion.iterator.metafunctions.value_of_data.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">value_of_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">value_of_data</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.metafunctions.value_of_data.h4"></a> + <span class="phrase"><a name="fusion.iterator.metafunctions.value_of_data.example"></a></span><a class="link" href="value_of_data.html#fusion.iterator.metafunctions.value_of_data.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_of_data.html" title="value_of_data"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of_data</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="key_of.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deref_data.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/operator.html b/libs/fusion/doc/html/fusion/iterator/operator.html new file mode 100644 index 000000000..f540f0db3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/operator.html @@ -0,0 +1,56 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Operator</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../iterator.html" title="Iterator"> +<link rel="prev" href="functions/deref_data.html" title="deref_data"> +<link rel="next" href="operator/operator_unary_star.html" title="Operator *"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/deref_data.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator/operator_unary_star.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.iterator.operator"></a><a class="link" href="operator.html" title="Operator">Operator</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="operator/operator_unary_star.html">Operator + *</a></span></dt> +<dt><span class="section"><a href="operator/operator_equality.html">Operator + ==</a></span></dt> +<dt><span class="section"><a href="operator/operator_inequality.html">Operator + !=</a></span></dt> +</dl></div> +<p> + Overloaded operators are provided to provide a more natural syntax for dereferencing + iterators, and comparing them for equality. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/deref_data.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../iterator.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator/operator_unary_star.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/operator/operator_equality.html b/libs/fusion/doc/html/fusion/iterator/operator/operator_equality.html new file mode 100644 index 000000000..12605a0fe --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/operator/operator_equality.html @@ -0,0 +1,128 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Operator ==</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../operator.html" title="Operator"> +<link rel="prev" href="operator_unary_star.html" title="Operator *"> +<link rel="next" href="operator_inequality.html" title="Operator !="> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator_unary_star.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_inequality.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.operator.operator_equality"></a><a class="link" href="operator_equality.html" title="Operator ==">Operator + ==</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.operator.operator_equality.h0"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_equality.description"></a></span><a class="link" href="operator_equality.html#fusion.iterator.operator.operator_equality.description">Description</a> + </h6> +<p> + Compares 2 iterators for equality. + </p> +<h6> +<a name="fusion.iterator.operator.operator_equality.h1"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_equality.synopsis"></a></span><a class="link" href="operator_equality.html#fusion.iterator.operator.operator_equality.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">J</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="keyword">operator</span><span class="special">==(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">J</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.operator.operator_equality.t0"></a><p class="title"><b>Table 1.10. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code> + </p> + </td> +<td> + <p> + Any fusion iterators + </p> + </td> +<td> + <p> + Operation's arguments + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.operator.operator_equality.h2"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_equality.expression_semantics"></a></span><a class="link" href="operator_equality.html#fusion.iterator.operator.operator_equality.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">i</span> <span class="special">==</span> <span class="identifier">j</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="computeroutput"><a class="link" href="../metafunctions/equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">J</span><span class="special">>::</span><span class="identifier">value</span></code> + where <code class="computeroutput"><span class="identifier">I</span></code> and <code class="computeroutput"><span class="identifier">J</span></code> are the types of <code class="computeroutput"><span class="identifier">i</span></code> + and <code class="computeroutput"><span class="identifier">j</span></code> respectively. + </p> +<h6> +<a name="fusion.iterator.operator.operator_equality.h3"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_equality.header"></a></span><a class="link" href="operator_equality.html#fusion.iterator.operator.operator_equality.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator_unary_star.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_inequality.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/operator/operator_inequality.html b/libs/fusion/doc/html/fusion/iterator/operator/operator_inequality.html new file mode 100644 index 000000000..78139cf66 --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/operator/operator_inequality.html @@ -0,0 +1,126 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Operator !=</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../operator.html" title="Operator"> +<link rel="prev" href="operator_equality.html" title="Operator =="> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator_equality.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.operator.operator_inequality"></a><a class="link" href="operator_inequality.html" title="Operator !=">Operator + !=</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.operator.operator_inequality.h0"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_inequality.description"></a></span><a class="link" href="operator_inequality.html#fusion.iterator.operator.operator_inequality.description">Description</a> + </h6> +<p> + Compares 2 iterators for inequality. + </p> +<h6> +<a name="fusion.iterator.operator.operator_inequality.h1"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_inequality.synopsis"></a></span><a class="link" href="operator_inequality.html#fusion.iterator.operator.operator_inequality.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">J</span> + <span class="special">></span> +<span class="emphasis"><em>unspecified</em></span> <span class="keyword">operator</span><span class="special">==(</span><span class="identifier">I</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">J</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.operator.operator_inequality.t0"></a><p class="title"><b>Table 1.11. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code> + </p> + </td> +<td> + <p> + Any fusion iterators + </p> + </td> +<td> + <p> + Operation's arguments + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.operator.operator_inequality.h2"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_inequality.expression_semantics"></a></span><a class="link" href="operator_inequality.html#fusion.iterator.operator.operator_inequality.expression_semantics">Expression + Semantics</a> + </h6> +<p> + <span class="bold"><strong>Return type</strong></span>: Convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="computeroutput"><span class="special">!</span><a class="link" href="../metafunctions/equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">J</span><span class="special">>::</span><span class="identifier">value</span></code> + where <code class="computeroutput"><span class="identifier">I</span></code> and <code class="computeroutput"><span class="identifier">J</span></code> are the types of <code class="computeroutput"><span class="identifier">i</span></code> + and <code class="computeroutput"><span class="identifier">j</span></code> respectively. + </p> +<h6> +<a name="fusion.iterator.operator.operator_inequality.h3"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_inequality.header"></a></span><a class="link" href="operator_inequality.html#fusion.iterator.operator.operator_inequality.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="operator_equality.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/iterator/operator/operator_unary_star.html b/libs/fusion/doc/html/fusion/iterator/operator/operator_unary_star.html new file mode 100644 index 000000000..bb5ab49ee --- /dev/null +++ b/libs/fusion/doc/html/fusion/iterator/operator/operator_unary_star.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Operator *</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../operator.html" title="Operator"> +<link rel="prev" href="../operator.html" title="Operator"> +<link rel="next" href="operator_equality.html" title="Operator =="> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../operator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_equality.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.iterator.operator.operator_unary_star"></a><a class="link" href="operator_unary_star.html" title="Operator *">Operator + *</a> +</h4></div></div></div> +<h6> +<a name="fusion.iterator.operator.operator_unary_star.h0"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_unary_star.description"></a></span><a class="link" href="operator_unary_star.html#fusion.iterator.operator.operator_unary_star.description">Description</a> + </h6> +<p> + Dereferences an iterator. + </p> +<h6> +<a name="fusion.iterator.operator.operator_unary_star.h1"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_unary_star.synopsis"></a></span><a class="link" href="operator_unary_star.html#fusion.iterator.operator.operator_unary_star.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">I</span> + <span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">operator</span><span class="special">*(</span><span class="emphasis"><em>unspecified</em></span><span class="special"><</span><span class="identifier">I</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">);</span> +</pre> +<div class="table"> +<a name="fusion.iterator.operator.operator_unary_star.t0"></a><p class="title"><b>Table 1.9. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Operation's argument + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.iterator.operator.operator_unary_star.h2"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_unary_star.expression_semantics"></a></span><a class="link" href="operator_unary_star.html#fusion.iterator.operator.operator_unary_star.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="special">*</span><span class="identifier">i</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Equivalent to the return + type of <code class="computeroutput"><a class="link" href="../functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to <code class="computeroutput"><a class="link" href="../functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>. + </p> +<h6> +<a name="fusion.iterator.operator.operator_unary_star.h3"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_unary_star.header"></a></span><a class="link" href="operator_unary_star.html#fusion.iterator.operator.operator_unary_star.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deref</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.iterator.operator.operator_unary_star.h4"></a> + <span class="phrase"><a name="fusion.iterator.operator.operator_unary_star.example"></a></span><a class="link" href="operator_unary_star.html#fusion.iterator.operator.operator_unary_star.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="keyword">int</span> <span class="identifier">i</span><span class="special">(</span><span class="number">0</span><span class="special">);</span> +<span class="identifier">vec</span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="identifier">i</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(*</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(*</span><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">))</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(&(*</span><a class="link" href="../functions/next.html" title="next"><code class="computeroutput"><span class="identifier">next</span></code></a><span class="special">(</span><a class="link" href="../../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="special">&</span><span class="identifier">i</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../operator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_equality.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/notes.html b/libs/fusion/doc/html/fusion/notes.html new file mode 100644 index 000000000..029dc4bd3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/notes.html @@ -0,0 +1,484 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Notes</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="functional/generation/metafunctions/mk_unfused.html" title="make_unfused"> +<link rel="next" href="change_log.html" title="Change log"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functional/generation/metafunctions/mk_unfused.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.notes"></a><a class="link" href="notes.html" title="Notes">Notes</a> +</h2></div></div></div> +<h4> +<a name="fusion.notes.h0"></a> + <span class="phrase"><a name="fusion.notes.recursive_inlined_functions"></a></span><a class="link" href="notes.html#fusion.notes.recursive_inlined_functions">Recursive + Inlined Functions</a> + </h4> +<p> + An interesting peculiarity of functions like <a class="link" href="sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> when applied to a <a class="link" href="sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> like <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + is that what could have been linear runtime complexity effectively becomes + constant O(1) due to compiler optimization of C++ inlined functions, however + deeply recursive (up to a certain compiler limit of course). Compile time complexity + remains linear. + </p> +<h4> +<a name="fusion.notes.h1"></a> + <span class="phrase"><a name="fusion.notes.overloaded_functions"></a></span><a class="link" href="notes.html#fusion.notes.overloaded_functions">Overloaded + Functions</a> + </h4> +<p> + Associative sequences use function overloading to implement membership testing + and type associated key lookup. This amounts to constant runtime and amortized + constant compile time complexities. There is an overloaded function, <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">k</span><span class="special">)</span></code>, for each key <span class="emphasis"><em>type</em></span> <code class="computeroutput"><span class="identifier">k</span></code>. The compiler chooses the appropriate function + given a key, <code class="computeroutput"><span class="identifier">k</span></code>. + </p> +<h4> +<a name="fusion.notes.h2"></a> + <span class="phrase"><a name="fusion.notes.tag_dispatching"></a></span><a class="link" href="notes.html#fusion.notes.tag_dispatching">Tag + Dispatching</a> + </h4> +<p> + Tag dispatching is a generic programming technique for selecting template specializations. + There are typically 3 components involved in the tag dispatching mechanism: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + A type for which an appropriate template specialization is required + </li> +<li class="listitem"> + A metafunction that associates the type with a tag type + </li> +<li class="listitem"> + A template that is specialized for the tag type + </li> +</ol></div> +<p> + For example, the fusion <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code> metafunction + is implemented as follows: + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">begin</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">typename</span> + <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin_impl</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span> + <span class="keyword">template</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> + <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<p> + In the case: + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + <code class="computeroutput"><span class="identifier">Sequence</span></code> is the type for + which a suitable implementation of <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin_impl</span></code> + is required + </li> +<li class="listitem"> + <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code> is the metafunction that associates + <code class="computeroutput"><span class="identifier">Sequence</span></code> with an appropriate + tag + </li> +<li class="listitem"> + <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin_impl</span></code> is the template which is specialized + to provide an implementation for each tag type + </li> +</ol></div> +<h4> +<a name="fusion.notes.h3"></a> + <span class="phrase"><a name="fusion.notes.extensibility"></a></span><a class="link" href="notes.html#fusion.notes.extensibility">Extensibility</a> + </h4> +<p> + Unlike <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, there + is no extensibe sequence concept in fusion. This does not mean that Fusion + sequences are not extensible. In fact, all Fusion sequences are inherently + extensible. It is just that the manner of sequence extension in Fusion is diferent + from both <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + and <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> on account + of the lazy nature of fusion <a class="link" href="algorithm.html" title="Algorithm">Algorithms</a>. + <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + containers extend themselves in place though member functions such as <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> and <a class="link" href="algorithm/transformation/functions/insert.html" title="insert"><code class="computeroutput"><span class="identifier">insert</span></code></a>. <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + sequences, on the other hand, are extended through "intrinsic" functions + that actually return whole sequences. <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + is purely functional and can not have side effects. For example, <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>'s + <code class="computeroutput"><span class="identifier">push_back</span></code> does not actually + mutate an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span></code>. It can't do that. Instead, it returns + an extended <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span></code>. + </p> +<p> + Like <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, Fusion + too is purely functional and can not have side effects. With runtime efficiency + in mind, Fusion sequences are extended through generic functions that return + <a class="link" href="view.html" title="View">Views</a>. <a class="link" href="view.html" title="View">Views</a> + are sequences that do not actually contain data, but instead impart an alternative + presentation over the data from one or more underlying sequences. <a class="link" href="view.html" title="View">Views</a> + are proxies. They provide an efficient yet purely functional way to work on + potentially expensive sequence operations. For example, given a <a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>, Fusion's <a class="link" href="algorithm/transformation/functions/push_back.html" title="push_back"><code class="computeroutput"><span class="identifier">push_back</span></code></a> returns a <a class="link" href="view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a>, instead of an actual extended + <a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>. + A <a class="link" href="view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a> + holds a reference to the original sequence plus the appended data --making + it very cheap to pass around. + </p> +<h4> +<a name="fusion.notes.h4"></a> + <span class="phrase"><a name="fusion.notes.element_conversion"></a></span><a class="link" href="notes.html#fusion.notes.element_conversion">Element + Conversion</a> + </h4> +<p> + Functions that take in elemental values to form sequences (e.g. <a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a>) convert their arguments + to something suitable to be stored as a sequence element. In general, the element + types are stored as plain values. Example: + </p> +<pre class="programlisting"><a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'x'</span><span class="special">)</span> +</pre> +<p> + returns a <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><code class="computeroutput"><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> + <span class="keyword">char</span><span class="special">></span></code>. + </p> +<p> + There are a few exceptions, however. + </p> +<p> + <span class="bold"><strong>Arrays:</strong></span> + </p> +<p> + Array arguments are deduced to reference to const types. For example <a href="#ftn.fusion.notes.f0" class="footnote" name="fusion.notes.f0"><sup class="footnote">[13]</sup></a>: + </p> +<pre class="programlisting"><a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="string">"Donald"</span><span class="special">,</span> <span class="string">"Daisy"</span><span class="special">)</span> +</pre> +<p> + creates a <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + of type + </p> +<pre class="programlisting"><a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">(&)[</span><span class="number">7</span><span class="special">],</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">(&)[</span><span class="number">6</span><span class="special">]></span> +</pre> +<p> + <span class="bold"><strong>Function pointers:</strong></span> + </p> +<p> + Function pointers are deduced to the plain non-reference type (i.e. to plain + function pointer). Example: + </p> +<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">);</span> + <span class="special">...</span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(&</span><span class="identifier">f</span><span class="special">);</span> +</pre> +<p> + creates a <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + of type + </p> +<pre class="programlisting"><a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">void</span> <span class="special">(*)(</span><span class="keyword">int</span><span class="special">)></span> +</pre> +<h4> +<a name="fusion.notes.h5"></a> + <span class="phrase"><a name="fusion.notes.boost__ref"></a></span><a class="link" href="notes.html#fusion.notes.boost__ref">boost::ref</a> + </h4> +<p> + Fusion's generation functions (e.g. <a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a>) by default stores the element + types as plain non-reference types. Example: + </p> +<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">B</span><span class="special">&</span> <span class="identifier">b</span><span class="special">)</span> <span class="special">{</span> + <span class="special">...</span> + <a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span> +</pre> +<p> + creates a <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + of type + </p> +<pre class="programlisting"><a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> +</pre> +<p> + Sometimes the plain non-reference type is not desired. You can use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code> + and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">cref</span></code> to store references or const references + (respectively) instead. The mechanism does not compromise const correctness + since a const object wrapped with ref results in a tuple element with const + reference type (see the fifth code line below). Examples: + </p> +<p> + For example: + </p> +<pre class="programlisting"><span class="identifier">A</span> <span class="identifier">a</span><span class="special">;</span> <span class="identifier">B</span> <span class="identifier">b</span><span class="special">;</span> <span class="keyword">const</span> <span class="identifier">A</span> <span class="identifier">ca</span> <span class="special">=</span> <span class="identifier">a</span><span class="special">;</span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">cref</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span> <span class="identifier">b</span><span class="special">);</span> <span class="comment">// creates list<const A&, B></span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span> <span class="identifier">b</span><span class="special">);</span> <span class="comment">// creates list<A&, B></span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span> <span class="identifier">cref</span><span class="special">(</span><span class="identifier">b</span><span class="special">));</span> <span class="comment">// creates list<A&, const B&></span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">cref</span><span class="special">(</span><span class="identifier">ca</span><span class="special">));</span> <span class="comment">// creates list<const A&></span> +<a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a><span class="special">(</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">ca</span><span class="special">));</span> <span class="comment">// creates list<const A&></span> +</pre> +<p> + See <a href="http://www.boost.org/doc/html/ref.html" target="_top">Boost.Ref</a> for + details. + </p> +<h4> +<a name="fusion.notes.h6"></a> + <span class="phrase"><a name="fusion.notes.adt_attribute_proxy"></a></span><a class="link" href="notes.html#fusion.notes.adt_attribute_proxy">adt_attribute_proxy</a> + </h4> +<p> + To adapt arbitrary data types that do not allow direct access to their members, + but allow indirect access via expressions (such as invocations of get- and + set-methods), fusion's <code class="literal">BOOST_FUSION_ADAPT_<span class="emphasis"><em>xxx</em></span>ADT<span class="emphasis"><em>xxx</em></span></code>-family + (e.g. <a class="link" href="adapted/adapt_adt.html" title="BOOST_FUSION_ADAPT_ADT"><code class="computeroutput"><span class="identifier">BOOST_FUSION_ADAPT_ADT</span></code></a>) + may be used. To bypass the restriction of not having actual lvalues that represent + the elements of the fusion sequence, but rather a sequence of paired expressions + that access the elements, the actual return type of fusion's intrinsic sequence + access functions (<a class="link" href="sequence/intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>, <a class="link" href="sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a>, <a class="link" href="sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>, <a class="link" href="iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>, and <a class="link" href="iterator/functions/deref_data.html" title="deref_data"><code class="computeroutput"><span class="identifier">deref_data</span></code></a>) is a proxy type, an instance + of <code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code>, that + encapsulates these expressions. + </p> +<p> + <code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code> is defined + in the namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">extension</span></code> and has three template arguments: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">extension</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Type</span> + <span class="special">,</span> <span class="keyword">int</span> <span class="identifier">Index</span> + <span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">Const</span> + <span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">adt_attribute_proxy</span><span class="special">;</span> +<span class="special">}}}</span> +</pre> +<p> + When adapting a class type, <code class="computeroutput"><span class="identifier">adt_attribute_proxy</span></code> + is specialized for every element of the adapted sequence, with <code class="computeroutput"><span class="identifier">Type</span></code> being the class type that is adapted, + <code class="computeroutput"><span class="identifier">Index</span></code> the 0-based indices of + the elements, and <code class="computeroutput"><span class="identifier">Const</span></code> both + <code class="computeroutput"><span class="keyword">true</span></code> and <code class="computeroutput"><span class="keyword">false</span></code>. + The return type of fusion's intrinsic sequence access functions for the <span class="emphasis"><em>N</em></span>th + element of an adapted class type <code class="computeroutput"><span class="identifier">type_name</span></code> + is <code class="literal">adt_attribute_proxy<type_name, <span class="emphasis"><em>N</em></span>, <span class="emphasis"><em>Const</em></span>></code>, + with <code class="literal"><span class="emphasis"><em>Const</em></span></code> being <code class="computeroutput"><span class="keyword">true</span></code> + for constant instances of <code class="computeroutput"><span class="identifier">type_name</span></code> + and <code class="computeroutput"><span class="keyword">false</span></code> for non-constant ones. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">type_name</span></code></span></dt> +<dd><p> + The type to be adapted, with M attributes + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">inst</span></code></span></dt> +<dd><p> + Object of type <code class="computeroutput"><span class="identifier">type_name</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">const_inst</span></code></span></dt> +<dd><p> + Object of type <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span></code> + </p></dd> +<dt><span class="term"><code class="literal">(attribute_type<span class="emphasis"><em>N</em></span>, attribute_const_type<span class="emphasis"><em>N</em></span>, + get_expr<span class="emphasis"><em>N</em></span>, set_expr<span class="emphasis"><em>N</em></span>)</code></span></dt> +<dd><p> + Attribute descriptor of the <span class="emphasis"><em>N</em></span>th attribute of <code class="computeroutput"><span class="identifier">type_name</span></code> as passed to the adaption + macro, 0≤<span class="emphasis"><em>N</em></span><M + </p></dd> +<dt><span class="term"><code class="literal">proxy_type<span class="emphasis"><em>N</em></span></code></span></dt> +<dd><p> + <code class="literal">adt_attribute_proxy<type_name, <span class="emphasis"><em>N</em></span>, <code class="computeroutput"><span class="keyword">false</span></code>></code> with <span class="emphasis"><em>N</em></span> + being an integral constant, 0≤<span class="emphasis"><em>N</em></span><M + </p></dd> +<dt><span class="term"><code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span></code></span></dt> +<dd><p> + <code class="literal">adt_attribute_proxy<type_name, <span class="emphasis"><em>N</em></span>, <code class="computeroutput"><span class="keyword">true</span></code>></code> with <span class="emphasis"><em>N</em></span> + being an integral constant, 0≤<span class="emphasis"><em>N</em></span><M + </p></dd> +<dt><span class="term"><code class="literal">proxy<span class="emphasis"><em>N</em></span></code></span></dt> +<dd><p> + Object of type <code class="literal">proxy_type<span class="emphasis"><em>N</em></span></code> + </p></dd> +<dt><span class="term"><code class="literal">const_proxy<span class="emphasis"><em>N</em></span></code></span></dt> +<dd><p> + Object of type <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span></code> + </p></dd> +</dl> +</div> +<p> + <span class="bold"><strong>Expression Semantics</strong></span> + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="literal">proxy_type<span class="emphasis"><em>N</em></span>(inst)</code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="literal">proxy_type<span class="emphasis"><em>N</em></span></code> + with underlying object <code class="computeroutput"><span class="identifier">inst</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span>(const_inst)</code> + </p> + </td> +<td> + <p> + Creates an instance of <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span></code> + with underlying object <code class="computeroutput"><span class="identifier">const_inst</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">proxy_type<span class="emphasis"><em>N</em></span>::type</code> + </p> + </td> +<td> + <p> + Another name for <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span>::type</code> + </p> + </td> +<td> + <p> + Another name for <code class="literal">const_attribute_type<span class="emphasis"><em>N</em></span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">proxy<span class="emphasis"><em>N</em></span>=t</code> + </p> + </td> +<td> + <p> + Invokes <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code>, with + <code class="computeroutput"><span class="identifier">t</span></code> being an arbitrary + object. <code class="literal">set_expr<span class="emphasis"><em>N</em></span></code> may access + the variables named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code>, which represent the corresponding + instance of <code class="computeroutput"><span class="identifier">type_name</span></code>, + and <code class="computeroutput"><span class="identifier">val</span></code> of an arbitrary + const-qualified reference template type parameter <code class="computeroutput"><span class="identifier">Val</span></code>, + which represents <code class="computeroutput"><span class="identifier">t</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">proxy<span class="emphasis"><em>N</em></span>.get()</code> + </p> + </td> +<td> + <p> + Invokes <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards + its return value. <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> + may access the variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span><span class="special">&</span></code> which represents the underlying + instance of <code class="computeroutput"><span class="identifier">type_name</span></code>. + <code class="literal">attribute_type<span class="emphasis"><em>N</em></span></code> may specify + the type that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> denotes + to. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="literal">const_proxy<span class="emphasis"><em>N</em></span>.get()</code> + </p> + </td> +<td> + <p> + Invokes <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> and forwards + its return value. <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> + may access the variable named <code class="computeroutput"><span class="identifier">obj</span></code> + of type <code class="computeroutput"><span class="identifier">type_name</span> <span class="keyword">const</span><span class="special">&</span></code> + which represents the underlying instance of <code class="computeroutput"><span class="identifier">type_name</span></code>. + <code class="literal">attribute_const_type<span class="emphasis"><em>N</em></span></code> may + specify the type that <code class="literal">get_expr<span class="emphasis"><em>N</em></span></code> + denotes to. + </p> + </td> +</tr> +</tbody> +</table></div> +<p> + Additionally, <code class="literal">proxy_type<span class="emphasis"><em>N</em></span></code> and <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span></code> + are copy constructible, copy assignable and implicitly convertible to <code class="literal">proxy_type<span class="emphasis"><em>N</em></span>::type</code> + or <code class="literal">const_proxy_type<span class="emphasis"><em>N</em></span>::type</code>. + </p> +<div class="tip"><table border="0" summary="Tip"> +<tr> +<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../doc/src/images/tip.png"></td> +<th align="left">Tip</th> +</tr> +<tr><td align="left" valign="top"><p> + To avoid the pitfalls of the proxy type, an arbitrary class type may also + be adapted directly using fusion's <a class="link" href="extension.html" title="Extension">intrinsic + extension mechanism</a>. + </p></td></tr> +</table></div> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.notes.f0" class="footnote"><p><a href="#fusion.notes.f0" class="para"><sup class="para">[13] </sup></a> + Note that the type of a string literal is an array of const characters, not + <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span></code>. To get <a class="link" href="container/generation/functions/make_list.html" title="make_list"><code class="computeroutput"><span class="identifier">make_list</span></code></a> to create a <a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> with an element of a non-const + array type one must use the <code class="computeroutput"><span class="identifier">ref</span></code> + wrapper (see <a class="link" href="notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a>). + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functional/generation/metafunctions/mk_unfused.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/organization.html b/libs/fusion/doc/html/fusion/organization.html new file mode 100644 index 000000000..408c28efa --- /dev/null +++ b/libs/fusion/doc/html/fusion/organization.html @@ -0,0 +1,223 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Organization</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="quick_start.html" title="Quick Start"> +<link rel="next" href="support.html" title="Support"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="quick_start.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="support.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.organization"></a><a class="link" href="organization.html" title="Organization">Organization</a> +</h2></div></div></div> +<p> + The library is organized into layers of modules, with each module addressing + a particular area of responsibility. A module may not depend on modules in + higher layers. + </p> +<p> + The library is organized in three layers: + </p> +<h4> +<a name="fusion.organization.h0"></a> + <span class="phrase"><a name="fusion.organization.layers"></a></span><a class="link" href="organization.html#fusion.organization.layers">Layers</a> + </h4> +<div class="blockquote"><blockquote class="blockquote"><p> + <span class="inlinemediaobject"><img src="../images/fusion_org.png" alt="fusion_org"></span> + </p></blockquote></div> +<p> + The entire library is found in the <code class="computeroutput"><span class="string">"boost/fusion"</span></code> + directory. Modules are organized in directories. Each module has its own header + file placed in the same directory with the actual module-directory. For example, + there exists <code class="computeroutput"><span class="string">"boost/fusion/support.hpp"</span></code> + in the same directory as "boost/fusion/support". Everything, except + those found inside "detail" directories, is public. + </p> +<p> + There is also a <code class="computeroutput"><span class="string">"boost/fusion/include/"</span></code> + directory that contains all the headers to all the components and modules. + If you are unsure where to find a specific component or module, or don't want + to fuss with hierarchy and nesting, use this. + </p> +<p> + The library is header-only. There is no need to build object files to link + against. + </p> +<h4> +<a name="fusion.organization.h1"></a> + <span class="phrase"><a name="fusion.organization.directory"></a></span><a class="link" href="organization.html#fusion.organization.directory">Directory</a> + </h4> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + tuple + </li> +<li class="listitem"> + algorithm + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> +<li class="listitem"> + iteration + </li> +<li class="listitem"> + query + </li> +<li class="listitem"> + transformation + </li> +</ul></div> + </li> +<li class="listitem"> + adapted + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> +<li class="listitem"> + array + </li> +<li class="listitem"> + mpl + </li> +<li class="listitem"> + boost::tuple + </li> +<li class="listitem"> + std_pair + </li> +<li class="listitem"> + struct + </li> +<li class="listitem"> + variant + </li> +</ul></div> + </li> +<li class="listitem"> + view + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> +<li class="listitem"> + filter_view + </li> +<li class="listitem"> + iterator_range + </li> +<li class="listitem"> + joint_view + </li> +<li class="listitem"> + reverse_view + </li> +<li class="listitem"> + single_view + </li> +<li class="listitem"> + transform_view + </li> +<li class="listitem"> + zip_view + </li> +</ul></div> + </li> +<li class="listitem"> + container + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> +<li class="listitem"> + deque + </li> +<li class="listitem"> + list + </li> +<li class="listitem"> + map + </li> +<li class="listitem"> + set + </li> +<li class="listitem"> + vector + </li> +<li class="listitem"> + generation + </li> +</ul></div> + </li> +<li class="listitem"> + mpl + </li> +<li class="listitem"> + functional + </li> +<li class="listitem"> + sequence + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> +<li class="listitem"> + comparison + </li> +<li class="listitem"> + intrinsic + </li> +<li class="listitem"> + io + </li> +</ul></div> + </li> +<li class="listitem"> + iterator + </li> +<li class="listitem"> + support + </li> +</ul></div> +<h4> +<a name="fusion.organization.h2"></a> + <span class="phrase"><a name="fusion.organization.example"></a></span><a class="link" href="organization.html#fusion.organization.example">Example</a> + </h4> +<p> + If, for example, you want to use <code class="computeroutput"><span class="identifier">list</span></code>, + depending on the granularity that you desire, you may do so by including one + of + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">container</span><span class="special">/</span><span class="identifier">list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + The first includes all containers The second includes only <code class="computeroutput"><span class="identifier">list</span></code> + <a href="#ftn.fusion.organization.f0" class="footnote" name="fusion.organization.f0"><sup class="footnote">[4]</sup></a>. + </p> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.organization.f0" class="footnote"><p><a href="#fusion.organization.f0" class="para"><sup class="para">[4] </sup></a> + Modules may contain smaller components. Header file information for each + component will be provided as part of the component's documentation. + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="quick_start.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="support.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/preface.html b/libs/fusion/doc/html/fusion/preface.html new file mode 100644 index 000000000..bb4846621 --- /dev/null +++ b/libs/fusion/doc/html/fusion/preface.html @@ -0,0 +1,220 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Preface</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="next" href="introduction.html" title="Introduction"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="introduction.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.preface"></a><a class="link" href="preface.html" title="Preface">Preface</a> +</h2></div></div></div> +<div class="blockquote"><blockquote class="blockquote"><p> + <span class="emphasis"><em><span class="quote">“<span class="quote">Algorithms + Data Structures = Programs.</span>”</span></em></span> + </p></blockquote></div> +<div class="blockquote"><blockquote class="blockquote"><p> + <span class="bold"><strong>--Niklaus Wirth</strong></span> + </p></blockquote></div> +<h4> +<a name="fusion.preface.h0"></a> + <span class="phrase"><a name="fusion.preface.description"></a></span><a class="link" href="preface.html#fusion.preface.description">Description</a> + </h4> +<p> + Fusion is a library for working with heterogenous collections of data, commonly + referred to as tuples. A set of containers (vector, list, set and map) is provided, + along with views that provide a transformed presentation of their underlying + data. Collectively the containers and views are referred to as sequences, and + Fusion has a suite of algorithms that operate upon the various sequence types, + using an iterator concept that binds everything together. + </p> +<p> + The architecture is modeled after <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + which in turn is modeled after <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>. + It is named "fusion" because the library is a "fusion" + of compile time metaprogramming with runtime programming. + </p> +<h4> +<a name="fusion.preface.h1"></a> + <span class="phrase"><a name="fusion.preface.motivation"></a></span><a class="link" href="preface.html#fusion.preface.motivation">Motivation</a> + </h4> +<p> + Tuples are powerful beasts. After having developed two significant projects + (<a href="http://spirit.sourceforge.net" target="_top">Spirit</a> and <a href="http://boost.org/libs/spirit/phoenix/index.html" target="_top">Phoenix</a>) + that relied heavily metaprogramming, it became apparent that tuples are a powerful + means to simplify otherwise tricky tasks; especially those that require a combination + of metaprogramming and manipulation of heterogenous data types with values. + While <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> is + an extremely powerful metaprogramming tool, <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> + focuses on type manipulation only. Ultimately, you'll have to map these types + to real values to make them useful in the runtime world where all the real + action takes place. + </p> +<p> + As <a href="http://spirit.sourceforge.net" target="_top">Spirit</a> and <a href="http://boost.org/libs/spirit/phoenix/index.html" target="_top">Phoenix</a> + evolved, patterns and idioms related to tuple manipulation emerged. Soon, it + became clear that those patterns and idioms were best assembled in a tuples + algorithms library. <a href="http://www.boost.org/people/dave_abrahams.htm" target="_top">David + Abrahams</a> outlined such a scheme in 2002. At that time, it just so happened + that <a href="http://spirit.sourceforge.net" target="_top">Spirit</a> and <a href="http://boost.org/libs/spirit/phoenix/index.html" target="_top">Phoenix</a> + had an adhoc collection of tuple manipulation and traversal routines. It was + an instant <span class="emphasis"><em>AHA!</em></span> moment. + </p> +<h4> +<a name="fusion.preface.h2"></a> + <span class="phrase"><a name="fusion.preface.how_to_use_this_manual"></a></span><a class="link" href="preface.html#fusion.preface.how_to_use_this_manual">How + to use this manual</a> + </h4> +<p> + Some icons are used to mark certain topics indicative of their relevance. These + icons precede some text to indicate: + </p> +<div class="table"> +<a name="fusion.preface.t0"></a><p class="title"><b>Table 1.1. Icons</b></p> +<div class="table-contents"><table class="table" summary="Icons"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Icon + </p> + </th> +<th> + <p> + Name + </p> + </th> +<th> + <p> + Meaning + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <span class="inlinemediaobject"><img src="../images/note.png" alt="note"></span> + </p> + </td> +<td> + <p> + Note + </p> + </td> +<td> + <p> + Information provided is auxiliary but will give the reader a deeper + insight into a specific topic. May be skipped. + </p> + </td> +</tr> +<tr> +<td> + <p> + <span class="inlinemediaobject"><img src="../images/alert.png" alt="alert"></span> + </p> + </td> +<td> + <p> + Alert + </p> + </td> +<td> + <p> + Information provided is of utmost importance. + </p> + </td> +</tr> +<tr> +<td> + <p> + <span class="inlinemediaobject"><img src="../images/caution.png" alt="caution"></span> + </p> + </td> +<td> + <p> + Caution + </p> + </td> +<td> + <p> + A mild warning. + </p> + </td> +</tr> +<tr> +<td> + <p> + <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> + </p> + </td> +<td> + <p> + Tip + </p> + </td> +<td> + <p> + A potentially useful and helpful piece of information. + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><p> + This documentation is automatically generated by Boost QuickBook documentation + tool. QuickBook can be found in the <a href="http://www.boost.org/tools/index.html" target="_top">Boost + Tools</a>. + </p> +<h4> +<a name="fusion.preface.h3"></a> + <span class="phrase"><a name="fusion.preface.support"></a></span><a class="link" href="preface.html#fusion.preface.support">Support</a> + </h4> +<p> + Please direct all questions to Spirit's mailing list. You can subscribe to + the <a href="https://lists.sourceforge.net/lists/listinfo/spirit-general" target="_top">Spirit + Mailing List</a>. The mailing list has a searchable archive. A search link + to this archive is provided in <a href="http://spirit.sourceforge.net" target="_top">Spirit</a>'s + home page. You may also read and post messages to the mailing list through + <a href="news://news.gmane.org/gmane.comp.spirit.general" target="_top">Spirit General + NNTP news portal</a> (thanks to <a href="http://www.gmane.org" target="_top">Gmane</a>). + The news group mirrors the mailing list. Here is a link to the archives: <a href="http://news.gmane.org/gmane.comp.parsers.spirit.general" target="_top">http://news.gmane.org/gmane.comp.parsers.spirit.general</a>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="introduction.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/quick_start.html b/libs/fusion/doc/html/fusion/quick_start.html new file mode 100644 index 000000000..27dc56b65 --- /dev/null +++ b/libs/fusion/doc/html/fusion/quick_start.html @@ -0,0 +1,258 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Quick Start</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="introduction.html" title="Introduction"> +<link rel="next" href="organization.html" title="Organization"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="introduction.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.quick_start"></a><a class="link" href="quick_start.html" title="Quick Start">Quick Start</a> +</h2></div></div></div> +<p> + I assume the reader is already familiar with tuples (<a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a>) + and its ancestor <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>. The tuple is a generalization of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> + for multiple heterogeneous elements (triples, quadruples, etc.). The tuple + is more or less a synonym for fusion's <code class="computeroutput"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a></code>. + </p> +<p> + For starters, we shall include all of Fusion's <a class="link" href="sequence.html" title="Sequence">Sequence</a>(s) + <a href="#ftn.fusion.quick_start.f0" class="footnote" name="fusion.quick_start.f0"><sup class="footnote">[2]</sup></a>: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + Let's begin with a <code class="computeroutput"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a></code> <a href="#ftn.fusion.quick_start.f1" class="footnote" name="fusion.quick_start.f1"><sup class="footnote">[3]</sup></a>: + </p> +<pre class="programlisting"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">stuff</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'x'</span><span class="special">,</span> <span class="string">"howdy"</span><span class="special">);</span> +<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <a class="link" href="sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">stuff</span><span class="special">);</span> +<span class="keyword">char</span> <span class="identifier">ch</span> <span class="special">=</span> <a class="link" href="sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">stuff</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span> <span class="special">=</span> <a class="link" href="sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="number">2</span><span class="special">>(</span><span class="identifier">stuff</span><span class="special">);</span> +</pre> +<p> + Just replace <code class="computeroutput"><span class="identifier">tuple</span></code> for <code class="computeroutput"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a></code> + and <code class="computeroutput"><span class="identifier">get</span></code> for <code class="computeroutput"><a class="link" href="sequence/intrinsic/functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a></code> and this is exactly like + <a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">Boost.Tuple</a>. + Actually, either names can be used interchangeably. Yet, the similarity ends + there. You can do a lot more with Fusion <code class="computeroutput"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a></code> or <code class="computeroutput"><span class="identifier">tuple</span></code>. + Let's see some examples. + </p> +<h4> +<a name="fusion.quick_start.h0"></a> + <span class="phrase"><a name="fusion.quick_start.print_the_vector_as_xml"></a></span><a class="link" href="quick_start.html#fusion.quick_start.print_the_vector_as_xml">Print + the vector as XML</a> + </h4> +<p> + First, let's include the algorithms: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + Now, let's write a function object that prints XML of the form <type>data</type> + for each member in the tuple. + </p> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">print_xml</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> + <span class="special"><<</span> <span class="char">'<'</span> <span class="special"><<</span> <span class="keyword">typeid</span><span class="special">(</span><span class="identifier">x</span><span class="special">).</span><span class="identifier">name</span><span class="special">()</span> <span class="special"><<</span> <span class="char">'>'</span> + <span class="special"><<</span> <span class="identifier">x</span> + <span class="special"><<</span> <span class="string">"</"</span> <span class="special"><<</span> <span class="keyword">typeid</span><span class="special">(</span><span class="identifier">x</span><span class="special">).</span><span class="identifier">name</span><span class="special">()</span> <span class="special"><<</span> <span class="char">'>'</span> + <span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> +</pre> +<p> + Now, finally: + </p> +<pre class="programlisting"><a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">stuff</span><span class="special">,</span> <span class="identifier">print_xml</span><span class="special">());</span> +</pre> +<p> + That's it! <code class="computeroutput"><a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a></code> is a fusion algorithm. + It is a generic algorithm similar to <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>'s. + It iterates over the sequence and calls a user supplied function. In our case, + it calls <code class="computeroutput"><span class="identifier">print_xml</span></code>'s <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code> for + each element in <code class="computeroutput"><span class="identifier">stuff</span></code>. + </p> +<div class="caution"><table border="0" summary="Caution"> +<tr> +<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../doc/src/images/caution.png"></td> +<th align="left">Caution</th> +</tr> +<tr><td align="left" valign="top"><p> + The result of <code class="computeroutput"><span class="keyword">typeid</span><span class="special">(</span><span class="identifier">x</span><span class="special">).</span><span class="identifier">name</span><span class="special">()</span></code> is platform specific. The code here is + just for exposition. Of course you already know that :-) + </p></td></tr> +</table></div> +<p> + <code class="computeroutput"><a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a></code> is generic. With + <code class="computeroutput"><span class="identifier">print_xml</span></code>, you can use it to + print just about any Fusion <a class="link" href="sequence.html" title="Sequence">Sequence</a>. + </p> +<h4> +<a name="fusion.quick_start.h1"></a> + <span class="phrase"><a name="fusion.quick_start.print_only_pointers"></a></span><a class="link" href="quick_start.html#fusion.quick_start.print_only_pointers">Print + only pointers</a> + </h4> +<p> + Let's get a little cleverer. Say we wish to write a <span class="emphasis"><em>generic</em></span> + function that takes in an arbitrary sequence and XML prints only those elements + which are pointers. Ah, easy. First, let's include the <code class="computeroutput"><span class="identifier">is_pointer</span></code> + boost type trait: + </p> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">is_pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<p> + Then, simply: + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">void</span> <span class="identifier">xml_print_pointers</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">)</span> +<span class="special">{</span> + <a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><a class="link" href="algorithm/transformation/functions/filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">>(</span><span class="identifier">seq</span><span class="special">),</span> <span class="identifier">print_xml</span><span class="special">());</span> +<span class="special">}</span> +</pre> +<p> + <code class="computeroutput"><a class="link" href="algorithm/transformation/functions/filter_if.html" title="filter_if"><code class="computeroutput"><span class="identifier">filter_if</span></code></a></code> is another Fusion + algorithm. It returns a <a class="link" href="view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a>, a conforming Fusion sequence. + This view reflects only those elements that pass the given predicate. In this + case, the predicate is <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span></code>. + This "filtered view" is then passed to the <a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a> algorithm, which then prints + the "filtered view" as XML. + </p> +<p> + Easy, right? + </p> +<h4> +<a name="fusion.quick_start.h2"></a> + <span class="phrase"><a name="fusion.quick_start.associative_tuples"></a></span><a class="link" href="quick_start.html#fusion.quick_start.associative_tuples">Associative + tuples</a> + </h4> +<p> + Ok, moving on... + </p> +<p> + Apart from <code class="computeroutput"><a class="link" href="container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a></code>, + fusion has a couple of other sequence types to choose from. Each sequence has + its own characteristics. We have <code class="computeroutput"><a class="link" href="container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a></code>, <code class="computeroutput"><a class="link" href="container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a></code>, <code class="computeroutput"><a class="link" href="container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a></code>, plus a multitude of <code class="computeroutput"><span class="identifier">views</span></code> that provide various ways to present + the sequences. + </p> +<p> + Fusion's <code class="computeroutput"><a class="link" href="container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a></code> + associate types with elements. It can be used as a cleverer replacement of + the <code class="computeroutput"><span class="keyword">struct</span></code>. Example: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">fields</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">name</span><span class="special">;</span> + <span class="keyword">struct</span> <span class="identifier">age</span><span class="special">;</span> +<span class="special">}</span> + +<span class="keyword">typedef</span> <a class="link" href="container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span> + <a class="link" href="support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a><span class="special"><</span><span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> + <span class="special">,</span> <a class="link" href="support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">pair</span></code></a><span class="special"><</span><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="special">></span> +<span class="identifier">person</span><span class="special">;</span> +</pre> +<p> + <code class="computeroutput"><a class="link" href="container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a></code> + is an associative sequence. Its elements are Fusion pairs which differ somewhat + from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>. Fusion pairs only contain one member, + with the type of their second template parameter. The first type parameter + of the pair is used as an index to the associated element in the sequence. + For example, given a <code class="computeroutput"><span class="identifier">a_person</span></code> + of type, <code class="computeroutput"><span class="identifier">person</span></code>, you can do: + </p> +<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">fields</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">person_name</span> <span class="special">=</span> <a class="link" href="sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">name</span><span class="special">>(</span><span class="identifier">a_person</span><span class="special">);</span> +<span class="keyword">int</span> <span class="identifier">person_age</span> <span class="special">=</span> <a class="link" href="sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">age</span><span class="special">>(</span><span class="identifier">a_person</span><span class="special">);</span> +</pre> +<p> + Why go through all this trouble, you say? Well, for one, unlike the <code class="computeroutput"><span class="keyword">struct</span></code>, we are dealing with a generic data structure. + There are a multitude of facilities available at your disposal provided out + of the box with fusion or written by others. With these facilities, introspection + comes for free, for example. We can write one serialization function (well, + two, if you consider loading and saving) that will work for all your fusion + <code class="computeroutput"><a class="link" href="container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a></code>s. + Example: + </p> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">saver</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Pair</span><span class="special">></span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Pair</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">data</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="identifier">some_archive</span> <span class="special"><<</span> <span class="identifier">data</span><span class="special">.</span><span class="identifier">second</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Stuff</span><span class="special">></span> +<span class="keyword">void</span> <span class="identifier">save</span><span class="special">(</span><span class="identifier">Stuff</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">stuff</span><span class="special">)</span> +<span class="special">{</span> + <a class="link" href="algorithm/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">stuff</span><span class="special">,</span> <span class="identifier">saver</span><span class="special">());</span> +<span class="special">}</span> +</pre> +<p> + The <code class="computeroutput"><span class="identifier">save</span></code> function is generic + and will work for all types of <code class="computeroutput"><span class="identifier">stuff</span></code> + regardless if it is a <code class="computeroutput"><span class="identifier">person</span></code>, + a <code class="computeroutput"><span class="identifier">dog</span></code> or a whole <code class="computeroutput"><span class="identifier">alternate_universe</span></code>. + </p> +<h4> +<a name="fusion.quick_start.h3"></a> + <span class="phrase"><a name="fusion.quick_start.tip_of_the_iceberg"></a></span><a class="link" href="quick_start.html#fusion.quick_start.tip_of_the_iceberg">Tip + of the Iceberg</a> + </h4> +<p> + And... we've barely scratched the surface! You can compose and expand the data + structures, remove elements from the structures, find specific data types, + query the elements, filter out types for inspection, transform data structures, + etc. What you've seen is just the tip of the iceberg. + </p> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.quick_start.f0" class="footnote"><p><a href="#fusion.quick_start.f0" class="para"><sup class="para">[2] </sup></a> + There are finer grained header files available if you wish to have more control + over which components to include (see section <a class="link" href="organization.html" title="Organization">Organization</a> + for details). + </p></div> +<div id="ftn.fusion.quick_start.f1" class="footnote"><p><a href="#fusion.quick_start.f1" class="para"><sup class="para">[3] </sup></a> + Unless otherwise noted, components are in namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span></code>. + For the sake of simplicity, code in this quick start implies <code class="computeroutput"><span class="keyword">using</span></code> directives for the fusion components + we will be using. + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="introduction.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/references.html b/libs/fusion/doc/html/fusion/references.html new file mode 100644 index 000000000..23439c947 --- /dev/null +++ b/libs/fusion/doc/html/fusion/references.html @@ -0,0 +1,73 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>References</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="acknowledgements.html" title="Acknowledgements"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="acknowledgements.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.references"></a><a class="link" href="references.html" title="References">References</a> +</h2></div></div></div> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> + <a href="http://boost.org/libs/iterator/doc/new-iter-concepts.html" target="_top">New + Iterator Concepts</a>, David Abrahams, Jeremy Siek, Thomas Witt, 2004-11-01. + </li> +<li class="listitem"> + <a href="http://boost.org/libs/tuple/doc/tuple_users_guide.html" target="_top">The + Boost Tuple Library</a>, Jaakko Jarvi, 2001. + </li> +<li class="listitem"> + <a href="http://www.boost.org/libs/spirit/" target="_top">Spirit Parser Library</a>, + Joel de Guzman, 2001-2006. + </li> +<li class="listitem"> + <a href="http://www.boost.org/libs/mpl/" target="_top">The Boost MPL Library</a>, + Aleksey Gurtovoy and David Abrahams, 2002-2004. + </li> +<li class="listitem"> + <a href="http://www.boost.org/doc/html/array.html" target="_top">Boost Array</a>, + Nicolai Josuttis, 2002-2004. + </li> +<li class="listitem"> + <a href="http://www.sgi.com/tech/stl/" target="_top">Standard Template Library Programmer's + Guide</a>, Hewlett-Packard Company, 1994. + </li> +<li class="listitem"> + <a href="http://www.boost.org/doc/html/ref.html" target="_top">Boost.Ref</a>, + Jaakko Jarvi, Peter Dimov, Douglas Gregor, Dave Abrahams, 1999-2002. + </li> +</ol></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="acknowledgements.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence.html b/libs/fusion/doc/html/fusion/sequence.html new file mode 100644 index 000000000..34f4f7c5b --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence.html @@ -0,0 +1,84 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Sequence</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="iterator/metafunctions/deref_data.html" title="deref_data"> +<link rel="next" href="sequence/concepts.html" title="Concepts"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iterator/metafunctions/deref_data.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sequence/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.sequence"></a><a class="link" href="sequence.html" title="Sequence">Sequence</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="sequence/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="sequence/concepts/forward_sequence.html">Forward + Sequence</a></span></dt> +<dt><span class="section"><a href="sequence/concepts/bidirectional_sequence.html">Bidirectional + Sequence</a></span></dt> +<dt><span class="section"><a href="sequence/concepts/random_access_sequence.html">Random + Access Sequence</a></span></dt> +<dt><span class="section"><a href="sequence/concepts/associative_sequence.html">Associative + Sequence</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="sequence/intrinsic.html">Intrinsic</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="sequence/intrinsic/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="sequence/intrinsic/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="sequence/operator.html">Operator</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="sequence/operator/i_o.html">I/O</a></span></dt> +<dt><span class="section"><a href="sequence/operator/comparison.html">Comparison</a></span></dt> +</dl></dd> +</dl></div> +<p> + Like <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, the + Sequence is a fundamental concept in Fusion. A Sequence may or may not actually + store or contain data. <a class="link" href="container.html" title="Container">Container</a> are + sequences that hold data. <a class="link" href="view.html" title="View">Views</a>, on the + other hand, are sequences that do not store any data. Instead, they are proxies + that impart an alternative presentation over another sequence. All models of + Sequence have an associated <a class="link" href="iterator.html" title="Iterator">Iterator</a> + type that can be used to iterate through the Sequence's elements. + </p> +<h4> +<a name="fusion.sequence.h0"></a> + <span class="phrase"><a name="fusion.sequence.header"></a></span><a class="link" href="sequence.html#fusion.sequence.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iterator/metafunctions/deref_data.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="sequence/concepts.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/concepts.html b/libs/fusion/doc/html/fusion/sequence/concepts.html new file mode 100644 index 000000000..af2bf53c0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/concepts.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Concepts</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../sequence.html" title="Sequence"> +<link rel="prev" href="../sequence.html" title="Sequence"> +<link rel="next" href="concepts/forward_sequence.html" title="Forward Sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/forward_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.sequence.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="concepts/forward_sequence.html">Forward + Sequence</a></span></dt> +<dt><span class="section"><a href="concepts/bidirectional_sequence.html">Bidirectional + Sequence</a></span></dt> +<dt><span class="section"><a href="concepts/random_access_sequence.html">Random + Access Sequence</a></span></dt> +<dt><span class="section"><a href="concepts/associative_sequence.html">Associative + Sequence</a></span></dt> +</dl></div> +<p> + Fusion Sequences are organized into a hierarchy of concepts. + </p> +<h5> +<a name="fusion.sequence.concepts.h0"></a> + <span class="phrase"><a name="fusion.sequence.concepts.traversal"></a></span><a class="link" href="concepts.html#fusion.sequence.concepts.traversal">Traversal</a> + </h5> +<p> + Fusion's sequence traversal related concepts parallel Fusion's <a class="link" href="../iterator/concepts.html" title="Concepts">Iterator + Concepts</a>. <a class="link" href="concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> is the most basic concept. <a class="link" href="concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> is a refinement of <a class="link" href="concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. <a class="link" href="concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> is a refinement of <a class="link" href="concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>. These concepts pertain to sequence traversal. + </p> +<h5> +<a name="fusion.sequence.concepts.h1"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associativity"></a></span><a class="link" href="concepts.html#fusion.sequence.concepts.associativity">Associativity</a> + </h5> +<p> + The <a class="link" href="concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> concept is orthogonal to traversal. An Associative Sequence + allows efficient retrieval of elements based on keys. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/forward_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/concepts/associative_sequence.html b/libs/fusion/doc/html/fusion/sequence/concepts/associative_sequence.html new file mode 100644 index 000000000..a36a49154 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/concepts/associative_sequence.html @@ -0,0 +1,350 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Associative Sequence</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="random_access_sequence.html" title="Random Access Sequence"> +<link rel="next" href="../intrinsic.html" title="Intrinsic"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="random_access_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.concepts.associative_sequence"></a><a class="link" href="associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> +</h4></div></div></div> +<h6> +<a name="fusion.sequence.concepts.associative_sequence.h0"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associative_sequence.description"></a></span><a class="link" href="associative_sequence.html#fusion.sequence.concepts.associative_sequence.description">Description</a> + </h6> +<p> + An Associative Sequence allows efficient retrieval of elements based on + keys. Like associative sequences in <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, + and unlike associative containers in <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a>, + Fusion associative sequences have no implied ordering relation. Instead, + type identity is used to impose an equivalence relation on keys. + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An Associative Sequence + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + An Associative Sequence type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">K</span></code></span></dt> +<dd><p> + An arbitrary <span class="emphasis"><em>key</em></span> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt> +<dd><p> + An arbitrary object + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + A Sequence element + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.sequence.concepts.associative_sequence.h1"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associative_sequence.valid_expressions"></a></span><a class="link" href="associative_sequence.html#fusion.sequence.concepts.associative_sequence.valid_expressions">Valid + Expressions</a> + </h6> +<p> + For any Associative Sequence the following expressions must be valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Type Requirements + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Boolean Constant</a>. Convertible to bool. + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> + <span class="special">=</span> <span class="identifier">o</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> is mutable + and <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> is the first element in the + sequence, is a valid expression. + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.associative_sequence.h2"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associative_sequence.result_type_expressions"></a></span><a class="link" href="associative_sequence.html#fusion.sequence.concepts.associative_sequence.result_type_expressions">Result + Type Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> + <span class="identifier">K</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> + <span class="identifier">K</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../../images/note.png" alt="note"></span> <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">></span></code> returns the actual type returned by + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code>. In + most cases, this is a reference. Hence, there is no way to know the exact + element type using <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">></span></code>.The element at <code class="computeroutput"><span class="identifier">K</span></code> + may actually be a reference to begin with. For this purpose, you can use + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">N</span><span class="special">></span></code>. + </p> +</div> +<h6> +<a name="fusion.sequence.concepts.associative_sequence.h3"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associative_sequence.expression_semantics"></a></span><a class="link" href="associative_sequence.html#fusion.sequence.concepts.associative_sequence.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + A boolean Integral Constant <code class="computeroutput"><span class="identifier">c</span></code> + such that <code class="computeroutput"><span class="identifier">c</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span> + <span class="keyword">true</span></code> if and only if there + is one or more elements with the key <code class="computeroutput"><span class="identifier">k</span></code> + in <code class="computeroutput"><span class="identifier">s</span></code>; see <a class="link" href="../intrinsic/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">K</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The element associated with the key <code class="computeroutput"><span class="identifier">K</span></code> + in the sequence <code class="computeroutput"><span class="identifier">s</span></code>; + see <a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.associative_sequence.h4"></a> + <span class="phrase"><a name="fusion.sequence.concepts.associative_sequence.models"></a></span><a class="link" href="associative_sequence.html#fusion.sequence.concepts.associative_sequence.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a> + (where adapted sequence is an <a class="link" href="associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> and a <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>) + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + (where adapted iterators are <a class="link" href="../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a>s) + </li> +<li class="listitem"> + <a class="link" href="../../view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a> + (where adapted sequences are <a class="link" href="associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>s and <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>s) + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + (where adapted sequence is an <a class="link" href="associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> and a <a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="random_access_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/concepts/bidirectional_sequence.html b/libs/fusion/doc/html/fusion/sequence/concepts/bidirectional_sequence.html new file mode 100644 index 000000000..fcbc573f3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/concepts/bidirectional_sequence.html @@ -0,0 +1,343 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Bidirectional Sequence</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="forward_sequence.html" title="Forward Sequence"> +<link rel="next" href="random_access_sequence.html" title="Random Access Sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="forward_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.concepts.bidirectional_sequence"></a><a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> +</h4></div></div></div> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h0"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.description"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.description">Description</a> + </h6> +<p> + A Bidirectional Sequence is a <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> whose iterators model <a class="link" href="../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a>. + </p> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h1"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.refinement_of"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.refinement_of">Refinement + of</a> + </h6> +<p> + <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A Forward Sequence + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A Forward Sequence type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt> +<dd><p> + An arbitrary object + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + A Sequence element + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h2"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.valid_expressions"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.valid_expressions">Valid + Expressions</a> + </h6> +<p> + In addition to the requirements defined in <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, for any Bidirectional Sequence the following must be met: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Type Requirements + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/back.html" title="back"><code class="computeroutput"><span class="identifier">back</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/back.html" title="back"><code class="computeroutput"><span class="identifier">back</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span> + <span class="special">=</span> <span class="identifier">o</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> is mutable + and <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> is the first element in the + sequence, is a valid expression. + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h3"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.result_type_expressions"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.result_type_expressions">Result + Type Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/back.html" title="back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">back</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h4"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.expression_semantics"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.expression_semantics">Expression + Semantics</a> + </h6> +<p> + The semantics of an expression are defined only where they differ from, + or are not defined in <a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/back.html" title="back"><code class="computeroutput"><span class="identifier">back</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The last element in the sequence; see <a class="link" href="../intrinsic/functions/back.html" title="back"><code class="computeroutput"><span class="identifier">back</span></code></a>. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.bidirectional_sequence.h5"></a> + <span class="phrase"><a name="fusion.sequence.concepts.bidirectional_sequence.models"></a></span><a class="link" href="bidirectional_sequence.html#fusion.sequence.concepts.bidirectional_sequence.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + (where adapted sequence is a Bidirectional Sequence) + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + (where adapted sequence is a Bidirectional Sequence) + </li> +<li class="listitem"> + <a class="link" href="../../view/zip_view.html" title="zip_view"><code class="computeroutput"><span class="identifier">zip_view</span></code></a> + (where adapted sequences are models of Bidirectional Sequence) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="forward_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/concepts/forward_sequence.html b/libs/fusion/doc/html/fusion/sequence/concepts/forward_sequence.html new file mode 100644 index 000000000..425edfbfe --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/concepts/forward_sequence.html @@ -0,0 +1,490 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Forward Sequence</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="../concepts.html" title="Concepts"> +<link rel="next" href="bidirectional_sequence.html" title="Bidirectional Sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.concepts.forward_sequence"></a><a class="link" href="forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> +</h4></div></div></div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h0"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.description"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.description">Description</a> + </h6> +<p> + A Forward Sequence is a Sequence whose elements are arranged in a definite + order. The ordering is guaranteed not to change from iteration to iteration. + The requirement of a definite ordering allows the definition of element-by-element + equality (if the container's element type is Equality Comparable) and of + lexicographical ordering (if the container's element type is LessThan Comparable). + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A Forward Sequence + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A Forward Sequence type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt> +<dd><p> + An arbitrary object + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + A Sequence element + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h1"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.valid_expressions"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.valid_expressions">Valid + Expressions</a> + </h6> +<p> + For any Forward Sequence the following expressions must be valid: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Type Requirements + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a>. Convertible to int. + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Boolean Constant</a>. Convertible to bool. + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span> + <span class="special">=</span> <span class="identifier">o</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> is mutable + and <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> is the first element in the + sequence, is a valid expression. + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h2"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.result_type_expressions"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.result_type_expressions">Result + Type Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Unspecified + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">empty</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/front.html" title="front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">front</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h3"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.expression_semantics"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.expression_semantics">Expression + Semantics</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + An iterator to the first element of the sequence; see <a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + A past-the-end iterator to the sequence; see <a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The size of the sequence; see <a class="link" href="../intrinsic/functions/size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + A boolean Integral Constant <code class="computeroutput"><span class="identifier">c</span></code> + such that <code class="computeroutput"><span class="identifier">c</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span> + <span class="keyword">true</span></code> if and only if the + sequence is empty; see <a class="link" href="../intrinsic/functions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The first element in the sequence; see <a class="link" href="../intrinsic/functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h4"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.invariants"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.invariants">Invariants</a> + </h6> +<p> + For any Forward Sequence s the following invariants always hold: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <code class="computeroutput"><span class="special">[</span><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">),</span> <a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">))</span></code> is always a valid range. + </li> +<li class="listitem"> + An <a class="link" href="../../algorithm.html" title="Algorithm">Algorithm</a> that iterates + through the range <code class="computeroutput"><span class="special">[</span><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">),</span> <a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">))</span></code> will pass through every element of + <code class="computeroutput"><span class="identifier">s</span></code> exactly once. + </li> +<li class="listitem"> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + is identical to <code class="computeroutput"><a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">))</span></code> + if and only if <code class="computeroutput"><span class="identifier">s</span></code> is + empty. + </li> +<li class="listitem"> + Two different iterations through <code class="computeroutput"><span class="identifier">s</span></code> + will access its elements in the same order. + </li> +</ul></div> +<h6> +<a name="fusion.sequence.concepts.forward_sequence.h5"></a> + <span class="phrase"><a name="fusion.sequence.concepts.forward_sequence.models"></a></span><a class="link" href="forward_sequence.html#fusion.sequence.concepts.forward_sequence.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/cons.html" title="cons"><code class="computeroutput"><span class="identifier">cons</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/joint_view.html" title="joint_view"><code class="computeroutput"><span class="identifier">joint_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/zip_view.html" title="zip_view"><code class="computeroutput"><span class="identifier">zip_view</span></code></a> + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../concepts.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/concepts/random_access_sequence.html b/libs/fusion/doc/html/fusion/sequence/concepts/random_access_sequence.html new file mode 100644 index 000000000..44a9295ad --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/concepts/random_access_sequence.html @@ -0,0 +1,375 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Random Access Sequence</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../concepts.html" title="Concepts"> +<link rel="prev" href="bidirectional_sequence.html" title="Bidirectional Sequence"> +<link rel="next" href="associative_sequence.html" title="Associative Sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="bidirectional_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="associative_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.concepts.random_access_sequence"></a><a class="link" href="random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> +</h4></div></div></div> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h0"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.description"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.description">Description</a> + </h6> +<p> + A Random Access Sequence is a <a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> whose iterators model <a class="link" href="../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a>. It guarantees constant time access to arbitrary + sequence elements. + </p> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h1"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.refinement_of"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.refinement_of">Refinement + of</a> + </h6> +<p> + <a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A Random Access Sequence + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A Random Access Sequence type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">N</span></code></span></dt> +<dd><p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt> +<dd><p> + An arbitrary object + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">e</span></code></span></dt> +<dd><p> + A Sequence element + </p></dd> +</dl> +</div> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h2"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.valid_expressions"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.valid_expressions">Valid + Expressions</a> + </h6> +<p> + In addition to the requirements defined in <a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>, for any Random Access Sequence the following must be met: + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return type + </p> + </th> +<th> + <p> + Type Requirements + </p> + </th> +<th> + <p> + Runtime Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> + <span class="special">=</span> <span class="identifier">o</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span></code> is mutable + and <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> is the first element in the + sequence, is a valid expression. + </p> + </td> +<td> + <p> + Constant + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h3"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.result_type_expressions"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.result_type_expressions">Result + Type Expressions</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Compile Time Complexity + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> + <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> + <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td> +<td> + <p> + Amortized constant time + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="sidebar"> +<div class="titlepage"></div> +<p> + <span class="inlinemediaobject"><img src="../../../images/note.png" alt="note"></span> <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">N</span><span class="special">></span></code> returns the actual type returned by + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code>. In + most cases, this is a reference. Hence, there is no way to know the exact + element type using <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">N</span><span class="special">></span></code>.The element at <code class="computeroutput"><span class="identifier">N</span></code> + may actually be a reference to begin with. For this purpose, you can use + <code class="computeroutput"><a class="link" href="../intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a><span class="special"><</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">N</span><span class="special">></span></code>. + </p> +</div> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h4"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.expression_semantics"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.expression_semantics">Expression + Semantics</a> + </h6> +<p> + The semantics of an expression are defined only where they differ from, + or are not defined in <a class="link" href="bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + The Nth element from the beginning of the sequence; see <a class="link" href="../intrinsic/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.concepts.random_access_sequence.h5"></a> + <span class="phrase"><a name="fusion.sequence.concepts.random_access_sequence.models"></a></span><a class="link" href="random_access_sequence.html#fusion.sequence.concepts.random_access_sequence.models">Models</a> + </h6> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../adapted/boost__array.html" title="boost::array"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/reverse_view.html" title="reverse_view"><code class="computeroutput"><span class="identifier">reverse_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/single_view.html" title="single_view"><code class="computeroutput"><span class="identifier">single_view</span></code></a> + </li> +<li class="listitem"> + <a class="link" href="../../view/iterator_range.html" title="iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> + (where adapted sequence is a Random Access Sequence) + </li> +<li class="listitem"> + <a class="link" href="../../view/transform_view.html" title="transform_view"><code class="computeroutput"><span class="identifier">transform_view</span></code></a> + (where adapted sequence is a Random Access Sequence) + </li> +<li class="listitem"> + <a class="link" href="../../view/zip_view.html" title="zip_view"><code class="computeroutput"><span class="identifier">zip_view</span></code></a> + (where adapted sequences are models of Random Access Sequence) + </li> +</ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="bidirectional_sequence.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="associative_sequence.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic.html b/libs/fusion/doc/html/fusion/sequence/intrinsic.html new file mode 100644 index 000000000..af513e913 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic.html @@ -0,0 +1,70 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Intrinsic</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../sequence.html" title="Sequence"> +<link rel="prev" href="concepts/associative_sequence.html" title="Associative Sequence"> +<link rel="next" href="intrinsic/functions.html" title="Functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/associative_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intrinsic/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.sequence.intrinsic"></a><a class="link" href="intrinsic.html" title="Intrinsic">Intrinsic</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="intrinsic/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="intrinsic/metafunctions.html">Metafunctions</a></span></dt> +</dl></div> +<p> + Intrinsic form the essential interface of every Fusion <a class="link" href="../sequence.html" title="Sequence">Sequence</a>. + <a href="http://en.wikipedia.org/wiki/Standard_Template_Library" target="_top">STL</a> + counterparts of these functions are usually implemented as member functions. + Intrinsic functions, unlike <a class="link" href="../algorithm.html" title="Algorithm">Algorithms</a>, + are not generic across the full <a class="link" href="../sequence.html" title="Sequence">Sequence</a> + repertoire. They need to be implemented for each Fusion <a class="link" href="../sequence.html" title="Sequence">Sequence</a><a href="#ftn.fusion.sequence.intrinsic.f0" class="footnote" name="fusion.sequence.intrinsic.f0"><sup class="footnote">[5]</sup></a>. + </p> +<h5> +<a name="fusion.sequence.intrinsic.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.header"></a></span><a class="link" href="intrinsic.html#fusion.sequence.intrinsic.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.sequence.intrinsic.f0" class="footnote"><p><a href="#fusion.sequence.intrinsic.f0" class="para"><sup class="para">[5] </sup></a> + In practice, many of intrinsic functions have default implementations that + will work in majority of cases + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="concepts/associative_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intrinsic/functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions.html new file mode 100644 index 000000000..660f43099 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions.html @@ -0,0 +1,57 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../intrinsic.html" title="Intrinsic"> +<link rel="prev" href="../intrinsic.html" title="Intrinsic"> +<link rel="next" href="functions/begin.html" title="begin"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/begin.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.intrinsic.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="functions/begin.html">begin</a></span></dt> +<dt><span class="section"><a href="functions/end.html">end</a></span></dt> +<dt><span class="section"><a href="functions/empty.html">empty</a></span></dt> +<dt><span class="section"><a href="functions/front.html">front</a></span></dt> +<dt><span class="section"><a href="functions/back.html">back</a></span></dt> +<dt><span class="section"><a href="functions/size.html">size</a></span></dt> +<dt><span class="section"><a href="functions/at.html">at</a></span></dt> +<dt><span class="section"><a href="functions/at_c.html">at_c</a></span></dt> +<dt><span class="section"><a href="functions/has_key.html">has_key</a></span></dt> +<dt><span class="section"><a href="functions/at_key.html">at_key</a></span></dt> +<dt><span class="section"><a href="functions/swap.html">swap</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="functions/begin.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at.html new file mode 100644 index 000000000..3531e5084 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at.html @@ -0,0 +1,169 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="size.html" title="size"> +<link rel="next" href="at_c.html" title="at_c"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="size.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.at"></a><a class="link" href="at.html" title="at">at</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.description"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.description">Description</a> + </h6> +<p> + Returns the N-th element from the beginning of the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.synopsis"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">N</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">N</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.parameters"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + An index from the beginning of the sequence. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.expression_semantics"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">at</span><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Returns a reference to + the N-th element from the beginning of the sequence <code class="computeroutput"><span class="identifier">seq</span></code> + if <code class="computeroutput"><span class="identifier">seq</span></code> is mutable and + <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> + is the N-th element from the beginning of the sequence, is a valid expression. + Else, returns a type convertable to the N-th element from the beginning + of the sequence. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><span class="number">0</span> + <span class="special"><=</span> <span class="identifier">N</span><span class="special">::</span><span class="identifier">value</span> <span class="special"><</span> <a class="link" href="size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to + </p> +<pre class="programlisting"><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="../../../iterator/functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)))</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.header"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at.example"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.functions.at.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">at</span><span class="special"><</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="size.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_c.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_c.html new file mode 100644 index 000000000..e721b3973 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_c.html @@ -0,0 +1,169 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at_c</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="at.html" title="at"> +<link rel="next" href="has_key.html" title="has_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.at_c"></a><a class="link" href="at_c.html" title="at_c">at_c</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.description"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.description">Description</a> + </h6> +<p> + Returns the N-th element from the beginning of the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.synopsis"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">int</span> <span class="identifier">N</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at_c</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">int</span> <span class="identifier">N</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at_c</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.parameters"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An integral constant + </p> + </td> +<td> + <p> + An index from the beginning of the sequence. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.expression_semantics"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">at_c</span><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Returns a reference to + the N-th element from the beginning of the sequence <code class="computeroutput"><span class="identifier">seq</span></code> + if <code class="computeroutput"><span class="identifier">seq</span></code> is mutable and + <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> + is the N-th element from the beginning of the sequence, is a valid expression. + Else, returns a type convertable to the N-th element from the beginning + of the sequence. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><span class="number">0</span> + <span class="special"><=</span> <span class="identifier">N</span> + <span class="special"><</span> <a class="link" href="size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Equivalent to + </p> +<pre class="programlisting"><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="../../../iterator/functions/advance.html" title="advance"><code class="computeroutput"><span class="identifier">advance</span></code></a><span class="special"><</span><span class="identifier">N</span><span class="special">>(</span><a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">)))</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.header"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at_c</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at_c</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_c.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_c.example"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.functions.at_c.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">at_c</span><span class="special"><</span><span class="number">1</span><span class="special">>(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_key.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_key.html new file mode 100644 index 000000000..74abbd1e0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_key.html @@ -0,0 +1,165 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="has_key.html" title="has_key"> +<link rel="next" href="swap.html" title="swap"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="swap.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.at_key"></a><a class="link" href="at_key.html" title="at_key">at_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.description"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.description">Description</a> + </h6> +<p> + Returns the element associated with a Key from the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.synopsis"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at_key</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">at_key</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.parameters"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The queried key. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.expression_semantics"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">at_key</span><span class="special"><</span><span class="identifier">Key</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Returns a reference to + the element associated with Key from the sequence <code class="computeroutput"><span class="identifier">seq</span></code> + if <code class="computeroutput"><span class="identifier">seq</span></code> is mutable and + <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> + is the element associated with Key, is a valid expression. Else, returns + a type convertable to the element associated with Key. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><span class="identifier">has_key</span><span class="special"><</span><span class="identifier">Key</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">true</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the element associated + with Key. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.header"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.at_key.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.at_key.example"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.functions.at_key.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">></span> <span class="identifier">s</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'x'</span><span class="special">,</span> <span class="keyword">true</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">at_key</span><span class="special"><</span><span class="keyword">char</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">==</span> <span class="char">'x'</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="swap.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/back.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/back.html new file mode 100644 index 000000000..91c08e299 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/back.html @@ -0,0 +1,146 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="front.html" title="front"> +<link rel="next" href="size.html" title="size"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.back"></a><a class="link" href="back.html" title="back">back</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.description"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.description">Description</a> + </h6> +<p> + Returns the last element in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.synopsis"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/back.html" title="back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">back</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/back.html" title="back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">back</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">back</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.parameters"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.expression_semantics"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">back</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Returns a reference to + the last element in the sequence <code class="computeroutput"><span class="identifier">seq</span></code> + if <code class="computeroutput"><span class="identifier">seq</span></code> is mutable and + <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> + is the last element in the sequence, is a valid expression. Else, returns + a type convertable to the last element in the sequence. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><a class="link" href="empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the last element + in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.header"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.back.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.back.example"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.functions.back.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">back</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/begin.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/begin.html new file mode 100644 index 000000000..915140cd6 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/begin.html @@ -0,0 +1,157 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>begin</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="../functions.html" title="Functions"> +<link rel="next" href="end.html" title="end"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.begin"></a><a class="link" href="begin.html" title="begin">begin</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.description"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.description">Description</a> + </h6> +<p> + Returns an iterator pointing to the first element in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.synopsis"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">begin</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">begin</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.parameters"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to get an iterator from. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.expression_semantics"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> else, <a class="link" href="../../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is an <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator pointing + to the first element in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.header"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.begin.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.begin.example"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.functions.begin.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">v</span><span class="special">))</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../functions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/empty.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/empty.html new file mode 100644 index 000000000..47121eb73 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/empty.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>empty</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="end.html" title="end"> +<link rel="next" href="front.html" title="front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="end.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.empty"></a><a class="link" href="empty.html" title="empty">empty</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.description"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.description">Description</a> + </h6> +<p> + Returns a type convertible to <code class="computeroutput"><span class="keyword">bool</span></code> + that evaluates to <code class="computeroutput"><span class="keyword">true</span></code> if + the sequence is empty, else, evaluates to <code class="computeroutput"><span class="keyword">false</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.synopsis"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">empty</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">empty</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.parameters"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.expression_semantics"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Evaluates to <code class="computeroutput"><span class="keyword">true</span></code> if the sequence is empty, else, evaluates + to <code class="computeroutput"><span class="keyword">false</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.header"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.empty.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.empty.example"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.functions.empty.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="end.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/end.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/end.html new file mode 100644 index 000000000..7d976148e --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/end.html @@ -0,0 +1,157 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>end</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="begin.html" title="begin"> +<link rel="next" href="empty.html" title="empty"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="begin.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="empty.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.end"></a><a class="link" href="end.html" title="end">end</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.description"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.description">Description</a> + </h6> +<p> + Returns an iterator pointing to one element past the end of the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.synopsis"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">end</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">end</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.parameters"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to get an iterator from. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.expression_semantics"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">end</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> else, <a class="link" href="../../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is an <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns an iterator pointing + to one element past the end of the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.header"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">end</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">end</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.end.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.end.example"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.functions.end.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><a class="link" href="../../../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><a class="link" href="../../../iterator/functions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">prior</span></code></a><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">v</span><span class="special">)))</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="begin.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="empty.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/front.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/front.html new file mode 100644 index 000000000..3e339cc38 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/front.html @@ -0,0 +1,146 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="empty.html" title="empty"> +<link rel="next" href="back.html" title="back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="empty.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.front"></a><a class="link" href="front.html" title="front">front</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.description"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.description">Description</a> + </h6> +<p> + Returns the first element in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.synopsis"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/front.html" title="front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">front</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/front.html" title="front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">front</span></code></a><span class="special"><</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">front</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.parameters"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.expression_semantics"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">front</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Returns a reference to + the first element in the sequence <code class="computeroutput"><span class="identifier">seq</span></code> + if <code class="computeroutput"><span class="identifier">seq</span></code> is mutable and + <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> + <span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> + is the first element in the sequence, is a valid expression. Else, returns + a type convertable to the first element in the sequence. + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><a class="link" href="empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the first element + in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.header"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.front.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.front.example"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.functions.front.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">front</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="empty.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/has_key.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/has_key.html new file mode 100644 index 000000000..71e34334b --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/has_key.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>has_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="at_c.html" title="at_c"> +<link rel="next" href="at_key.html" title="at_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.has_key"></a><a class="link" href="has_key.html" title="has_key">has_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.description"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.description">Description</a> + </h6> +<p> + Returns a type convertible to <code class="computeroutput"><span class="keyword">bool</span></code> + that evaluates to <code class="computeroutput"><span class="keyword">true</span></code> if + the sequence contains an element associated with a Key, else, evaluates + to <code class="computeroutput"><span class="keyword">false</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.synopsis"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">has_key</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.parameters"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The queried key. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.expression_semantics"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">has_key</span><span class="special"><</span><span class="identifier">Key</span><span class="special">>(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Evaluates to <code class="computeroutput"><span class="keyword">true</span></code> if the sequence contains an element + associated with Key, else, evaluates to <code class="computeroutput"><span class="keyword">false</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.header"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">has_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">has_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.has_key.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.has_key.example"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.functions.has_key.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/set.html" title="set"><code class="computeroutput"><span class="identifier">set</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">></span> <span class="identifier">s</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'x'</span><span class="special">,</span> <span class="keyword">true</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">has_key</span><span class="special"><</span><span class="keyword">char</span><span class="special">>(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">true</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/size.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/size.html new file mode 100644 index 000000000..d3c8ef917 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/size.html @@ -0,0 +1,134 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>size</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="back.html" title="back"> +<link rel="next" href="at.html" title="at"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.size"></a><a class="link" href="size.html" title="size">size</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.description"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.description">Description</a> + </h6> +<p> + Returns a type convertible to <code class="computeroutput"><span class="keyword">int</span></code> + that evaluates the number of elements in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.synopsis"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">typename</span> <a class="link" href="../metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">size</span><span class="special">(</span><span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.parameters"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq</span></code> + </p> + </td> +<td> + <p> + Model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequence we wish to investigate. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.expression_semantics"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">size</span><span class="special">(</span><span class="identifier">seq</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Convertible to <code class="computeroutput"><span class="keyword">int</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the number of elements + in the sequence. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.header"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">size</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">size</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.size.h5"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.size.example"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.functions.size.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/swap.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/swap.html new file mode 100644 index 000000000..650635d41 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/swap.html @@ -0,0 +1,132 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>swap</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../functions.html" title="Functions"> +<link rel="prev" href="at_key.html" title="at_key"> +<link rel="next" href="../metafunctions.html" title="Metafunctions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.functions.swap"></a><a class="link" href="swap.html" title="swap">swap</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.swap.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.swap.description"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.functions.swap.description">Description</a> + </h6> +<p> + Performs an element by element swap of the elements in 2 sequences. + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.swap.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.swap.synopsis"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.functions.swap.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">Seq1</span><span class="special">&</span> <span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">Seq2</span><span class="special">&</span> <span class="identifier">seq2</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.functions.swap.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.swap.parameters"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.functions.swap.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameters + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">seq1</span></code>, <code class="computeroutput"><span class="identifier">seq2</span></code> + </p> + </td> +<td> + <p> + Models of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequences whos elements we wish to swap. + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.intrinsic.functions.swap.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.swap.expression_semantics"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.functions.swap.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">seq1</span><span class="special">,</span> <span class="identifier">seq2</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code> + </p> +<p> + <span class="bold"><strong>Precondition</strong></span>: <code class="computeroutput"><a class="link" href="size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">seq1</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a><span class="special">(</span><span class="identifier">seq2</span><span class="special">)</span></code> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Calls <code class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">b1</span><span class="special">)</span></code> for corresponding elements in <code class="computeroutput"><span class="identifier">seq1</span></code> and <code class="computeroutput"><span class="identifier">seq2</span></code>. + </p> +<p> + /sequence/intrinsic/swap.hpp> + </p> +<h6> +<a name="fusion.sequence.intrinsic.functions.swap.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.functions.swap.example"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.functions.swap.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">),</span> <span class="identifier">v2</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="string">"world"</span><span class="special">);</span> +<span class="identifier">swap</span><span class="special">(</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="string">"world"</span><span class="special">));</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special">==</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions.html new file mode 100644 index 000000000..84e9c2710 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions.html @@ -0,0 +1,60 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Metafunctions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../intrinsic.html" title="Intrinsic"> +<link rel="prev" href="functions/swap.html" title="swap"> +<link rel="next" href="metafunctions/begin.html" title="begin"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/swap.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/begin.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="metafunctions/begin.html">begin</a></span></dt> +<dt><span class="section"><a href="metafunctions/end.html">end</a></span></dt> +<dt><span class="section"><a href="metafunctions/empty.html">empty</a></span></dt> +<dt><span class="section"><a href="metafunctions/front.html">front</a></span></dt> +<dt><span class="section"><a href="metafunctions/back.html">back</a></span></dt> +<dt><span class="section"><a href="metafunctions/size.html">size</a></span></dt> +<dt><span class="section"><a href="metafunctions/at.html">at</a></span></dt> +<dt><span class="section"><a href="metafunctions/at_c.html">at_c</a></span></dt> +<dt><span class="section"><a href="metafunctions/value_at.html">value_at</a></span></dt> +<dt><span class="section"><a href="metafunctions/value_at_c.html">value_at_c</a></span></dt> +<dt><span class="section"><a href="metafunctions/has_key.html">has_key</a></span></dt> +<dt><span class="section"><a href="metafunctions/at_key.html">at_key</a></span></dt> +<dt><span class="section"><a href="metafunctions/value_at_key.html">value_at_key</a></span></dt> +<dt><span class="section"><a href="metafunctions/swap.html">swap</a></span></dt> +</dl></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="functions/swap.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrinsic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="metafunctions/begin.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at.html new file mode 100644 index 000000000..9337e3ef1 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at.html @@ -0,0 +1,165 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="size.html" title="size"> +<link rel="next" href="at_c.html" title="at_c"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="size.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.at"></a><a class="link" href="at.html" title="at">at</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at.description"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.metafunctions.at.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a><a href="#ftn.fusion.sequence.intrinsic.metafunctions.at.f0" class="footnote" name="fusion.sequence.intrinsic.metafunctions.at.f0"><sup class="footnote">[6]</sup></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at.synopsis"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.metafunctions.at.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">N</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">at</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.at.t0"></a><p class="title"><b>Table 1.29. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + Index of element + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.at.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at.expression_semantics"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.metafunctions.at.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result type of + using <a class="link" href="../functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> to access the <code class="computeroutput"><span class="identifier">N</span></code>th element of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at.header"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.metafunctions.at.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at.example"></a></span><a class="link" href="at.html#fusion.sequence.intrinsic.metafunctions.at.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&>));</span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.sequence.intrinsic.metafunctions.at.f0" class="footnote"><p><a href="#fusion.sequence.intrinsic.metafunctions.at.f0" class="para"><sup class="para">[6] </sup></a> + <a class="link" href="at.html" title="at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at</span></code></a> reflects the actual return + type of the function <a class="link" href="../functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>. <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) + typically return references to its elements via the <a class="link" href="../functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a> function. If you want to + get the actual element type, use <a class="link" href="value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a> + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="size.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html new file mode 100644 index 000000000..3aca4f110 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html @@ -0,0 +1,164 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at_c</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="at.html" title="at"> +<link rel="next" href="value_at.html" title="value_at"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.at_c"></a><a class="link" href="at_c.html" title="at_c">at_c</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_c.description"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.metafunctions.at_c.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a><a href="#ftn.fusion.sequence.intrinsic.metafunctions.at_c.f0" class="footnote" name="fusion.sequence.intrinsic.metafunctions.at_c.f0"><sup class="footnote">[7]</sup></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_c.synopsis"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.metafunctions.at_c.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">int</span> <span class="identifier">M</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">at_c</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.t0"></a><p class="title"><b>Table 1.30. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span></code> + </p> + </td> +<td> + <p> + Positive integer index + </p> + </td> +<td> + <p> + Index of element + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_c.expression_semantics"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.metafunctions.at_c.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result type of + using <a class="link" href="../functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a> to access the <code class="computeroutput"><span class="identifier">M</span></code>th element of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_c.header"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.metafunctions.at_c.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_c.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_c.example"></a></span><a class="link" href="at_c.html#fusion.sequence.intrinsic.metafunctions.at_c.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">,</span> <span class="number">1</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">float</span><span class="special">&>));</span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.sequence.intrinsic.metafunctions.at_c.f0" class="footnote"><p><a href="#fusion.sequence.intrinsic.metafunctions.at_c.f0" class="para"><sup class="para">[7] </sup></a> + <a class="link" href="at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a> reflects the actual return + type of the function <a class="link" href="../functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a>. <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) + typically return references to its elements via the <a class="link" href="../functions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">at_c</span></code></a> function. If you want + to get the actual element type, use <a class="link" href="value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a> + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html new file mode 100644 index 000000000..06803b148 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html @@ -0,0 +1,166 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>at_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="has_key.html" title="has_key"> +<link rel="next" href="value_at_key.html" title="value_at_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.at_key"></a><a class="link" href="at_key.html" title="at_key">at_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_key.description"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><a href="#ftn.fusion.sequence.intrinsic.metafunctions.at_key.f0" class="footnote" name="fusion.sequence.intrinsic.metafunctions.at_key.f0"><sup class="footnote">[8]</sup></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_key.synopsis"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">at_key</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.t0"></a><p class="title"><b>Table 1.34. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Key type + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_key.expression_semantics"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the result of using + <a class="link" href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a> to access the element + with key type <code class="computeroutput"><span class="identifier">Key</span></code> in + <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_key.header"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.at_key.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.at_key.example"></a></span><a class="link" href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="special">></span> <span class="identifier">mymap</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">mymap</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&>));</span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.sequence.intrinsic.metafunctions.at_key.f0" class="footnote"><p><a href="#fusion.sequence.intrinsic.metafunctions.at_key.f0" class="para"><sup class="para">[8] </sup></a> + <a class="link" href="at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a> reflects the actual + return type of the function <a class="link" href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>. __sequence__s typically + return references to its elements via the <a class="link" href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a> function. If you want + to get the actual element type, use <a class="link" href="value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a> + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/back.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/back.html new file mode 100644 index 000000000..b38f26249 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/back.html @@ -0,0 +1,134 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>back</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="front.html" title="front"> +<link rel="next" href="size.html" title="size"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.back"></a><a class="link" href="back.html" title="back">back</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.back.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.back.description"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.metafunctions.back.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/back.html" title="back"><code class="computeroutput"><span class="identifier">back</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.back.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.back.synopsis"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.metafunctions.back.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">back</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.back.t0"></a><p class="title"><b>Table 1.27. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.back.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.back.expression_semantics"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.metafunctions.back.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">back</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: The type returned by dereferencing + an iterator to the last element in the sequence. Equivalent to <code class="computeroutput"><a class="link" href="../../../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><a class="link" href="../../../iterator/metafunctions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><a class="link" href="end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.back.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.back.header"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.metafunctions.back.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">back</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.back.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.back.example"></a></span><a class="link" href="back.html#fusion.sequence.intrinsic.metafunctions.back.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="back.html" title="back"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">back</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="front.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html new file mode 100644 index 000000000..276549502 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>begin</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="../metafunctions.html" title="Metafunctions"> +<link rel="next" href="end.html" title="end"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.begin"></a><a class="link" href="begin.html" title="begin">begin</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.begin.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.description"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.begin.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.synopsis"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">begin</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.begin.t0"></a><p class="title"><b>Table 1.23. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.begin.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.expression_semantics"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> else, <a class="link" href="../../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is an <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the type of an iterator + to the first element of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.begin.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.header"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.begin.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.example"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">it</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="../../../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><span class="identifier">it</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html new file mode 100644 index 000000000..802c09591 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html @@ -0,0 +1,139 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>empty</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="end.html" title="end"> +<link rel="next" href="front.html" title="front"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="end.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.empty"></a><a class="link" href="empty.html" title="empty">empty</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.empty.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.empty.description"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.metafunctions.empty.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/empty.html" title="empty"><code class="computeroutput"><span class="identifier">empty</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.empty.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.empty.synopsis"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.metafunctions.empty.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">empty</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.empty.t0"></a><p class="title"><b>Table 1.25. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.empty.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.empty.expression_semantics"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.metafunctions.empty.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">empty</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if <code class="computeroutput"><span class="identifier">Seq</span></code> has zero elements, + <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> otherwise. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.empty.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.empty.header"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.metafunctions.empty.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.empty.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.empty.example"></a></span><a class="link" href="empty.html#fusion.sequence.intrinsic.metafunctions.empty.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="identifier">empty_vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="empty.html" title="empty"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">empty</span></code></a><span class="special"><</span><span class="identifier">empty_vec</span><span class="special">>));</span> +<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span><a class="link" href="empty.html" title="empty"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">empty</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="end.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="front.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/end.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/end.html new file mode 100644 index 000000000..707c18296 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/end.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>end</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="begin.html" title="begin"> +<link rel="next" href="empty.html" title="empty"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="begin.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="empty.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.end"></a><a class="link" href="end.html" title="end">end</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.end.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.end.description"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.metafunctions.end.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.end.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.end.synopsis"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.metafunctions.end.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">end</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.end.t0"></a><p class="title"><b>Table 1.24. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.end.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.end.expression_semantics"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.metafunctions.end.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> else, <a class="link" href="../../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random + Access Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is a <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + A model of <a class="link" href="../../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code> + is an <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a>. + </li> +</ul></div> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the type of an iterator + one past the end of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.end.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.end.header"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.metafunctions.end.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">end</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">end</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.end.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.end.example"></a></span><a class="link" href="end.html#fusion.sequence.intrinsic.metafunctions.end.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../../../iterator/metafunctions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><a class="link" href="end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">first</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="../../../iterator/metafunctions/equal_to.html" title="equal_to"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">equal_to</span></code></a><span class="special"><</span><span class="identifier">first</span><span class="special">,</span> <a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="begin.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="empty.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/front.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/front.html new file mode 100644 index 000000000..52541b03a --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/front.html @@ -0,0 +1,135 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>front</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="empty.html" title="empty"> +<link rel="next" href="back.html" title="back"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="empty.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.front"></a><a class="link" href="front.html" title="front">front</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.front.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.front.description"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.metafunctions.front.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/front.html" title="front"><code class="computeroutput"><span class="identifier">front</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.front.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.front.synopsis"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.metafunctions.front.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">front</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.front.t0"></a><p class="title"><b>Table 1.26. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.front.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.front.expression_semantics"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.metafunctions.front.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">front</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: The type returned by dereferencing + an iterator to the first element in <code class="computeroutput"><span class="identifier">Seq</span></code>. + Equivalent to <code class="computeroutput"><a class="link" href="../../../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special"><</span><a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.front.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.front.header"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.metafunctions.front.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">front</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.front.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.front.example"></a></span><a class="link" href="front.html#fusion.sequence.intrinsic.metafunctions.front.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="front.html" title="front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">front</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="empty.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="back.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html new file mode 100644 index 000000000..3035d62dd --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html @@ -0,0 +1,159 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>has_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="value_at_c.html" title="value_at_c"> +<link rel="next" href="at_key.html" title="at_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.has_key"></a><a class="link" href="has_key.html" title="has_key">has_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.has_key.description"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.metafunctions.has_key.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.has_key.synopsis"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.metafunctions.has_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">has_key</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.t0"></a><p class="title"><b>Table 1.33. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Key type + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.has_key.expression_semantics"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.metafunctions.has_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if <code class="computeroutput"><span class="identifier">Seq</span></code> contains an element + with key type <code class="computeroutput"><span class="identifier">Key</span></code>, returns + <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> otherwise. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.has_key.header"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.metafunctions.has_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">has_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">has_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.has_key.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.has_key.example"></a></span><a class="link" href="has_key.html#fusion.sequence.intrinsic.metafunctions.has_key.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="special">></span> <span class="identifier">mymap</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><a class="link" href="has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">mymap</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>));</span> +<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span><a class="link" href="has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special"><</span><span class="identifier">mymap</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/size.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/size.html new file mode 100644 index 000000000..ae7b1bbfe --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/size.html @@ -0,0 +1,136 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>size</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="back.html" title="back"> +<link rel="next" href="at.html" title="at"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.size"></a><a class="link" href="size.html" title="size">size</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.size.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.size.description"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.metafunctions.size.description">Description</a> + </h6> +<p> + Returns the result type of <a class="link" href="../functions/size.html" title="size"><code class="computeroutput"><span class="identifier">size</span></code></a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.size.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.size.synopsis"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.metafunctions.size.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">size</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.size.t0"></a><p class="title"><b>Table 1.28. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.size.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.size.expression_semantics"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.metafunctions.size.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the number of elements + in <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.size.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.size.header"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.metafunctions.size.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">size</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">size</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.size.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.size.example"></a></span><a class="link" href="size.html#fusion.sequence.intrinsic.metafunctions.size.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">size_mpl_integral_constant</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT_RELATION</span><span class="special">(</span><span class="identifier">size_mpl_integral_constant</span><span class="special">::</span><span class="identifier">value</span><span class="special">,</span> <span class="special">==,</span> <span class="number">3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="back.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="at.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html new file mode 100644 index 000000000..57b15ba8d --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html @@ -0,0 +1,126 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>swap</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="value_at_key.html" title="value_at_key"> +<link rel="next" href="../../operator.html" title="Operator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../operator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.swap"></a><a class="link" href="swap.html" title="swap">swap</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.swap.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.swap.description"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.metafunctions.swap.description">Description</a> + </h6> +<p> + Returns the return type of swap. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.swap.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.swap.synopsis"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.metafunctions.swap.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">swap</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.swap.t0"></a><p class="title"><b>Table 1.36. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameters + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq1</span></code>, <code class="computeroutput"><span class="identifier">Seq2</span></code> + </p> + </td> +<td> + <p> + Models of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + <p> + The sequences being swapped + </p> + </td> +</tr></tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.swap.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.swap.expression_semantics"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.metafunctions.swap.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">swap</span><span class="special"><</span><span class="identifier">Seq1</span><span class="special">,</span> <span class="identifier">Seq2</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Always returns <code class="computeroutput"><span class="keyword">void</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.swap.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.swap.header"></a></span><a class="link" href="swap.html#fusion.sequence.intrinsic.metafunctions.swap.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">swap</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">swap</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../operator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html new file mode 100644 index 000000000..b64cbd673 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html @@ -0,0 +1,156 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>value_at</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="at_c.html" title="at_c"> +<link rel="next" href="value_at_c.html" title="value_at_c"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at"></a><a class="link" href="value_at.html" title="value_at">value_at</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at.description"></a></span><a class="link" href="value_at.html#fusion.sequence.intrinsic.metafunctions.value_at.description">Description</a> + </h6> +<p> + Returns the actual type at a given index from the <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at.synopsis"></a></span><a class="link" href="value_at.html#fusion.sequence.intrinsic.metafunctions.value_at.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">N</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_at</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.t0"></a><p class="title"><b>Table 1.31. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">N</span></code> + </p> + </td> +<td> + <p> + An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> + </td> +<td> + <p> + Index of element + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at.expression_semantics"></a></span><a class="link" href="value_at.html#fusion.sequence.intrinsic.metafunctions.value_at.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the actual type at + the <code class="computeroutput"><span class="identifier">N</span></code>th element of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at.header"></a></span><a class="link" href="value_at.html#fusion.sequence.intrinsic.metafunctions.value_at.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">value_at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">value_at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at.example"></a></span><a class="link" href="value_at.html#fusion.sequence.intrinsic.metafunctions.value_at.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">float</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_c.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="value_at_c.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html new file mode 100644 index 000000000..c1edb35b0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html @@ -0,0 +1,155 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>value_at_c</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="value_at.html" title="value_at"> +<link rel="next" href="has_key.html" title="has_key"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c"></a><a class="link" href="value_at_c.html" title="value_at_c">value_at_c</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_c.description"></a></span><a class="link" href="value_at_c.html#fusion.sequence.intrinsic.metafunctions.value_at_c.description">Description</a> + </h6> +<p> + Returns the actual type at a given index from the <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_c.synopsis"></a></span><a class="link" href="value_at_c.html#fusion.sequence.intrinsic.metafunctions.value_at_c.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">int</span> <span class="identifier">M</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_at_c</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.t0"></a><p class="title"><b>Table 1.32. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">M</span></code> + </p> + </td> +<td> + <p> + Positive integer index + </p> + </td> +<td> + <p> + Index of element + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_c.expression_semantics"></a></span><a class="link" href="value_at_c.html#fusion.sequence.intrinsic.metafunctions.value_at_c.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">M</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the actual type at + the <code class="computeroutput"><span class="identifier">M</span></code>th element of <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_c.header"></a></span><a class="link" href="value_at_c.html#fusion.sequence.intrinsic.metafunctions.value_at_c.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">value_at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">value_at</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_c.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_c.example"></a></span><a class="link" href="value_at_c.html#fusion.sequence.intrinsic.metafunctions.value_at_c.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="value_at_c.html" title="value_at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_c</span></code></a><span class="special"><</span><span class="identifier">vec</span><span class="special">,</span> <span class="number">1</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">float</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="value_at.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="has_key.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html new file mode 100644 index 000000000..63d5b6f08 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html @@ -0,0 +1,156 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>value_at_key</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../metafunctions.html" title="Metafunctions"> +<link rel="prev" href="at_key.html" title="at_key"> +<link rel="next" href="swap.html" title="swap"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="swap.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key"></a><a class="link" href="value_at_key.html" title="value_at_key">value_at_key</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.h0"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_key.description"></a></span><a class="link" href="value_at_key.html#fusion.sequence.intrinsic.metafunctions.value_at_key.description">Description</a> + </h6> +<p> + Returns the actual element type associated with a Key from the <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.h1"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_key.synopsis"></a></span><a class="link" href="value_at_key.html#fusion.sequence.intrinsic.metafunctions.value_at_key.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">value_at_key</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> +<span class="special">};</span> +</pre> +<div class="table"> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.t0"></a><p class="title"><b>Table 1.35. Parameters</b></p> +<div class="table-contents"><table class="table" summary="Parameters"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Seq</span></code> + </p> + </td> +<td> + <p> + A model of <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> + </p> + </td> +<td> + <p> + Argument sequence + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Key</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + Key type + </p> + </td> +</tr> +</tbody> +</table></div> +</div> +<br class="table-break"><h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.h2"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_key.expression_semantics"></a></span><a class="link" href="value_at_key.html#fusion.sequence.intrinsic.metafunctions.value_at_key.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the actual element + type associated with key type <code class="computeroutput"><span class="identifier">Key</span></code> + in <code class="computeroutput"><span class="identifier">Seq</span></code>. + </p> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.h3"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_key.header"></a></span><a class="link" href="value_at_key.html#fusion.sequence.intrinsic.metafunctions.value_at_key.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">value_at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">value_at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.intrinsic.metafunctions.value_at_key.h4"></a> + <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.value_at_key.example"></a></span><a class="link" href="value_at_key.html#fusion.sequence.intrinsic.metafunctions.value_at_key.example">Example</a> + </h6> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special"><</span><a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>,</span> <a class="link" href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="special">></span> <span class="identifier">mymap</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><a class="link" href="at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special"><</span><span class="identifier">mymap</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">char</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="at_key.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="swap.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator.html b/libs/fusion/doc/html/fusion/sequence/operator.html new file mode 100644 index 000000000..0ddaf0297 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator.html @@ -0,0 +1,53 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Operator</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../sequence.html" title="Sequence"> +<link rel="prev" href="intrinsic/metafunctions/swap.html" title="swap"> +<link rel="next" href="operator/i_o.html" title="I/O"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="intrinsic/metafunctions/swap.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator/i_o.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.sequence.operator"></a><a class="link" href="operator.html" title="Operator">Operator</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="operator/i_o.html">I/O</a></span></dt> +<dt><span class="section"><a href="operator/comparison.html">Comparison</a></span></dt> +</dl></div> +<p> + These operators, like the <a class="link" href="../algorithm.html" title="Algorithm">Algorithms</a>, + work generically on all Fusion sequences. All conforming Fusion sequences + automatically get these operators for free. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="intrinsic/metafunctions/swap.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sequence.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator/i_o.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison.html new file mode 100644 index 000000000..f2423c4b0 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison.html @@ -0,0 +1,73 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Comparison</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../operator.html" title="Operator"> +<link rel="prev" href="i_o/out.html" title="out"> +<link rel="next" href="comparison/equal.html" title="equal"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="i_o/out.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="comparison/equal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.operator.comparison"></a><a class="link" href="comparison.html" title="Comparison">Comparison</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="comparison/equal.html">equal</a></span></dt> +<dt><span class="section"><a href="comparison/not_equal.html">not + equal</a></span></dt> +<dt><span class="section"><a href="comparison/less_than.html">less + than</a></span></dt> +<dt><span class="section"><a href="comparison/less_than_equal.html">less + than equal</a></span></dt> +<dt><span class="section"><a href="comparison/greater_than.html">greater + than</a></span></dt> +<dt><span class="section"><a href="comparison/greater_than_equal.html">greater + than equal</a></span></dt> +</dl></div> +<p> + The Comparison operators: <code class="computeroutput"><span class="special">==</span></code>, + <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special"><</span></code>, + <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">>=</span></code> + and <code class="computeroutput"><span class="special">>=</span></code> work generically + on all Fusion sequences. Comparison operators are "short- circuited": + elementary comparisons start from the first elements and are performed + only until the result is clear. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.header"></a></span><a class="link" href="comparison.html#fusion.sequence.operator.comparison.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="i_o/out.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="comparison/equal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/equal.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/equal.html new file mode 100644 index 000000000..fd7b51465 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/equal.html @@ -0,0 +1,154 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>equal</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="../comparison.html" title="Comparison"> +<link rel="next" href="not_equal.html" title="not equal"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../comparison.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="not_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.equal"></a><a class="link" href="equal.html" title="equal">equal</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.description"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.description">Description</a> + </h6> +<p> + Compare two sequences for equality. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.synopsis"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special">==(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.parameters"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.expression_semantics"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special">==</span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special">==</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">e1</span> <span class="special">==</span> <span class="identifier">e2</span></code> returns true. For any 2 zero length + __sequence__s, e and f, e == f returns true. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.header"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.equal.h5"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.equal.example"></a></span><a class="link" href="equal.html#fusion.sequence.operator.comparison.equal.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special">==</span> <span class="identifier">v2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../comparison.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="not_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than.html new file mode 100644 index 000000000..ad75c2409 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than.html @@ -0,0 +1,146 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>greater than</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="less_than_equal.html" title="less than equal"> +<link rel="next" href="greater_than_equal.html" title="greater than equal"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greater_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.greater_than"></a><a class="link" href="greater_than.html" title="greater than">greater + than</a> +</h5></div></div></div> +<p> + Lexicographically compare two sequences. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.synopsis"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special">>(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.parameters"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.expression_semantics"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special">></span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special"><</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns b < a. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.header"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than.example"></a></span><a class="link" href="greater_than.html#fusion.sequence.operator.comparison.greater_than.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">4.4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special">></span> <span class="identifier">v1</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v3</span> <span class="special">></span> <span class="identifier">v2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greater_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html new file mode 100644 index 000000000..3e91b1907 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html @@ -0,0 +1,146 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>greater than equal</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="greater_than.html" title="greater than"> +<link rel="next" href="../../../container.html" title="Container"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="greater_than.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../container.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.greater_than_equal"></a><a class="link" href="greater_than_equal.html" title="greater than equal">greater + than equal</a> +</h5></div></div></div> +<p> + Lexicographically compare two sequences. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than_equal.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than_equal.synopsis"></a></span><a class="link" href="greater_than_equal.html#fusion.sequence.operator.comparison.greater_than_equal.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special">>=(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than_equal.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than_equal.parameters"></a></span><a class="link" href="greater_than_equal.html#fusion.sequence.operator.comparison.greater_than_equal.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than_equal.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than_equal.expression_semantics"></a></span><a class="link" href="greater_than_equal.html#fusion.sequence.operator.comparison.greater_than_equal.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special">>=</span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special"><</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns !(a < b). + </p> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than_equal.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than_equal.header"></a></span><a class="link" href="greater_than_equal.html#fusion.sequence.operator.comparison.greater_than_equal.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">greater_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">greater_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.greater_than_equal.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.greater_than_equal.example"></a></span><a class="link" href="greater_than_equal.html#fusion.sequence.operator.comparison.greater_than_equal.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">4.4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special">>=</span> <span class="identifier">v1</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v3</span> <span class="special">>=</span> <span class="identifier">v2</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="greater_than.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../container.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than.html new file mode 100644 index 000000000..4f357b16a --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than.html @@ -0,0 +1,148 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>less than</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="not_equal.html" title="not equal"> +<link rel="next" href="less_than_equal.html" title="less than equal"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="not_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.less_than"></a><a class="link" href="less_than.html" title="less than">less + than</a> +</h5></div></div></div> +<p> + Lexicographically compare two sequences. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.less_than.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than.synopsis"></a></span><a class="link" href="less_than.html#fusion.sequence.operator.comparison.less_than.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special"><(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.less_than.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than.parameters"></a></span><a class="link" href="less_than.html#fusion.sequence.operator.comparison.less_than.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.less_than.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than.expression_semantics"></a></span><a class="link" href="less_than.html#fusion.sequence.operator.comparison.less_than.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special"><</span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special"><</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the lexicographical + comparison of between <code class="computeroutput"><span class="identifier">a</span></code> + and <code class="computeroutput"><span class="identifier">b</span></code>. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.less_than.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than.header"></a></span><a class="link" href="less_than.html#fusion.sequence.operator.comparison.less_than.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">less</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">less</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.less_than.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than.example"></a></span><a class="link" href="less_than.html#fusion.sequence.operator.comparison.less_than.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">4.4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special"><</span> <span class="identifier">v2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special"><</span> <span class="identifier">v3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="not_equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="less_than_equal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than_equal.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than_equal.html new file mode 100644 index 000000000..065d3a739 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/less_than_equal.html @@ -0,0 +1,146 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>less than equal</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="less_than.html" title="less than"> +<link rel="next" href="greater_than.html" title="greater than"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="less_than.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greater_than.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.less_than_equal"></a><a class="link" href="less_than_equal.html" title="less than equal">less + than equal</a> +</h5></div></div></div> +<p> + Lexicographically compare two sequences. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.less_than_equal.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than_equal.synopsis"></a></span><a class="link" href="less_than_equal.html#fusion.sequence.operator.comparison.less_than_equal.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special"><=(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.less_than_equal.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than_equal.parameters"></a></span><a class="link" href="less_than_equal.html#fusion.sequence.operator.comparison.less_than_equal.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.less_than_equal.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than_equal.expression_semantics"></a></span><a class="link" href="less_than_equal.html#fusion.sequence.operator.comparison.less_than_equal.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special"><=</span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special"><</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns !(b < a). + </p> +<h6> +<a name="fusion.sequence.operator.comparison.less_than_equal.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than_equal.header"></a></span><a class="link" href="less_than_equal.html#fusion.sequence.operator.comparison.less_than_equal.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">less_equal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.less_than_equal.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.less_than_equal.example"></a></span><a class="link" href="less_than_equal.html#fusion.sequence.operator.comparison.less_than_equal.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">float</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">3.3f</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">4.4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special"><=</span> <span class="identifier">v2</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v2</span> <span class="special"><=</span> <span class="identifier">v3</span><span class="special">);</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="less_than.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="greater_than.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/comparison/not_equal.html b/libs/fusion/doc/html/fusion/sequence/operator/comparison/not_equal.html new file mode 100644 index 000000000..154395447 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/comparison/not_equal.html @@ -0,0 +1,149 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>not equal</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../comparison.html" title="Comparison"> +<link rel="prev" href="equal.html" title="equal"> +<link rel="next" href="less_than.html" title="less than"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="less_than.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.comparison.not_equal"></a><a class="link" href="not_equal.html" title="not equal">not + equal</a> +</h5></div></div></div> +<p> + Compare two sequences for inequality. + </p> +<h6> +<a name="fusion.sequence.operator.comparison.not_equal.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.not_equal.synopsis"></a></span><a class="link" href="not_equal.html#fusion.sequence.operator.comparison.not_equal.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Seq1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Seq2</span><span class="special">></span> +<span class="keyword">bool</span> +<span class="keyword">operator</span><span class="special">!=(</span><span class="identifier">Seq1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">Seq2</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">b</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.not_equal.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.not_equal.parameters"></a></span><a class="link" href="not_equal.html#fusion.sequence.operator.comparison.not_equal.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">a</span><span class="special">,</span> + <span class="identifier">b</span></code> + </p> + </td> +<td> + <p> + Instances of <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> + </p> + </td> +<td> + <p> + <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>(s) to compare + </p> + </td> +</tr></tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.comparison.not_equal.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.not_equal.expression_semantics"></a></span><a class="link" href="not_equal.html#fusion.sequence.operator.comparison.not_equal.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">a</span> <span class="special">!=</span> <span class="identifier">b</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="keyword">bool</span></code> + </p> +<p> + <span class="bold"><strong>Requirements</strong></span>: + </p> +<p> + For each element, <code class="computeroutput"><span class="identifier">e1</span></code>, + in sequence <code class="computeroutput"><span class="identifier">a</span></code>, and for + each element, <code class="computeroutput"><span class="identifier">e2</span></code>, in + sequence <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">a</span> <span class="special">==</span> <span class="identifier">b</span></code> is a valid expression returning a + type that is convertible to bool. + </p> +<p> + An attempt to compare two Sequences of different lengths results in a + compile time error. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: + </p> +<p> + Returns !(a == b). + </p> +<h6> +<a name="fusion.sequence.operator.comparison.not_equal.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.not_equal.header"></a></span><a class="link" href="not_equal.html#fusion.sequence.operator.comparison.not_equal.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">/</span><span class="identifier">not_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">not_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.comparison.not_equal.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.comparison.not_equal.example"></a></span><a class="link" href="not_equal.html#fusion.sequence.operator.comparison.not_equal.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">v3</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="char">'b'</span><span class="special">);</span> +<a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">t4</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special">!=</span> <span class="identifier">v3</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(</span><span class="identifier">v1</span> <span class="special">!=</span> <span class="identifier">t4</span><span class="special">);</span> +<span class="identifier">assert</span><span class="special">(!(</span><span class="identifier">v1</span> <span class="special">!=</span> <span class="identifier">v2</span><span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="equal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../comparison.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="less_than.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/i_o.html b/libs/fusion/doc/html/fusion/sequence/operator/i_o.html new file mode 100644 index 000000000..1687bef40 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/i_o.html @@ -0,0 +1,151 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>I/O</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../operator.html" title="Operator"> +<link rel="prev" href="../operator.html" title="Operator"> +<link rel="next" href="i_o/in.html" title="in"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../operator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="i_o/in.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.sequence.operator.i_o"></a><a class="link" href="i_o.html" title="I/O">I/O</a> +</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="i_o/in.html">in</a></span></dt> +<dt><span class="section"><a href="i_o/out.html">out</a></span></dt> +</dl></div> +<p> + The I/O operators: <code class="computeroutput"><span class="special"><<</span></code> + and <code class="computeroutput"><span class="special">>></span></code> work generically + on all Fusion sequences. The I/O operators are overloaded in namespace + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span></code> <a href="#ftn.fusion.sequence.operator.i_o.f0" class="footnote" name="fusion.sequence.operator.i_o.f0"><sup class="footnote">[9]</sup></a> + </p> +<p> + The <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<</span></code> + has been overloaded for generic output streams such that <a class="link" href="../../sequence.html" title="Sequence">Sequence</a>(s) + are output by recursively calling <code class="computeroutput"><span class="keyword">operator</span><span class="special"><<</span></code> for each element. Analogously, + the global <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code> + has been overloaded to extract <a class="link" href="../../sequence.html" title="Sequence">Sequence</a>(s) + from generic input streams by recursively calling <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code> for each element. + </p> +<p> + The default delimiter between the elements is space, and the <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + is enclosed in parenthesis. For Example: + </p> +<pre class="programlisting"><a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">1.0f</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"Howdy folks!"</span><span class="special">);</span> +<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">a</span><span class="special">;</span> +</pre> +<p> + outputs the <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + as: (1.0 2 Howdy folks!) + </p> +<p> + The library defines three manipulators for changing the default behavior: + </p> +<div class="variablelist"> +<p class="title"><b>Manipulators</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">tuple_open</span><span class="special">(</span><span class="identifier">arg</span><span class="special">)</span></code></span></dt> +<dd><p> + Defines the character that is output before the first element. + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">tuple_close</span><span class="special">(</span><span class="identifier">arg</span><span class="special">)</span></code></span></dt> +<dd><p> + Defines the character that is output after the last element. + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">tuple_delimiter</span><span class="special">(</span><span class="identifier">arg</span><span class="special">)</span></code></span></dt> +<dd><p> + Defines the delimiter character between elements. + </p></dd> +</dl> +</div> +<p> + The argument to <code class="computeroutput"><span class="identifier">tuple_open</span></code>, + <code class="computeroutput"><span class="identifier">tuple_close</span></code> and <code class="computeroutput"><span class="identifier">tuple_delimiter</span></code> may be a <code class="computeroutput"><span class="keyword">char</span></code>, <code class="computeroutput"><span class="keyword">wchar_t</span></code>, + a C-string, or a wide C-string. + </p> +<p> + Example: + </p> +<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">tuple_open</span><span class="special">(</span><span class="char">'['</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">tuple_close</span><span class="special">(</span><span class="char">']'</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">tuple_delimiter</span><span class="special">(</span><span class="string">", "</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">a</span><span class="special">;</span> +</pre> +<p> + outputs the same <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>, <code class="computeroutput"><span class="identifier">a</span></code> + as: [1.0, 2, Howdy folks!] + </p> +<p> + The same manipulators work with <code class="computeroutput"><span class="keyword">operator</span><span class="special">>></span></code> and <code class="computeroutput"><span class="identifier">istream</span></code> + as well. Suppose the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span></code> + stream contains the following data: + </p> +<pre class="programlisting"><span class="special">(</span><span class="number">1</span> <span class="number">2</span> <span class="number">3</span><span class="special">)</span> <span class="special">[</span><span class="number">4</span><span class="special">:</span><span class="number">5</span><span class="special">]</span> +</pre> +<p> + The code: + </p> +<pre class="programlisting"><a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">i</span><span class="special">;</span> +<a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">j</span><span class="special">;</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span> <span class="special">>></span> <span class="identifier">i</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span> <span class="special">>></span> <span class="identifier">set_open</span><span class="special">(</span><span class="char">'['</span><span class="special">)</span> <span class="special">>></span> <span class="identifier">set_close</span><span class="special">(</span><span class="char">']'</span><span class="special">)</span> <span class="special">>></span> <span class="identifier">set_delimiter</span><span class="special">(</span><span class="char">':'</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span> <span class="special">>></span> <span class="identifier">j</span><span class="special">;</span> +</pre> +<p> + reads the data into the <a class="link" href="../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>(s) <code class="computeroutput"><span class="identifier">i</span></code> + and <code class="computeroutput"><span class="identifier">j</span></code>. + </p> +<p> + Note that extracting <a class="link" href="../../sequence.html" title="Sequence">Sequence</a>(s) + with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> or C-style string elements does + not generally work, since the streamed <a class="link" href="../../sequence.html" title="Sequence">Sequence</a> + representation may not be unambiguously parseable. + </p> +<h6> +<a name="fusion.sequence.operator.i_o.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.header"></a></span><a class="link" href="i_o.html#fusion.sequence.operator.i_o.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<div class="footnotes"> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.fusion.sequence.operator.i_o.f0" class="footnote"><p><a href="#fusion.sequence.operator.i_o.f0" class="para"><sup class="para">[9] </sup></a> + __sequences__ and <a class="link" href="../../view.html" title="View">Views</a> residing in + different namespaces will have to either provide their own I/O operators + (possibly forwarding to fusion's I/O operators) or hoist fusion's I/O + operators (using declaration), in their own namespaces for proper argument + dependent lookup. + </p></div> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../operator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="i_o/in.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/i_o/in.html b/libs/fusion/doc/html/fusion/sequence/operator/i_o/in.html new file mode 100644 index 000000000..3b7c2dff2 --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/i_o/in.html @@ -0,0 +1,153 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>in</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../i_o.html" title="I/O"> +<link rel="prev" href="../i_o.html" title="I/O"> +<link rel="next" href="out.html" title="out"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../i_o.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="out.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.i_o.in"></a><a class="link" href="in.html" title="in">in</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.operator.i_o.in.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.description"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.description">Description</a> + </h6> +<p> + Read a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> from an input + stream. + </p> +<h6> +<a name="fusion.sequence.operator.i_o.in.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.synopsis"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">IStream</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="identifier">IStream</span><span class="special">&</span> +<span class="keyword">operator</span><span class="special">>>(</span><span class="identifier">IStream</span><span class="special">&</span> <span class="identifier">is</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.i_o.in.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.parameters"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + is + </p> + </td> +<td> + <p> + An input stream. + </p> + </td> +<td> + <p> + Stream to extract information from. + </p> + </td> +</tr> +<tr> +<td> + <p> + seq + </p> + </td> +<td> + <p> + A <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> + </td> +<td> + <p> + The sequence to read. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.i_o.in.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.expression_semantics"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">is</span> <span class="special">>></span> <span class="identifier">seq</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: IStream& + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: For each element, <code class="computeroutput"><span class="identifier">e</span></code>, in sequence, <code class="computeroutput"><span class="identifier">seq</span></code>, + call <code class="computeroutput"><span class="identifier">is</span> <span class="special">>></span> + <span class="identifier">e</span></code>. + </p> +<h6> +<a name="fusion.sequence.operator.i_o.in.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.header"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">io</span><span class="special">/</span><span class="identifier">in</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">in</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.i_o.in.h5"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.in.example"></a></span><a class="link" href="in.html#fusion.sequence.operator.i_o.in.example">Example</a> + </h6> +<pre class="programlisting"><a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">v</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cin</span> <span class="special">>></span> <span class="identifier">v</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../i_o.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="out.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/sequence/operator/i_o/out.html b/libs/fusion/doc/html/fusion/sequence/operator/i_o/out.html new file mode 100644 index 000000000..958d3f0dc --- /dev/null +++ b/libs/fusion/doc/html/fusion/sequence/operator/i_o/out.html @@ -0,0 +1,152 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>out</title> +<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../i_o.html" title="I/O"> +<link rel="prev" href="in.html" title="in"> +<link rel="next" href="../comparison.html" title="Comparison"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="in.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../comparison.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="fusion.sequence.operator.i_o.out"></a><a class="link" href="out.html" title="out">out</a> +</h5></div></div></div> +<h6> +<a name="fusion.sequence.operator.i_o.out.h0"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.description"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.description">Description</a> + </h6> +<p> + Write a <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a> to an output + stream. + </p> +<h6> +<a name="fusion.sequence.operator.i_o.out.h1"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.synopsis"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.synopsis">Synopsis</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">OStream</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="identifier">OStream</span><span class="special">&</span> +<span class="keyword">operator</span><span class="special"><<(</span><span class="identifier">OStream</span><span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">);</span> +</pre> +<h6> +<a name="fusion.sequence.operator.i_o.out.h2"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.parameters"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.parameters">Parameters</a> + </h6> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + os + </p> + </td> +<td> + <p> + An output stream. + </p> + </td> +<td> + <p> + Stream to write information to. + </p> + </td> +</tr> +<tr> +<td> + <p> + seq + </p> + </td> +<td> + <p> + A <a class="link" href="../../../sequence.html" title="Sequence">Sequence</a>. + </p> + </td> +<td> + <p> + The sequence to write. + </p> + </td> +</tr> +</tbody> +</table></div> +<h6> +<a name="fusion.sequence.operator.i_o.out.h3"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.expression_semantics"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.expression_semantics">Expression + Semantics</a> + </h6> +<pre class="programlisting"><span class="identifier">os</span> <span class="special"><<</span> <span class="identifier">seq</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: OStream& + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: For each element, <code class="computeroutput"><span class="identifier">e</span></code>, in sequence, <code class="computeroutput"><span class="identifier">seq</span></code>, + call <code class="computeroutput"><span class="identifier">os</span> <span class="special"><<</span> + <span class="identifier">e</span></code>. + </p> +<h6> +<a name="fusion.sequence.operator.i_o.out.h4"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.header"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.header">Header</a> + </h6> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">io</span><span class="special">/</span><span class="identifier">out</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">out</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h6> +<a name="fusion.sequence.operator.i_o.out.h5"></a> + <span class="phrase"><a name="fusion.sequence.operator.i_o.out.example"></a></span><a class="link" href="out.html#fusion.sequence.operator.i_o.out.example">Example</a> + </h6> +<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <a class="link" href="../../../container/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">123</span><span class="special">,</span> <span class="string">"Hello"</span><span class="special">,</span> <span class="char">'x'</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="in.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../i_o.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../comparison.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support.html b/libs/fusion/doc/html/fusion/support.html new file mode 100644 index 000000000..806b8a170 --- /dev/null +++ b/libs/fusion/doc/html/fusion/support.html @@ -0,0 +1,56 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Support</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="organization.html" title="Organization"> +<link rel="next" href="support/is_sequence.html" title="is_sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="organization.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="support/is_sequence.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.support"></a><a class="link" href="support.html" title="Support">Support</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="support/is_sequence.html">is_sequence</a></span></dt> +<dt><span class="section"><a href="support/is_view.html">is_view</a></span></dt> +<dt><span class="section"><a href="support/tag_of.html">tag_of</a></span></dt> +<dt><span class="section"><a href="support/category_of.html">category_of</a></span></dt> +<dt><span class="section"><a href="support/deduce.html">deduce</a></span></dt> +<dt><span class="section"><a href="support/deduce_sequence.html">deduce_sequence</a></span></dt> +<dt><span class="section"><a href="support/pair.html">pair</a></span></dt> +</dl></div> +<p> + A couple of classes and metafunctions provide basic support for Fusion. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="organization.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="support/is_sequence.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/category_of.html b/libs/fusion/doc/html/fusion/support/category_of.html new file mode 100644 index 000000000..4d8d7923b --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/category_of.html @@ -0,0 +1,171 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>category_of</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="tag_of.html" title="tag_of"> +<link rel="next" href="deduce.html" title="deduce"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tag_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deduce.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.category_of"></a><a class="link" href="category_of.html" title="category_of">category_of</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.category_of.h0"></a> + <span class="phrase"><a name="fusion.support.category_of.description"></a></span><a class="link" href="category_of.html#fusion.support.category_of.description">Description</a> + </h5> +<p> + A metafunction that establishes the conceptual classification of a particular + <a class="link" href="../sequence.html" title="Sequence">Sequence</a> or <a class="link" href="../iterator.html" title="Iterator">Iterator</a> + (see <a class="link" href="../iterator/concepts.html" title="Concepts">Iterator Concepts</a> and + <a class="link" href="../sequence/concepts.html" title="Concepts">Sequence Concepts</a>). + </p> +<h5> +<a name="fusion.support.category_of.h1"></a> + <span class="phrase"><a name="fusion.support.category_of.synopsis"></a></span><a class="link" href="category_of.html#fusion.support.category_of.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">category_of</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.category_of.h2"></a> + <span class="phrase"><a name="fusion.support.category_of.parameters"></a></span><a class="link" href="category_of.html#fusion.support.category_of.parameters">Parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to query. + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.support.category_of.h3"></a> + <span class="phrase"><a name="fusion.support.category_of.expression_semantics"></a></span><a class="link" href="category_of.html#fusion.support.category_of.expression_semantics">Expression + Semantics</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: + </p> +<p> + The return type is derived from one of: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">incrementable_traversal_tag</span> <span class="special">{};</span> + + <span class="keyword">struct</span> <span class="identifier">single_pass_traversal_tag</span> + <span class="special">:</span> <span class="identifier">incrementable_traversal_tag</span> <span class="special">{};</span> + + <span class="keyword">struct</span> <span class="identifier">forward_traversal_tag</span> + <span class="special">:</span> <span class="identifier">single_pass_traversal_tag</span> <span class="special">{};</span> + + <span class="keyword">struct</span> <span class="identifier">bidirectional_traversal_tag</span> + <span class="special">:</span> <span class="identifier">forward_traversal_tag</span> <span class="special">{};</span> + + <span class="keyword">struct</span> <span class="identifier">random_access_traversal_tag</span> + <span class="special">:</span> <span class="identifier">bidirectional_traversal_tag</span> <span class="special">{};</span> +<span class="special">}}</span> +</pre> +<p> + And optionally from: + </p> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span> +<span class="special">{</span> + <span class="keyword">struct</span> <span class="identifier">associative_tag</span> <span class="special">{};</span> +<span class="special">}}</span> +</pre> +<p> + <span class="bold"><strong>Semantics</strong></span>: Establishes the conceptual classification + of a particular <a class="link" href="../sequence.html" title="Sequence">Sequence</a> or <a class="link" href="../iterator.html" title="Iterator">Iterator</a>. + </p> +<h5> +<a name="fusion.support.category_of.h4"></a> + <span class="phrase"><a name="fusion.support.category_of.header"></a></span><a class="link" href="category_of.html#fusion.support.category_of.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">category_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">category_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.category_of.h5"></a> + <span class="phrase"><a name="fusion.support.category_of.example"></a></span><a class="link" href="category_of.html#fusion.support.category_of.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_base_of</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">list_category</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">vector_category</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">forward_traversal_tag</span><span class="special">,</span> <span class="identifier">list_category</span><span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">is_base_of</span><span class="special"><</span><span class="identifier">random_access_traversal_tag</span><span class="special">,</span> <span class="identifier">vector_category</span><span class="special">></span> <span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tag_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deduce.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/deduce.html b/libs/fusion/doc/html/fusion/support/deduce.html new file mode 100644 index 000000000..0f8b2a75e --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/deduce.html @@ -0,0 +1,105 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deduce</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="category_of.html" title="category_of"> +<link rel="next" href="deduce_sequence.html" title="deduce_sequence"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="category_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deduce_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.deduce"></a><a class="link" href="deduce.html" title="deduce">deduce</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.deduce.h0"></a> + <span class="phrase"><a name="fusion.support.deduce.description"></a></span><a class="link" href="deduce.html#fusion.support.deduce.description">Description</a> + </h5> +<p> + Metafunction to apply <a class="link" href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> to the full argument type. + </p> +<p> + It removes references to <code class="computeroutput"><span class="keyword">const</span></code>, + references to array types are kept, even if the array is <code class="computeroutput"><span class="keyword">const</span></code>. + Reference wrappers are removed (see <a class="link" href="../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a>). + </p> +<h5> +<a name="fusion.support.deduce.h1"></a> + <span class="phrase"><a name="fusion.support.deduce.header"></a></span><a class="link" href="deduce.html#fusion.support.deduce.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">deduce</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deduce</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.deduce.h2"></a> + <span class="phrase"><a name="fusion.support.deduce.synopsis"></a></span><a class="link" href="deduce.html#fusion.support.deduce.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">deduce</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.deduce.h3"></a> + <span class="phrase"><a name="fusion.support.deduce.example"></a></span><a class="link" href="deduce.html#fusion.support.deduce.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">holder</span> +<span class="special">{</span> + <span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">deduce</span><span class="special"><</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&>::</span><span class="identifier">type</span> <span class="identifier">element</span><span class="special">;</span> + + <span class="identifier">holder</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">:</span> <span class="identifier">element</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="identifier">holder</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_holder</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a</span><span class="special">)</span> +<span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">holder</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">a</span><span class="special">);</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.deduce.h4"></a> + <span class="phrase"><a name="fusion.support.deduce.see_also"></a></span><a class="link" href="deduce.html#fusion.support.deduce.see_also">See + also</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="category_of.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="deduce_sequence.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/deduce_sequence.html b/libs/fusion/doc/html/fusion/support/deduce_sequence.html new file mode 100644 index 000000000..07d9dbd4e --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/deduce_sequence.html @@ -0,0 +1,105 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>deduce_sequence</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="deduce.html" title="deduce"> +<link rel="next" href="pair.html" title="pair"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deduce.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pair.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.deduce_sequence"></a><a class="link" href="deduce_sequence.html" title="deduce_sequence">deduce_sequence</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.deduce_sequence.h0"></a> + <span class="phrase"><a name="fusion.support.deduce_sequence.description"></a></span><a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.description">Description</a> + </h5> +<p> + Applies <a class="link" href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element + conversion</em></span></a> to each element in a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. The resulting type is a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> that provides a converting constructor accepting the + original type as its argument. + </p> +<h5> +<a name="fusion.support.deduce_sequence.h1"></a> + <span class="phrase"><a name="fusion.support.deduce_sequence.header"></a></span><a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">deduce_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">deduce_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.deduce_sequence.h2"></a> + <span class="phrase"><a name="fusion.support.deduce_sequence.synopsis"></a></span><a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">deduce_sequence</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.deduce_sequence.h3"></a> + <span class="phrase"><a name="fusion.support.deduce_sequence.example"></a></span><a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">holder</span> +<span class="special">{</span> + <span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">deduce_sequence</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">element</span><span class="special">;</span> + + <span class="identifier">holder</span><span class="special">(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a</span><span class="special">)</span> + <span class="special">:</span> <span class="identifier">element</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> + <span class="special">{</span> <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span> +<span class="identifier">holder</span><span class="special"><</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></span> <span class="special">></span> +<span class="identifier">make_holder</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a1</span><span class="special">)</span> +<span class="special">{</span> + <span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></span> <span class="identifier">arg_vec_t</span><span class="special">;</span> + <span class="keyword">return</span> <span class="identifier">holder</span><span class="special"><</span><span class="identifier">arg_vec_t</span><span class="special">>(</span> <span class="identifier">arg_vec_t</span><span class="special">(</span><span class="identifier">a0</span><span class="special">,</span><span class="identifier">a1</span><span class="special">)</span> <span class="special">);</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.deduce_sequence.h4"></a> + <span class="phrase"><a name="fusion.support.deduce_sequence.see_also"></a></span><a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.see_also">See + also</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a> + </li></ul></div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deduce.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pair.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/is_sequence.html b/libs/fusion/doc/html/fusion/support/is_sequence.html new file mode 100644 index 000000000..7afd4bf52 --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/is_sequence.html @@ -0,0 +1,148 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>is_sequence</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="../support.html" title="Support"> +<link rel="next" href="is_view.html" title="is_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../support.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.is_sequence"></a><a class="link" href="is_sequence.html" title="is_sequence">is_sequence</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.is_sequence.h0"></a> + <span class="phrase"><a name="fusion.support.is_sequence.description"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.description">Description</a> + </h5> +<p> + Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if a certain type <code class="computeroutput"><span class="identifier">T</span></code> is a + conforming Fusion <a class="link" href="../sequence.html" title="Sequence">Sequence</a>, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> + otherwise. This may be specialized to accomodate clients which provide Fusion + conforming sequences. + </p> +<h5> +<a name="fusion.support.is_sequence.h1"></a> + <span class="phrase"><a name="fusion.support.is_sequence.synopsis"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">is_sequence</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.is_sequence.h2"></a> + <span class="phrase"><a name="fusion.support.is_sequence.parameters"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.parameters">Parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to query. + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.support.is_sequence.h3"></a> + <span class="phrase"><a name="fusion.support.is_sequence.expression_semantics"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.expression_semantics">Expression + Semantics</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Boolean Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Metafunction that evaluates to + <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if a certain type <code class="computeroutput"><span class="identifier">T</span></code> + is a conforming Fusion sequence, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> + otherwise. + </p> +<h5> +<a name="fusion.support.is_sequence.h4"></a> + <span class="phrase"><a name="fusion.support.is_sequence.header"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">is_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">is_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.is_sequence.h5"></a> + <span class="phrase"><a name="fusion.support.is_sequence.example"></a></span><a class="link" href="is_sequence.html#fusion.support.is_sequence.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">is_sequence</span><span class="special"><</span> <span class="keyword">int</span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../support.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/is_view.html b/libs/fusion/doc/html/fusion/support/is_view.html new file mode 100644 index 000000000..7e1b65b6a --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/is_view.html @@ -0,0 +1,153 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>is_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="is_sequence.html" title="is_sequence"> +<link rel="next" href="tag_of.html" title="tag_of"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="is_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.is_view"></a><a class="link" href="is_view.html" title="is_view">is_view</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.is_view.h0"></a> + <span class="phrase"><a name="fusion.support.is_view.description"></a></span><a class="link" href="is_view.html#fusion.support.is_view.description">Description</a> + </h5> +<p> + Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> + if a certain type <code class="computeroutput"><span class="identifier">T</span></code> is a + conforming Fusion <a class="link" href="../view.html" title="View">View</a>, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> + otherwise. A view is a specialized sequence that does not actually contain + data. Views hold sequences which may be other views. In general, views are + held by other views by value, while non-views are held by other views by + reference. <code class="computeroutput"><span class="identifier">is_view</span></code> may be + specialized to accomodate clients providing Fusion conforming views. + </p> +<h5> +<a name="fusion.support.is_view.h1"></a> + <span class="phrase"><a name="fusion.support.is_view.synopsis"></a></span><a class="link" href="is_view.html#fusion.support.is_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">is_view</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.is_view.h2"></a> + <span class="phrase"><a name="fusion.support.is_view.parameters"></a></span><a class="link" href="is_view.html#fusion.support.is_view.parameters">Parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to query. + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.support.is_view.h3"></a> + <span class="phrase"><a name="fusion.support.is_view.expression_semantics"></a></span><a class="link" href="is_view.html#fusion.support.is_view.expression_semantics">Expression + Semantics</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Boolean Constant</a>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Metafunction that evaluates to + <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if a certain type <code class="computeroutput"><span class="identifier">T</span></code> + is a conforming Fusion view, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> + otherwise. + </p> +<h5> +<a name="fusion.support.is_view.h4"></a> + <span class="phrase"><a name="fusion.support.is_view.header"></a></span><a class="link" href="is_view.html#fusion.support.is_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.is_view.h5"></a> + <span class="phrase"><a name="fusion.support.is_view.example"></a></span><a class="link" href="is_view.html#fusion.support.is_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="special">));</span> +<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">));</span> + +<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span> +<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">*,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">long</span><span class="special">*,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vector_type</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a><span class="special"><</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">></span> <span class="identifier">filter_view_type</span><span class="special">;</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special"><</span><span class="identifier">filter_view_type</span><span class="special">></span> <span class="special">));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="is_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/pair.html b/libs/fusion/doc/html/fusion/support/pair.html new file mode 100644 index 000000000..e01254136 --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/pair.html @@ -0,0 +1,352 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>pair</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="deduce_sequence.html" title="deduce_sequence"> +<link rel="next" href="../iterator.html" title="Iterator"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deduce_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.pair"></a><a class="link" href="pair.html" title="pair">pair</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.pair.h0"></a> + <span class="phrase"><a name="fusion.support.pair.description"></a></span><a class="link" href="pair.html#fusion.support.pair.description">Description</a> + </h5> +<p> + Fusion <code class="computeroutput"><span class="identifier">pair</span></code> type is a half + runtime pair. A half runtime pair is similar to a <a class="link" href="../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a>, + but, unlike <a class="link" href="../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a>, + the first type does not have data. It is used as elements in <a class="link" href="../container/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a>s, for example. + </p> +<h5> +<a name="fusion.support.pair.h1"></a> + <span class="phrase"><a name="fusion.support.pair.synopsis"></a></span><a class="link" href="pair.html#fusion.support.pair.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">pair</span><span class="special">;</span> + +<span class="keyword">namespace</span> <span class="identifier">result_of</span> +<span class="special">{</span> + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Pair</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">first</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Pair</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">second</span><span class="special">;</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">make_pair</span><span class="special">;</span> +<span class="special">}</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special"><</span><span class="identifier">First</span><span class="special">,</span><span class="identifier">Second</span><span class="special">>::</span><span class="identifier">type</span> +<span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">Second</span> <span class="keyword">const</span> <span class="special">&);</span> +</pre> +<h5> +<a name="fusion.support.pair.h2"></a> + <span class="phrase"><a name="fusion.support.pair.template_parameters"></a></span><a class="link" href="pair.html#fusion.support.pair.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + First + </p> + </td> +<td> + <p> + The first type. This is purely a type. No data is held. + </p> + </td> +</tr> +<tr> +<td> + <p> + Second + </p> + </td> +<td> + <p> + The second type. This contains data. + </p> + </td> +</tr> +</tbody> +</table></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></span></dt> +<dd><p> + Fusion pair type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code>, <code class="computeroutput"><span class="identifier">p2</span></code></span></dt> +<dd><p> + Fusion pairs + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code>, <code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + Arbitrary types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + Value of type <code class="computeroutput"><span class="identifier">S</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt> +<dd><p> + Output stream + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code></span></dt> +<dd><p> + Input stream + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.support.pair.h3"></a> + <span class="phrase"><a name="fusion.support.pair.expression_semantics"></a></span><a class="link" href="pair.html#fusion.support.pair.expression_semantics">Expression + Semantics</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">first_type</span></code> + </p> + </td> +<td> + <p> + The type of the first template parameter, <code class="computeroutput"><span class="identifier">F</span></code>, + equivalent to <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">first</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">second_type</span></code> + </p> + </td> +<td> + <p> + The type of the second template parameter, <code class="computeroutput"><span class="identifier">S</span></code>, + equivalent to <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">second</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">P</span><span class="special">()</span></code> + </p> + </td> +<td> + <p> + Default construction. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Construct a pair given value for the second type, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">p2</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a pair from another pair, <code class="computeroutput"><span class="identifier">p2</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span></code> + </p> + </td> +<td> + <p> + Get the data from <code class="computeroutput"><span class="identifier">p1</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">p</span> <span class="special">=</span> + <span class="identifier">p2</span></code> + </p> + </td> +<td> + <p> + Assigns a pair, <code class="computeroutput"><span class="identifier">p1</span></code>, + from another pair, <code class="computeroutput"><span class="identifier">p2</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + make_pair<F>(s) + </p> + </td> +<td> + <p> + Make a pair given the first type, <code class="computeroutput"><span class="identifier">F</span></code>, + and a value for the second type, <code class="computeroutput"><span class="identifier">s</span></code>. + The second type assumes the type of <code class="computeroutput"><span class="identifier">s</span></code> + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">o</span> <span class="special"><<</span> + <span class="identifier">p</span></code> + </p> + </td> +<td> + <p> + Output <code class="computeroutput"><span class="identifier">p</span></code> to output + stream, <code class="computeroutput"><span class="identifier">o</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">i</span> <span class="special">>></span> + <span class="identifier">p</span></code> + </p> + </td> +<td> + <p> + Input <code class="computeroutput"><span class="identifier">p</span></code> from input + stream, <code class="computeroutput"><span class="identifier">i</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">p</span> <span class="special">==</span> + <span class="identifier">p2</span></code> + </p> + </td> +<td> + <p> + Tests two pairs for equality. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">p</span> <span class="special">!=</span> + <span class="identifier">p2</span></code> + </p> + </td> +<td> + <p> + Tests two pairs for inequality. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.support.pair.h4"></a> + <span class="phrase"><a name="fusion.support.pair.header"></a></span><a class="link" href="pair.html#fusion.support.pair.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.pair.h5"></a> + <span class="phrase"><a name="fusion.support.pair.example"></a></span><a class="link" href="pair.html#fusion.support.pair.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">p</span><span class="special">(</span><span class="char">'X'</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">p</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">make_pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="char">'X'</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +<span class="identifier">assert</span><span class="special">((</span><span class="identifier">p</span> <span class="special">==</span> <span class="identifier">make_pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="char">'X'</span><span class="special">)));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="deduce_sequence.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../iterator.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/support/tag_of.html b/libs/fusion/doc/html/fusion/support/tag_of.html new file mode 100644 index 000000000..b9a43a47c --- /dev/null +++ b/libs/fusion/doc/html/fusion/support/tag_of.html @@ -0,0 +1,149 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>tag_of</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../support.html" title="Support"> +<link rel="prev" href="is_view.html" title="is_view"> +<link rel="next" href="category_of.html" title="category_of"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="is_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.support.tag_of"></a><a class="link" href="tag_of.html" title="tag_of">tag_of</a> +</h3></div></div></div> +<h5> +<a name="fusion.support.tag_of.h0"></a> + <span class="phrase"><a name="fusion.support.tag_of.description"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.description">Description</a> + </h5> +<p> + All conforming Fusion sequences and iterators have an associated tag type. + The purpose of the tag is to enable <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag + dispatching</em></span></a> from <a class="link" href="../sequence/intrinsic.html" title="Intrinsic">Intrinsic</a> + functions to implementations appropriate for the type. + </p> +<p> + This metafunction may be specialized to accomodate clients providing Fusion + conforming sequences. + </p> +<h5> +<a name="fusion.support.tag_of.h1"></a> + <span class="phrase"><a name="fusion.support.tag_of.synopsis"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">traits</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">tag_of</span> + <span class="special">{</span> + <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span> + <span class="special">};</span> +<span class="special">}</span> +</pre> +<h5> +<a name="fusion.support.tag_of.h2"></a> + <span class="phrase"><a name="fusion.support.tag_of.parameters"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.parameters">Parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Requirement + </p> + </th> +<th> + <p> + Description + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + <p> + The type to query. + </p> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.support.tag_of.h3"></a> + <span class="phrase"><a name="fusion.support.tag_of.expression_semantics"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.expression_semantics">Expression + Semantics</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Return type</strong></span>: Any type. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the tag type associated + with <code class="computeroutput"><span class="identifier">T</span></code>. + </p> +<h5> +<a name="fusion.support.tag_of.h4"></a> + <span class="phrase"><a name="fusion.support.tag_of.header"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.support.tag_of.h5"></a> + <span class="phrase"><a name="fusion.support.tag_of.example"></a></span><a class="link" href="tag_of.html#fusion.support.tag_of.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag1</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag2</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag3</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag4</span><span class="special">;</span> + +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">tag1</span><span class="special">,</span> <span class="identifier">tag2</span><span class="special">>));</span> +<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">tag3</span><span class="special">,</span> <span class="identifier">tag4</span><span class="special">>));</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="is_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="category_of.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple.html b/libs/fusion/doc/html/fusion/tuple.html new file mode 100644 index 000000000..7554a7915 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple.html @@ -0,0 +1,70 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Tuple</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="algorithm/transformation/metafunctions/push_front.html" title="push_front"> +<link rel="next" href="tuple/class_template_tuple.html" title="Class template tuple"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="algorithm/transformation/metafunctions/push_front.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple/class_template_tuple.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.tuple"></a><a class="link" href="tuple.html" title="Tuple">Tuple</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="tuple/class_template_tuple.html">Class template tuple</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="tuple/class_template_tuple/construction.html">Construction</a></span></dt> +<dt><span class="section"><a href="tuple/class_template_tuple/tuple_creation_functions.html">Tuple + creation functions</a></span></dt> +<dt><span class="section"><a href="tuple/class_template_tuple/tuple_helper_classes.html">Tuple + helper classes</a></span></dt> +<dt><span class="section"><a href="tuple/class_template_tuple/element_access.html">Element + access</a></span></dt> +<dt><span class="section"><a href="tuple/class_template_tuple/relational_operators.html">Relational + operators</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="tuple/pairs.html">Pairs</a></span></dt> +</dl></div> +<p> + The TR1 technical report describes extensions to the C++ standard library. + Many of these extensions will be considered for the next iteration of the C++ + standard. TR1 describes a tuple type, and support for treating <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> + as a type of tuple. + </p> +<p> + Fusion provides full support for the <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> interface, and the extended uses of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> described + in the TR1 document. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="algorithm/transformation/metafunctions/push_front.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple/class_template_tuple.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple.html new file mode 100644 index 000000000..452114c27 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple.html @@ -0,0 +1,79 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Class template tuple</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../tuple.html" title="Tuple"> +<link rel="prev" href="../tuple.html" title="Tuple"> +<link rel="next" href="class_template_tuple/construction.html" title="Construction"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../tuple.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tuple.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_template_tuple/construction.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.tuple.class_template_tuple"></a><a class="link" href="class_template_tuple.html" title="Class template tuple">Class template tuple</a> +</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="class_template_tuple/construction.html">Construction</a></span></dt> +<dt><span class="section"><a href="class_template_tuple/tuple_creation_functions.html">Tuple + creation functions</a></span></dt> +<dt><span class="section"><a href="class_template_tuple/tuple_helper_classes.html">Tuple + helper classes</a></span></dt> +<dt><span class="section"><a href="class_template_tuple/element_access.html">Element + access</a></span></dt> +<dt><span class="section"><a href="class_template_tuple/relational_operators.html">Relational + operators</a></span></dt> +</dl></div> +<p> + Fusion's implementation of the <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> is also a fusion <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. As such the fusion tuple type provides a lot of functionality + beyond that required by TR1. + </p> +<p> + Currently tuple is basically a synonym for <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a>, although this may be changed + in future releases of fusion. + </p> +<h5> +<a name="fusion.tuple.class_template_tuple.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.synopsis"></a></span><a class="link" href="class_template_tuple.html#fusion.tuple.class_template_tuple.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> + <span class="keyword">typename</span> <span class="identifier">T1</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span><span class="special">,</span> + <span class="special">...</span> + <span class="keyword">typename</span> <span class="identifier">TN</span> <span class="special">=</span> <span class="emphasis"><em>unspecified</em></span><span class="special">></span> +<span class="keyword">class</span> <span class="identifier">tuple</span><span class="special">;</span> +</pre> +<p> + /tuple.hpp> + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../tuple.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tuple.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_template_tuple/construction.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple/construction.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/construction.html new file mode 100644 index 000000000..03d5e3154 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/construction.html @@ -0,0 +1,128 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Construction</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="prev" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="next" href="tuple_creation_functions.html" title="Tuple creation functions"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_creation_functions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.tuple.class_template_tuple.construction"></a><a class="link" href="construction.html" title="Construction">Construction</a> +</h4></div></div></div> +<h6> +<a name="fusion.tuple.class_template_tuple.construction.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.construction.description"></a></span><a class="link" href="construction.html#fusion.tuple.class_template_tuple.construction.description">Description</a> + </h6> +<p> + The <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> type provides a default constructor, a constructor that takes + initializers for all of its elements, a copy constructor, and a converting + copy constructor. The details of the various constructors are described + in this section. + </p> +<h6> +<a name="fusion.tuple.class_template_tuple.construction.h1"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.construction.specification"></a></span><a class="link" href="construction.html#fusion.tuple.class_template_tuple.construction.specification">Specification</a> + </h6> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span> + <span class="identifier">TN</span></code>, <code class="computeroutput"><span class="identifier">U1</span> + <span class="special">...</span> <span class="identifier">UN</span></code></span></dt> +<dd><p> + Tuple element types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">P1</span> <span class="special">...</span> + <span class="identifier">PN</span></code></span></dt> +<dd><p> + Parameter types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Ti</span></code>, <code class="computeroutput"><span class="identifier">Ui</span></code></span></dt> +<dd><p> + The type of the <code class="computeroutput"><span class="identifier">i</span></code>th + element of a tuple + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Pi</span></code></span></dt> +<dd><p> + The type of the <code class="computeroutput"><span class="identifier">i</span></code>th + parameter + </p></dd> +</dl> +</div> +<pre class="programlisting"><span class="identifier">tuple</span><span class="special">();</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: Each <code class="computeroutput"><span class="identifier">Ti</span></code> + is default constructable. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Default initializes each element + of the tuple. + </p> +<pre class="programlisting"><span class="identifier">tuple</span><span class="special">(</span><span class="identifier">P1</span><span class="special">,</span><span class="identifier">P2</span><span class="special">,...,</span><span class="identifier">PN</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: Each <code class="computeroutput"><span class="identifier">Pi</span></code> + is <code class="computeroutput"><span class="identifier">Ti</span></code> if <code class="computeroutput"><span class="identifier">Ti</span></code> is a reference type, <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">Ti</span><span class="special">&</span></code> otherwise. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Copy initializes each element + with the corresponding parameter. + </p> +<pre class="programlisting"><span class="identifier">tuple</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">tuple</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: Each <code class="computeroutput"><span class="identifier">Ti</span></code> + should be copy constructable. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Copy constructs each element + of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> + with the corresponding element of <code class="computeroutput"><span class="identifier">t</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="identifier">tuple</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: Each <code class="computeroutput"><span class="identifier">Ti</span></code> + shall be constructible from the corresponding <code class="computeroutput"><span class="identifier">Ui</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Constructs each element of + <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> + with the corresponding element of <code class="computeroutput"><span class="identifier">t</span></code>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_creation_functions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple/element_access.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/element_access.html new file mode 100644 index 000000000..f8c064e96 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/element_access.html @@ -0,0 +1,94 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Element access</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="prev" href="tuple_helper_classes.html" title="Tuple helper classes"> +<link rel="next" href="relational_operators.html" title="Relational operators"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple_helper_classes.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relational_operators.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.tuple.class_template_tuple.element_access"></a><a class="link" href="element_access.html" title="Element access">Element + access</a> +</h4></div></div></div> +<h6> +<a name="fusion.tuple.class_template_tuple.element_access.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.element_access.description"></a></span><a class="link" href="element_access.html#fusion.tuple.class_template_tuple.element_access.description">Description</a> + </h6> +<p> + The <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> provides the <code class="computeroutput"><span class="identifier">get</span></code> + function to provide access to it's elements by zero based numeric index. + </p> +<h6> +<a name="fusion.tuple.class_template_tuple.element_access.h1"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.element_access.specification"></a></span><a class="link" href="element_access.html#fusion.tuple.class_template_tuple.element_access.specification">Specification</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">int</span> <span class="identifier">I</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span> +<span class="identifier">RJ</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requires</strong></span>: <code class="computeroutput"><span class="number">0</span> + <span class="special"><</span> <span class="identifier">I</span> + <span class="special"><=</span> <span class="identifier">N</span></code>. + The program is ill formed if <code class="computeroutput"><span class="identifier">I</span></code> + is out of bounds. <code class="computeroutput"><span class="identifier">T</span></code> is + any fusion sequence type, including <code class="computeroutput"><span class="identifier">tuple</span></code>. + </p> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="identifier">RJ</span></code> + is equivalent to <code class="computeroutput"><a class="link" href="../../sequence/intrinsic/metafunctions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<p> + <span class="bold"><strong>Returns</strong></span>: A reference to the <code class="computeroutput"><span class="identifier">I</span></code>th element of <code class="computeroutput"><span class="identifier">T</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">int</span> <span class="identifier">I</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="identifier">PJ</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requires</strong></span>: <code class="computeroutput"><span class="number">0</span> + <span class="special"><</span> <span class="identifier">I</span> + <span class="special"><=</span> <span class="identifier">N</span></code>. + The program is ill formed if <code class="computeroutput"><span class="identifier">I</span></code> + is out of bounds. <code class="computeroutput"><span class="identifier">T</span></code> is + any fusion sequence type, including <code class="computeroutput"><span class="identifier">tuple</span></code>. + </p> +<p> + <span class="bold"><strong>Return type</strong></span>: <code class="computeroutput"><span class="identifier">PJ</span></code> + is equivalent to <code class="computeroutput"><a class="link" href="../../sequence/intrinsic/metafunctions/at_c.html" title="at_c"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_c</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<p> + <span class="bold"><strong>Returns</strong></span>: A const reference to the <code class="computeroutput"><span class="identifier">I</span></code>th element of <code class="computeroutput"><span class="identifier">T</span></code>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple_helper_classes.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relational_operators.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple/relational_operators.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/relational_operators.html new file mode 100644 index 000000000..7a601573d --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/relational_operators.html @@ -0,0 +1,187 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Relational operators</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="prev" href="element_access.html" title="Element access"> +<link rel="next" href="../pairs.html" title="Pairs"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="element_access.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pairs.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.tuple.class_template_tuple.relational_operators"></a><a class="link" href="relational_operators.html" title="Relational operators">Relational + operators</a> +</h4></div></div></div> +<h6> +<a name="fusion.tuple.class_template_tuple.relational_operators.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.relational_operators.description"></a></span><a class="link" href="relational_operators.html#fusion.tuple.class_template_tuple.relational_operators.description">Description</a> + </h6> +<p> + The <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> provides the standard boolean relational operators. + </p> +<h6> +<a name="fusion.tuple.class_template_tuple.relational_operators.h1"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.relational_operators.specification"></a></span><a class="link" href="relational_operators.html#fusion.tuple.class_template_tuple.relational_operators.specification">Specification</a> + </h6> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span> + <span class="identifier">TN</span></code>, <code class="computeroutput"><span class="identifier">U1</span> + <span class="special">...</span> <span class="identifier">UN</span></code></span></dt> +<dd><p> + Tuple element types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">P1</span> <span class="special">...</span> + <span class="identifier">PN</span></code></span></dt> +<dd><p> + Parameter types + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Ti</span></code>, <code class="computeroutput"><span class="identifier">Ui</span></code></span></dt> +<dd><p> + The type of the <code class="computeroutput"><span class="identifier">i</span></code>th + element of a tuple + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">Pi</span></code></span></dt> +<dd><p> + The type of the <code class="computeroutput"><span class="identifier">i</span></code>th + parameter + </p></dd> +</dl> +</div> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="keyword">true</span></code> + if and only if <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span></code> + for all <code class="computeroutput"><span class="identifier">i</span></code>. For any 2 zero + length tuples <code class="computeroutput"><span class="identifier">e</span></code> and <code class="computeroutput"><span class="identifier">f</span></code>, <code class="computeroutput"><span class="identifier">e</span> + <span class="special">==</span> <span class="identifier">f</span></code> + returns <code class="computeroutput"><span class="keyword">true</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special"><</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns the lexicographical + comparison of between <code class="computeroutput"><span class="identifier">lhs</span></code> + and <code class="computeroutput"><span class="identifier">rhs</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special">==</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">lhs</span> <span class="special">==</span> <span class="identifier">rhs</span><span class="special">)</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special"><=(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span> <span class="special"><</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">rhs</span> <span class="special"><</span> <span class="identifier">lhs</span><span class="special">)</span></code> + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span> <span class="special"><</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="identifier">rhs</span> + <span class="special"><</span> <span class="identifier">lhs</span></code>. + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">,</span> + <span class="keyword">typename</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">UN</span><span class="special">></span> +<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">>=(</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> + <span class="keyword">const</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">U1</span><span class="special">,</span> <span class="identifier">U2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">UN</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Requirements</strong></span>: For all <code class="computeroutput"><span class="identifier">i</span></code>, + <code class="computeroutput"><span class="number">1</span> <span class="special"><=</span> + <span class="identifier">i</span> <span class="special"><</span> + <span class="identifier">N</span></code>, <code class="computeroutput"><a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">lhs</span><span class="special">)</span> <span class="special"><</span> <a class="link" href="element_access.html" title="Element access"><code class="computeroutput"><span class="identifier">get</span></code></a><span class="special"><</span><span class="identifier">i</span><span class="special">>(</span><span class="identifier">rhs</span><span class="special">)</span></code> + is a valid expression returning a type that is convertible to <code class="computeroutput"><span class="keyword">bool</span></code>. + </p> +<p> + <span class="bold"><strong>Semantics</strong></span>: Returns <code class="computeroutput"><span class="special">!(</span><span class="identifier">lhs</span> <span class="special"><</span> <span class="identifier">rhs</span><span class="special">)</span></code>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="element_access.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pairs.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html new file mode 100644 index 000000000..0534a237c --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html @@ -0,0 +1,80 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Tuple creation functions</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="prev" href="construction.html" title="Construction"> +<link rel="next" href="tuple_helper_classes.html" title="Tuple helper classes"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="construction.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_helper_classes.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.tuple.class_template_tuple.tuple_creation_functions"></a><a class="link" href="tuple_creation_functions.html" title="Tuple creation functions">Tuple + creation functions</a> +</h4></div></div></div> +<h6> +<a name="fusion.tuple.class_template_tuple.tuple_creation_functions.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.tuple_creation_functions.description"></a></span><a class="link" href="tuple_creation_functions.html#fusion.tuple.class_template_tuple.tuple_creation_functions.description">Description</a> + </h6> +<p> + TR1 describes 2 utility functions for creating __tr1__tuple__s. <code class="computeroutput"><span class="identifier">make_tuple</span></code> builds a tuple out of it's + argument list, and <code class="computeroutput"><span class="identifier">tie</span></code> + builds a tuple of references to it's arguments. The details of these creation + functions are described in this section. + </p> +<h6> +<a name="fusion.tuple.class_template_tuple.tuple_creation_functions.h1"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.tuple_creation_functions.specification"></a></span><a class="link" href="tuple_creation_functions.html#fusion.tuple.class_template_tuple.tuple_creation_functions.specification">Specification</a> + </h6> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="identifier">tuple</span><span class="special"><</span><span class="identifier">V1</span><span class="special">,</span> <span class="identifier">V2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">VN</span><span class="special">></span> <span class="identifier">make_tuple</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T1</span><span class="special">&</span> <span class="identifier">t1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T2</span><span class="special">&</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">const</span> <span class="identifier">TN</span><span class="special">&</span> <span class="identifier">tn</span><span class="special">);</span> +</pre> +<p> + Where <code class="computeroutput"><span class="identifier">Vi</span></code> is <code class="computeroutput"><span class="identifier">X</span><span class="special">&</span></code> + if the cv-unqualified type <code class="computeroutput"><span class="identifier">Ti</span></code> + is <code class="computeroutput"><span class="identifier">reference_wrapper</span><span class="special"><</span><span class="identifier">X</span><span class="special">></span></code>, + otherwise <code class="computeroutput"><span class="identifier">Vi</span></code> is <code class="computeroutput"><span class="identifier">Ti</span></code>. + </p> +<p> + <span class="bold"><strong>Returns</strong></span>: <code class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">V1</span><span class="special">,</span> <span class="identifier">V2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">VN</span><span class="special">>(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">tN</span><span class="special">)</span></code> + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">TN</span><span class="special">></span> +<span class="identifier">tuple</span><span class="special"><</span><span class="identifier">T1</span><span class="special">&,</span> <span class="identifier">T2</span><span class="special">&,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&></span> <span class="identifier">tie</span><span class="special">(</span><span class="identifier">T1</span><span class="special">&</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">&</span> <span class="identifier">t2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">TN</span><span class="special">&</span> <span class="identifier">tn</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Returns</strong></span>: tuple<T1&, T2&, ..., + TN&>(t1, t2, ..., tN). When argument <code class="computeroutput"><span class="identifier">ti</span></code> + is <code class="computeroutput"><span class="identifier">ignore</span></code>, assigning any + value to the corresponding tuple element has has no effect. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="construction.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tuple_helper_classes.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html new file mode 100644 index 000000000..f32ec2288 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html @@ -0,0 +1,86 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Tuple helper classes</title> +<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../class_template_tuple.html" title="Class template tuple"> +<link rel="prev" href="tuple_creation_functions.html" title="Tuple creation functions"> +<link rel="next" href="element_access.html" title="Element access"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple_creation_functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="element_access.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="fusion.tuple.class_template_tuple.tuple_helper_classes"></a><a class="link" href="tuple_helper_classes.html" title="Tuple helper classes">Tuple + helper classes</a> +</h4></div></div></div> +<h6> +<a name="fusion.tuple.class_template_tuple.tuple_helper_classes.h0"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.tuple_helper_classes.description"></a></span><a class="link" href="tuple_helper_classes.html#fusion.tuple.class_template_tuple.tuple_helper_classes.description">Description</a> + </h6> +<p> + The <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> provides 2 helper traits, for compile time access to the + tuple size, and the element types. + </p> +<h6> +<a name="fusion.tuple.class_template_tuple.tuple_helper_classes.h1"></a> + <span class="phrase"><a name="fusion.tuple.class_template_tuple.tuple_helper_classes.specification"></a></span><a class="link" href="tuple_helper_classes.html#fusion.tuple.class_template_tuple.tuple_helper_classes.specification">Specification</a> + </h6> +<pre class="programlisting"><span class="identifier">tuple_size</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">value</span> +</pre> +<p> + <span class="bold"><strong>Requires</strong></span>: <code class="computeroutput"><span class="identifier">T</span></code> + is any fusion sequence type, including <code class="computeroutput"><span class="identifier">tuple</span></code>. + </p> +<p> + <span class="bold"><strong>Type</strong></span>: <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> +<p> + <span class="bold"><strong>Value</strong></span>: The number of elements in the sequence. + Equivalent to <code class="computeroutput"><a class="link" href="../../sequence/intrinsic/metafunctions/size.html" title="size"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +<pre class="programlisting"><span class="identifier">tuple_element</span><span class="special"><</span><span class="identifier">I</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Requires</strong></span>: <code class="computeroutput"><span class="identifier">T</span></code> + is any fusion sequence type, including <code class="computeroutput"><span class="identifier">tuple</span></code>. + <code class="computeroutput"><span class="number">0</span> <span class="special"><=</span> + <span class="identifier">I</span> <span class="special"><</span> + <span class="identifier">N</span></code> or the program is ill formed. + </p> +<p> + <span class="bold"><strong>Value</strong></span>: The type of the <code class="computeroutput"><span class="identifier">I</span></code>th + element of <code class="computeroutput"><span class="identifier">T</span></code>. Equivalent + to <code class="computeroutput"><a class="link" href="../../sequence/intrinsic/metafunctions/value_at.html" title="value_at"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at</span></code></a><span class="special"><</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span></code>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="tuple_creation_functions.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../class_template_tuple.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="element_access.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/tuple/pairs.html b/libs/fusion/doc/html/fusion/tuple/pairs.html new file mode 100644 index 000000000..2ecdbb1c3 --- /dev/null +++ b/libs/fusion/doc/html/fusion/tuple/pairs.html @@ -0,0 +1,105 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Pairs</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../tuple.html" title="Tuple"> +<link rel="prev" href="class_template_tuple/relational_operators.html" title="Relational operators"> +<link rel="next" href="../extension.html" title="Extension"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="class_template_tuple/relational_operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tuple.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../extension.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.tuple.pairs"></a><a class="link" href="pairs.html" title="Pairs">Pairs</a> +</h3></div></div></div> +<h5> +<a name="fusion.tuple.pairs.h0"></a> + <span class="phrase"><a name="fusion.tuple.pairs.description"></a></span><a class="link" href="pairs.html#fusion.tuple.pairs.description">Description</a> + </h5> +<p> + The <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf" target="_top">TR1 + Tuple</a> interface is specified to provide uniform access to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> + as if it were a 2 element tuple. + </p> +<h5> +<a name="fusion.tuple.pairs.h1"></a> + <span class="phrase"><a name="fusion.tuple.pairs.specification"></a></span><a class="link" href="pairs.html#fusion.tuple.pairs.specification">Specification</a> + </h5> +<pre class="programlisting"><span class="identifier">tuple_size</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">value</span> +</pre> +<p> + <span class="bold"><strong>Type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL + Integral Constant</a> + </p> +<p> + <span class="bold"><strong>Value</strong></span>: Returns 2, the number of elements + in a pair. + </p> +<pre class="programlisting"><span class="identifier">tuple_element</span><span class="special"><</span><span class="number">0</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Type</strong></span>: <code class="computeroutput"><span class="identifier">T1</span></code> + </p> +<p> + <span class="bold"><strong>Value</strong></span>: Returns the type of the first element + of the pair + </p> +<pre class="programlisting"><span class="identifier">tuple_element</span><span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> +</pre> +<p> + <span class="bold"><strong>Type</strong></span>: <code class="computeroutput"><span class="identifier">T2</span></code> + </p> +<p> + <span class="bold"><strong>Value</strong></span>: Returns thetype of the second element + of the pair + </p> +<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">int</span> <span class="identifier">I</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span> +<span class="identifier">P</span><span class="special">&</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">>&</span> <span class="identifier">pr</span><span class="special">);</span> + +<span class="keyword">template</span><span class="special"><</span><span class="keyword">int</span> <span class="identifier">I</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span> +<span class="keyword">const</span> <span class="identifier">P</span><span class="special">&</span> <span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">>&</span> <span class="identifier">pr</span><span class="special">);</span> +</pre> +<p> + <span class="bold"><strong>Type</strong></span>: If <code class="computeroutput"><span class="identifier">I</span> + <span class="special">==</span> <span class="number">0</span></code> + <code class="computeroutput"><span class="identifier">P</span></code> is <code class="computeroutput"><span class="identifier">T1</span></code>, + else if <code class="computeroutput"><span class="identifier">I</span> <span class="special">==</span> + <span class="number">1</span></code> <code class="computeroutput"><span class="identifier">P</span></code> + is <code class="computeroutput"><span class="identifier">T2</span></code> else the program is + ill-formed. + </p> +<p> + [*Returns: <code class="computeroutput"><span class="identifier">pr</span><span class="special">.</span><span class="identifier">first</span></code> if <code class="computeroutput"><span class="identifier">I</span> + <span class="special">==</span> <span class="number">0</span></code> + else <code class="computeroutput"><span class="identifier">pr</span><span class="special">.</span><span class="identifier">second</span></code>. + </p> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="class_template_tuple/relational_operators.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tuple.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../extension.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view.html b/libs/fusion/doc/html/fusion/view.html new file mode 100644 index 000000000..a8cbcd6be --- /dev/null +++ b/libs/fusion/doc/html/fusion/view.html @@ -0,0 +1,71 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>View</title> +<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="prev" href="container/conversion/metafunctions/as_map.html" title="as_map"> +<link rel="next" href="view/single_view.html" title="single_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> +<td align="center"><a href="../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="container/conversion/metafunctions/as_map.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="view/single_view.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="fusion.view"></a><a class="link" href="view.html" title="View">View</a> +</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="view/single_view.html">single_view</a></span></dt> +<dt><span class="section"><a href="view/filter_view.html">filter_view</a></span></dt> +<dt><span class="section"><a href="view/iterator_range.html">iterator_range</a></span></dt> +<dt><span class="section"><a href="view/joint_view.html">joint_view</a></span></dt> +<dt><span class="section"><a href="view/zip_view.html">zip_view</a></span></dt> +<dt><span class="section"><a href="view/transform_view.html">transform_view</a></span></dt> +<dt><span class="section"><a href="view/reverse_view.html">reverse_view</a></span></dt> +<dt><span class="section"><a href="view/nview.html">nview</a></span></dt> +<dt><span class="section"><a href="view/repetitive_view.html">repetitive_view</a></span></dt> +</dl></div> +<p> + Views are sequences that do not actually contain data, but instead impart an + alternative presentation over the data from one or more underlying sequences. + Views are proxies. They provide an efficient yet purely functional way to work + on potentially expensive sequence operations. Views are inherently lazy. Their + elements are only computed on demand only when the elements of the underlying + sequence(s) are actually accessed. Views' lazy nature make them very cheap + to copy and be passed around by value. + </p> +<h4> +<a name="fusion.view.h0"></a> + <span class="phrase"><a name="fusion.view.header"></a></span><a class="link" href="view.html#fusion.view.header">Header</a> + </h4> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="container/conversion/metafunctions/as_map.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="view/single_view.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/filter_view.html b/libs/fusion/doc/html/fusion/view/filter_view.html new file mode 100644 index 000000000..d50526834 --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/filter_view.html @@ -0,0 +1,248 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>filter_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="single_view.html" title="single_view"> +<link rel="next" href="iterator_range.html" title="iterator_range"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="single_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_range.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.filter_view"></a><a class="link" href="filter_view.html" title="filter_view">filter_view</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.filter_view.h0"></a> + <span class="phrase"><a name="fusion.view.filter_view.description"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">filter_view</span></code> is a view into + a subset of its underlying sequence's elements satisfying a given predicate + (an <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a> metafunction). + The <code class="computeroutput"><span class="identifier">filter_view</span></code> presents + only those elements for which its predicate evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>. + </p> +<h5> +<a name="fusion.view.filter_view.h1"></a> + <span class="phrase"><a name="fusion.view.filter_view.header"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">filter_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">filter_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.filter_view.h2"></a> + <span class="phrase"><a name="fusion.view.filter_view.synopsis"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Pred</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">filter_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.filter_view.h3"></a> + <span class="phrase"><a name="fusion.view.filter_view.template_parameters"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Pred</span></code> + </p> + </td> +<td> + <p> + Unary Metafunction returning an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bool_</span></code> + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.filter_view.h4"></a> + <span class="phrase"><a name="fusion.view.filter_view.model_of"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">filter_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code>, <code class="computeroutput"><span class="identifier">f2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">filter_view</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.filter_view.h5"></a> + <span class="phrase"><a name="fusion.view.filter_view.expression_semantics"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in the implemented models. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a <code class="computeroutput"><span class="identifier">filter_view</span></code> + given a sequence, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">filter_view</span></code> + from another <code class="computeroutput"><span class="identifier">filter_view</span></code>, + <code class="computeroutput"><span class="identifier">f</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">f</span> <span class="special">=</span> + <span class="identifier">f2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">filter_view</span></code>, + <code class="computeroutput"><span class="identifier">f</span></code>, from another + <code class="computeroutput"><span class="identifier">filter_view</span></code>, <code class="computeroutput"><span class="identifier">f2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.filter_view.h6"></a> + <span class="phrase"><a name="fusion.view.filter_view.example"></a></span><a class="link" href="filter_view.html#fusion.view.filter_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span><span class="special">;</span> +<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">not_</span><span class="special">;</span> +<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_class</span><span class="special">;</span> + +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">long</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vector_type</span><span class="special">;</span> + +<span class="identifier">vector_type</span> <span class="identifier">v</span><span class="special">(</span><span class="string">"a-string"</span><span class="special">,</span> <span class="char">'@'</span><span class="special">,</span> <span class="number">987654</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="number">6.6</span><span class="special">);</span> +<span class="identifier">filter_view</span><span class="special"><</span><span class="identifier">vector_type</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">not_</span><span class="special"><</span><span class="identifier">is_class</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">></span> <span class="special">></span> <span class="identifier">view</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">view</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="single_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_range.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/iterator_range.html b/libs/fusion/doc/html/fusion/view/iterator_range.html new file mode 100644 index 000000000..a308a2315 --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/iterator_range.html @@ -0,0 +1,261 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>iterator_range</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="filter_view.html" title="filter_view"> +<link rel="next" href="joint_view.html" title="joint_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="joint_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.iterator_range"></a><a class="link" href="iterator_range.html" title="iterator_range">iterator_range</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.iterator_range.h0"></a> + <span class="phrase"><a name="fusion.view.iterator_range.description"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">iterator_range</span></code> presents a + sub-range of its underlying sequence delimited by a pair of iterators. + </p> +<h5> +<a name="fusion.view.iterator_range.h1"></a> + <span class="phrase"><a name="fusion.view.iterator_range.header"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">iterator_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">iterator_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.iterator_range.h2"></a> + <span class="phrase"><a name="fusion.view.iterator_range.synopsis"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Last</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">iterator_range</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.iterator_range.h3"></a> + <span class="phrase"><a name="fusion.view.iterator_range.template_parameters"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">First</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../iterator.html" title="Iterator">Iterator</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Last</span></code> + </p> + </td> +<td> + <p> + A fusion <a class="link" href="../iterator.html" title="Iterator">Iterator</a> + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.iterator_range.h4"></a> + <span class="phrase"><a name="fusion.view.iterator_range.model_of"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a>, + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> or <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> depending on the traversal characteristics (see + <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence Traversal + Concept</a>) of its underlying sequence. + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">First</span></code> + and <code class="computeroutput"><span class="identifier">Last</span></code> implement the + <a class="link" href="../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative + Iterator</a> model. + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">IR</span></code></span></dt> +<dd><p> + An <code class="computeroutput"><span class="identifier">iterator_range</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">First</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">l</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Last</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">ir</span></code>, <code class="computeroutput"><span class="identifier">ir2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">iterator_range</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.iterator_range.h5"></a> + <span class="phrase"><a name="fusion.view.iterator_range.expression_semantics"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in the implemented models. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">IR</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> + <span class="identifier">l</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an <code class="computeroutput"><span class="identifier">iterator_range</span></code> + given iterators, <code class="computeroutput"><span class="identifier">f</span></code> + and <code class="computeroutput"><span class="identifier">l</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">IR</span><span class="special">(</span><span class="identifier">ir</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an <code class="computeroutput"><span class="identifier">iterator_range</span></code> + from another <code class="computeroutput"><span class="identifier">iterator_range</span></code>, + <code class="computeroutput"><span class="identifier">ir</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">ir</span> <span class="special">=</span> + <span class="identifier">ir2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">iterator_range</span></code>, + <code class="computeroutput"><span class="identifier">ir</span></code>, from another + <code class="computeroutput"><span class="identifier">iterator_range</span></code>, + <code class="computeroutput"><span class="identifier">ir2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.iterator_range.h6"></a> + <span class="phrase"><a name="fusion.view.iterator_range.example"></a></span><a class="link" href="iterator_range.html#fusion.view.iterator_range.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"Ruby"</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span> <span class="keyword">const</span><span class="special">*></span> <span class="identifier">vector_type</span><span class="special">;</span> +<span class="identifier">vector_type</span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'x'</span><span class="special">,</span> <span class="number">3.3</span><span class="special">,</span> <span class="identifier">s</span><span class="special">);</span> + +<span class="keyword">typedef</span> <a class="link" href="../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">vector_type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">A</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../sequence/intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">vector_type</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">B</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../iterator/metafunctions/next.html" title="next"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">next</span></code></a><span class="special"><</span><span class="identifier">A</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">C</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../iterator/metafunctions/prior.html" title="prior"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">prior</span></code></a><span class="special"><</span><span class="identifier">B</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">D</span><span class="special">;</span> + +<span class="identifier">C</span> <span class="identifier">c</span><span class="special">(</span><span class="identifier">vec</span><span class="special">);</span> +<span class="identifier">D</span> <span class="identifier">d</span><span class="special">(</span><span class="identifier">vec</span><span class="special">);</span> + +<span class="identifier">iterator_range</span><span class="special"><</span><span class="identifier">C</span><span class="special">,</span> <span class="identifier">D</span><span class="special">></span> <span class="identifier">range</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">range</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="filter_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="joint_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/joint_view.html b/libs/fusion/doc/html/fusion/view/joint_view.html new file mode 100644 index 000000000..840b3b7dd --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/joint_view.html @@ -0,0 +1,250 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>joint_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="iterator_range.html" title="iterator_range"> +<link rel="next" href="zip_view.html" title="zip_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iterator_range.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.joint_view"></a><a class="link" href="joint_view.html" title="joint_view">joint_view</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.joint_view.h0"></a> + <span class="phrase"><a name="fusion.view.joint_view.description"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">joint_view</span></code> presents a view + which is a concatenation of two sequences. + </p> +<h5> +<a name="fusion.view.joint_view.h1"></a> + <span class="phrase"><a name="fusion.view.joint_view.header"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">joint_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">joint_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.joint_view.h2"></a> + <span class="phrase"><a name="fusion.view.joint_view.synopsis"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">joint_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.joint_view.h3"></a> + <span class="phrase"><a name="fusion.view.joint_view.template_parameters"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence1</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence2</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.joint_view.h4"></a> + <span class="phrase"><a name="fusion.view.joint_view.model_of"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a> + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence1</span></code> + and <code class="computeroutput"><span class="identifier">Sequence2</span></code> implement + the <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">JV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">joint_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s1</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence1</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s2</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence2</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">jv</span></code>, <code class="computeroutput"><span class="identifier">jv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">joint_view</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.joint_view.h5"></a> + <span class="phrase"><a name="fusion.view.joint_view.expression_semantics"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in the implemented models. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">JV</span><span class="special">(</span><span class="identifier">s1</span><span class="special">,</span> + <span class="identifier">s2</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a <code class="computeroutput"><span class="identifier">joint_view</span></code> + given sequences, <code class="computeroutput"><span class="identifier">s1</span></code> + and <code class="computeroutput"><span class="identifier">s2</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">JV</span><span class="special">(</span><span class="identifier">jv</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">joint_view</span></code> + from another <code class="computeroutput"><span class="identifier">joint_view</span></code>, + <code class="computeroutput"><span class="identifier">jv</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">jv</span> <span class="special">=</span> + <span class="identifier">jv2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">joint_view</span></code>, + <code class="computeroutput"><span class="identifier">jv</span></code>, from another + <code class="computeroutput"><span class="identifier">joint_view</span></code>, <code class="computeroutput"><span class="identifier">jv2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.joint_view.h6"></a> + <span class="phrase"><a name="fusion.view.joint_view.example"></a></span><a class="link" href="joint_view.html#fusion.view.joint_view.example">Example</a> + </h5> +<pre class="programlisting"><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">3</span><span class="special">,</span> <span class="char">'x'</span><span class="special">);</span> +<a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="string">"hello"</span><span class="special">,</span> <span class="number">123</span><span class="special">);</span> +<span class="identifier">joint_view</span><span class="special"><</span> + <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> + <span class="special">,</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> +<span class="special">></span> <span class="identifier">view</span><span class="special">(</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">view</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="iterator_range.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="zip_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/nview.html b/libs/fusion/doc/html/fusion/view/nview.html new file mode 100644 index 000000000..785f27a2a --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/nview.html @@ -0,0 +1,267 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>nview</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="reverse_view.html" title="reverse_view"> +<link rel="next" href="repetitive_view.html" title="repetitive_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="repetitive_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.nview"></a><a class="link" href="nview.html" title="nview">nview</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.nview.h0"></a> + <span class="phrase"><a name="fusion.view.nview.description"></a></span><a class="link" href="nview.html#fusion.view.nview.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">nview</span></code> presents a view which + iterates over a given <a class="link" href="../sequence.html" title="Sequence">Sequence</a> in + a specified order. An <code class="computeroutput"><span class="identifier">nview</span></code> + is constructed from an arbitrary <a class="link" href="../sequence.html" title="Sequence">Sequence</a> + and a list of indicies specifying the elements to iterate over. + </p> +<h5> +<a name="fusion.view.nview.h1"></a> + <span class="phrase"><a name="fusion.view.nview.header"></a></span><a class="link" href="nview.html#fusion.view.nview.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">nview</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">nview</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.nview.h2"></a> + <span class="phrase"><a name="fusion.view.nview.synopsis"></a></span><a class="link" href="nview.html#fusion.view.nview.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Indicies</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">nview</span><span class="special">;</span> + +<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">I1</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">I2</span> <span class="special">=</span> <span class="special">-</span><span class="number">1</span><span class="special">,</span> <span class="special">...></span> +<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">nview</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">I1</span><span class="special">,</span> <span class="identifier">I2</span><span class="special">,</span> <span class="special">...>::</span><span class="identifier">type</span> +<span class="identifier">as_nview</span><span class="special">(</span><span class="identifier">Sequence</span><span class="special">&</span> <span class="identifier">s</span><span class="special">);</span> +</pre> +<h5> +<a name="fusion.view.nview.h3"></a> + <span class="phrase"><a name="fusion.view.nview.template_parameters"></a></span><a class="link" href="nview.html#fusion.view.nview.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + An arbitrary Fusion <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Indicies</span></code> + </p> + </td> +<td> + <p> + A <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector_c</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="special">...></span></code> holding the indicies defining + the required iteration order. + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">I1</span></code>, <code class="computeroutput"><span class="identifier">I2</span></code>, <code class="computeroutput"><span class="identifier">I3</span></code>... + </p> + </td> +<td> + <p> + A list of integers specifying the required iteration order. + </p> + </td> +<td> + <p> + <code class="computeroutput"><span class="identifier">INT_MAX</span></code> for <code class="computeroutput"><span class="identifier">I2</span></code>, <code class="computeroutput"><span class="identifier">I3</span></code>... + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.nview.h4"></a> + <span class="phrase"><a name="fusion.view.nview.model_of"></a></span><a class="link" href="nview.html#fusion.view.nview.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> (see <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence + Traversal Concept</a>) + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">NV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">nview</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequences</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">nv1</span></code>, <code class="computeroutput"><span class="identifier">nv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">NV</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.nview.h5"></a> + <span class="phrase"><a name="fusion.view.nview.expression_semantics"></a></span><a class="link" href="nview.html#fusion.view.nview.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">NV</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates an <code class="computeroutput"><span class="identifier">nview</span></code> + given a sequence and a list of indicies. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">NV</span><span class="special">(</span><span class="identifier">nv1</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs an <code class="computeroutput"><span class="identifier">nview</span></code> + from another <code class="computeroutput"><span class="identifier">nview</span></code>, + <code class="computeroutput"><span class="identifier">nv1</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">nv1</span> <span class="special">=</span> + <span class="identifier">nv2</span></code> + </p> + </td> +<td> + <p> + Assigns to an <code class="computeroutput"><span class="identifier">nview</span></code>, + <code class="computeroutput"><span class="identifier">nv1</span></code>, from another + <code class="computeroutput"><span class="identifier">nview</span></code>, <code class="computeroutput"><span class="identifier">nv2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<p> + The <code class="computeroutput"><span class="identifier">nview</span></code> internally stores + a Fusion <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a> + of references to the elements of the original Fusion <a class="link" href="../sequence.html" title="Sequence">Sequence</a> + </p> +<h5> +<a name="fusion.view.nview.h6"></a> + <span class="phrase"><a name="fusion.view.nview.example"></a></span><a class="link" href="nview.html#fusion.view.nview.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vec</span><span class="special">;</span> +<span class="keyword">typedef</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector_c</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">0</span><span class="special">></span> <span class="identifier">indicies</span><span class="special">;</span> + +<span class="identifier">vec</span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'c'</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">nview</span><span class="special"><</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">indicies</span><span class="special">>(</span><span class="identifier">v1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// (2.0 c 1 2.0 1)</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">as_nview</span><span class="special"><</span><span class="number">2</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">0</span><span class="special">>(</span><span class="identifier">v1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// (2.0 c c 1)</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="reverse_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="repetitive_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/repetitive_view.html b/libs/fusion/doc/html/fusion/view/repetitive_view.html new file mode 100644 index 000000000..6d2877e49 --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/repetitive_view.html @@ -0,0 +1,282 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>repetitive_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="nview.html" title="nview"> +<link rel="next" href="../adapted.html" title="Adapted"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="nview.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../adapted.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.repetitive_view"></a><a class="link" href="repetitive_view.html" title="repetitive_view">repetitive_view</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.repetitive_view.h0"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.description"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">repetitive_view</span></code> presents + a view which iterates over a given <a class="link" href="../sequence.html" title="Sequence">Sequence</a> + repeatedly. Because a <code class="computeroutput"><span class="identifier">repetitive_view</span></code> + has infinite length, it can only be used when some external condition determines + the end. Thus, initializing a fixed length sequence with a <code class="computeroutput"><span class="identifier">repetitive_view</span></code> is okay, but printing a + <code class="computeroutput"><span class="identifier">repetitive_view</span></code> to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span></code> + is not. + </p> +<h5> +<a name="fusion.view.repetitive_view.h1"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.header"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">repetitive_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">repetitive_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.repetitive_view.h2"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.synopsis"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">repetitive_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.repetitive_view.h3"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.template_parameters"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + An arbitrary Fusion <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">RV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">repetitive_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequences</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">rv</span></code>, <code class="computeroutput"><span class="identifier">rv1</span></code>, <code class="computeroutput"><span class="identifier">rv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">RV</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.repetitive_view.h4"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.expression_semantics"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.expression_semantics">Expression + Semantics</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Return Type + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">RV</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + </td> +<td> + <p> + Creates an <code class="computeroutput"><span class="identifier">repetitive_view</span></code> + given the underlying sequence. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">RV</span><span class="special">(</span><span class="identifier">rv1</span><span class="special">)</span></code> + </p> + </td> +<td> + </td> +<td> + <p> + Copy constructs an <code class="computeroutput"><span class="identifier">repetitive_view</span></code> + from another <code class="computeroutput"><span class="identifier">repetitive_view</span></code>, + <code class="computeroutput"><span class="identifier">rv1</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">rv1</span> <span class="special">=</span> + <span class="identifier">rv2</span></code> + </p> + </td> +<td> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">repetitive_view</span></code>, + <code class="computeroutput"><span class="identifier">rv1</span></code>, from another + <code class="computeroutput"><span class="identifier">repetitive_view</span></code>, + <code class="computeroutput"><span class="identifier">rv2</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a><span class="special">(</span><span class="identifier">rv</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a><span class="special">(</span><span class="identifier">rv</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + <a class="link" href="../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward + Iterator</a> + </p> + </td> +<td> + <p> + Creates an unreachable iterator (since the sequnce is infinite) + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.repetitive_view.h5"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.result_type_expressions"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.result_type_expressions">Result + Type Expressions</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup><col></colgroup> +<thead><tr><th> + <p> + Expression + </p> + </th></tr></thead> +<tbody> +<tr><td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/metafunctions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special"><</span><span class="identifier">RV</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td></tr> +<tr><td> + <p> + <code class="computeroutput"><a class="link" href="../sequence/intrinsic/metafunctions/end.html" title="end"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">end</span></code></a><span class="special"><</span><span class="identifier">RV</span><span class="special">>::</span><span class="identifier">type</span></code> + </p> + </td></tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.repetitive_view.h6"></a> + <span class="phrase"><a name="fusion.view.repetitive_view.example"></a></span><a class="link" href="repetitive_view.html#fusion.view.repetitive_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vec1</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">vec2</span><span class="special">;</span> + +<span class="identifier">vec1</span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="char">'c'</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span> +<span class="identifier">vec2</span> <span class="identifier">v2</span><span class="special">(</span><span class="identifier">repetitive_view</span><span class="special"><</span><span class="identifier">vec1</span><span class="special">>(</span><span class="identifier">v1</span><span class="special">));</span> + +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">v2</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// 1, 'c', 2.0, 1, 'c'</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="nview.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../adapted.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/reverse_view.html b/libs/fusion/doc/html/fusion/view/reverse_view.html new file mode 100644 index 000000000..f74d93a9b --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/reverse_view.html @@ -0,0 +1,228 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>reverse_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="transform_view.html" title="transform_view"> +<link rel="next" href="nview.html" title="nview"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nview.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.reverse_view"></a><a class="link" href="reverse_view.html" title="reverse_view">reverse_view</a> +</h3></div></div></div> +<p> + <code class="computeroutput"><span class="identifier">reverse_view</span></code> presents a reversed + view of underlying sequence. The first element will be its last and the last + element will be its first. + </p> +<h5> +<a name="fusion.view.reverse_view.h0"></a> + <span class="phrase"><a name="fusion.view.reverse_view.header"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">reverse_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">reverse_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.reverse_view.h1"></a> + <span class="phrase"><a name="fusion.view.reverse_view.synopsis"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">reverse_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.reverse_view.h2"></a> + <span class="phrase"><a name="fusion.view.reverse_view.template_parameters"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.view.reverse_view.h3"></a> + <span class="phrase"><a name="fusion.view.reverse_view.model_of"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"> + A model of <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + is a <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> else, <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + is a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </li> +<li class="listitem"> + <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> if <code class="computeroutput"><span class="identifier">Sequence</span></code> + implements the <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative + Sequence</a> model. + </li> +</ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">RV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">reverse_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">rv</span></code>, <code class="computeroutput"><span class="identifier">rv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">reverse_view</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.reverse_view.h4"></a> + <span class="phrase"><a name="fusion.view.reverse_view.expression_semantics"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in the implemented models. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">RV</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a unary <code class="computeroutput"><span class="identifier">reverse_view</span></code> + given sequence, <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">RV</span><span class="special">(</span><span class="identifier">rv</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">reverse_view</span></code> + from another <code class="computeroutput"><span class="identifier">reverse_view</span></code>, + <code class="computeroutput"><span class="identifier">rv</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">rv</span> <span class="special">=</span> + <span class="identifier">rv2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">reverse_view</span></code>, + <code class="computeroutput"><span class="identifier">rv</span></code>, from another + <code class="computeroutput"><span class="identifier">reverse_view</span></code>, + <code class="computeroutput"><span class="identifier">rv2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.reverse_view.h5"></a> + <span class="phrase"><a name="fusion.view.reverse_view.example"></a></span><a class="link" href="reverse_view.html#fusion.view.reverse_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">short</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vector_type</span><span class="special">;</span> +<span class="identifier">vector_type</span> <span class="identifier">vec</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="number">5</span><span class="special">,</span> <span class="number">3.3</span><span class="special">);</span> + +<span class="identifier">reverse_view</span><span class="special"><</span><span class="identifier">vector_type</span><span class="special">></span> <span class="identifier">reverse</span><span class="special">(</span><span class="identifier">vec</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">reverse</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="transform_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nview.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/single_view.html b/libs/fusion/doc/html/fusion/view/single_view.html new file mode 100644 index 000000000..14356b55e --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/single_view.html @@ -0,0 +1,210 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>single_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="../view.html" title="View"> +<link rel="next" href="filter_view.html" title="filter_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.single_view"></a><a class="link" href="single_view.html" title="single_view">single_view</a> +</h3></div></div></div> +<p> + <code class="computeroutput"><span class="identifier">single_view</span></code> is a view into + a value as a single element sequence. + </p> +<h5> +<a name="fusion.view.single_view.h0"></a> + <span class="phrase"><a name="fusion.view.single_view.header"></a></span><a class="link" href="single_view.html#fusion.view.single_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">single_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">single_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.single_view.h1"></a> + <span class="phrase"><a name="fusion.view.single_view.synopsis"></a></span><a class="link" href="single_view.html#fusion.view.single_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">single_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.single_view.h2"></a> + <span class="phrase"><a name="fusion.view.single_view.template_parameters"></a></span><a class="link" href="single_view.html#fusion.view.single_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">T</span></code> + </p> + </td> +<td> + <p> + Any type + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.view.single_view.h3"></a> + <span class="phrase"><a name="fusion.view.single_view.model_of"></a></span><a class="link" href="single_view.html#fusion.view.single_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">single_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code>, <code class="computeroutput"><span class="identifier">s2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">single_view</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">T</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.single_view.h4"></a> + <span class="phrase"><a name="fusion.view.single_view.expression_semantics"></a></span><a class="link" href="single_view.html#fusion.view.single_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a <code class="computeroutput"><span class="identifier">single_view</span></code> + from <code class="computeroutput"><span class="identifier">x</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">single_view</span></code> + from another <code class="computeroutput"><span class="identifier">single_view</span></code>, + <code class="computeroutput"><span class="identifier">s</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">s</span> <span class="special">=</span> + <span class="identifier">s2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">single_view</span></code>, + <code class="computeroutput"><span class="identifier">s</span></code>, from another + <code class="computeroutput"><span class="identifier">single_view</span></code>, <code class="computeroutput"><span class="identifier">s2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.single_view.h5"></a> + <span class="phrase"><a name="fusion.view.single_view.example"></a></span><a class="link" href="single_view.html#fusion.view.single_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="identifier">single_view</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">view</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">view</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="../view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="filter_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/transform_view.html b/libs/fusion/doc/html/fusion/view/transform_view.html new file mode 100644 index 000000000..b0b05684e --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/transform_view.html @@ -0,0 +1,365 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>transform_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="zip_view.html" title="zip_view"> +<link rel="next" href="reverse_view.html" title="reverse_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.transform_view"></a><a class="link" href="transform_view.html" title="transform_view">transform_view</a> +</h3></div></div></div> +<p> + The unary version of <code class="computeroutput"><span class="identifier">transform_view</span></code> + presents a view of its underlying sequence given a unary function object + or function pointer. The binary version of <code class="computeroutput"><span class="identifier">transform_view</span></code> + presents a view of 2 underlying sequences, given a binary function object + or function pointer. The <code class="computeroutput"><span class="identifier">transform_view</span></code> + inherits the traversal characteristics (see <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence + Traversal Concept</a>) of its underlying sequence or sequences. + </p> +<h5> +<a name="fusion.view.transform_view.h0"></a> + <span class="phrase"><a name="fusion.view.transform_view.header"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">transform_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">transform_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.transform_view.h1"></a> + <span class="phrase"><a name="fusion.view.transform_view.synopsis"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.synopsis">Synopsis</a> + </h5> +<p> + <span class="bold"><strong>Unary Version</strong></span> + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">F1</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">transform_view</span><span class="special">;</span> +</pre> +<p> + <span class="bold"><strong>Binary Version</strong></span> + </p> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequence1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Sequence2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">F2</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">transform_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.transform_view.h2"></a> + <span class="phrase"><a name="fusion.view.transform_view.template_parameters"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence1</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequence2</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F1</span></code> + </p> + </td> +<td> + <p> + A unary function object or function pointer. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F1</span><span class="special">(</span><span class="identifier">E</span><span class="special">)>::</span><span class="identifier">type</span></code> is the return type of an + instance of <code class="computeroutput"><span class="identifier">F1</span></code> + when called with a value of each element type <code class="computeroutput"><span class="identifier">E</span></code> + in the input sequence. + </p> + </td> +<td> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">F2</span></code> + </p> + </td> +<td> + <p> + A binary function object or function pointer. <code class="computeroutput"><a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><span class="special"><</span><span class="identifier">F2</span><span class="special">(</span><span class="identifier">E1</span><span class="special">,</span> + <span class="identifier">E2</span><span class="special">)>::</span><span class="identifier">type</span></code> is the return type of an + instance of <code class="computeroutput"><span class="identifier">F2</span></code> + when called with a value of each corresponding pair of element + type <code class="computeroutput"><span class="identifier">E1</span></code> and <code class="computeroutput"><span class="identifier">E2</span></code> in the input sequences. + </p> + </td> +<td> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.transform_view.h3"></a> + <span class="phrase"><a name="fusion.view.transform_view.model_of"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a>, + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> or <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> depending on the traversal characteristics (see + <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence Traversal + Concept</a>) of its underlying sequence. + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">TV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">transform_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">BTV</span></code></span></dt> +<dd><p> + A binary <code class="computeroutput"><span class="identifier">transform_view</span></code> + type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">UTV</span></code></span></dt> +<dd><p> + A unary <code class="computeroutput"><span class="identifier">transform_view</span></code> + type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f1</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">F1</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">f2</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">F2</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s1</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence1</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s2</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequence2</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">tv</span></code>, <code class="computeroutput"><span class="identifier">tv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">transform_view</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.transform_view.h4"></a> + <span class="phrase"><a name="fusion.view.transform_view.expression_semantics"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>, <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> or <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> depending on the traversal characteristics (see <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence Traversal Concept</a>) + of its underlying sequence or sequences. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">UTV</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> + <span class="identifier">f1</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a unary <code class="computeroutput"><span class="identifier">transform_view</span></code> + given sequence, <code class="computeroutput"><span class="identifier">s</span></code> + and unary function object or function pointer, <code class="computeroutput"><span class="identifier">f1</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">BTV</span><span class="special">(</span><span class="identifier">s1</span><span class="special">,</span> + <span class="identifier">s2</span><span class="special">,</span> + <span class="identifier">f2</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a binary <code class="computeroutput"><span class="identifier">transform_view</span></code> + given sequences, <code class="computeroutput"><span class="identifier">s1</span></code> + and <code class="computeroutput"><span class="identifier">s2</span></code> and binary + function object or function pointer, <code class="computeroutput"><span class="identifier">f2</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">TV</span><span class="special">(</span><span class="identifier">tv</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">transform_view</span></code> + from another <code class="computeroutput"><span class="identifier">transform_view</span></code>, + <code class="computeroutput"><span class="identifier">tv</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">tv</span> <span class="special">=</span> + <span class="identifier">tv2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">transform_view</span></code>, + <code class="computeroutput"><span class="identifier">tv</span></code>, from another + <code class="computeroutput"><span class="identifier">transform_view</span></code>, + <code class="computeroutput"><span class="identifier">tv2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.transform_view.h5"></a> + <span class="phrase"><a name="fusion.view.transform_view.example"></a></span><a class="link" href="transform_view.html#fusion.view.transform_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">square</span> +<span class="special">{</span> + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sig</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span> + + <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> + <span class="keyword">struct</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">square</span><span class="special">(</span><span class="identifier">U</span><span class="special">)></span> + <span class="special">:</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> + <span class="special">{};</span> + + <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> + <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span> + <span class="special">{</span> + <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">;</span> + <span class="special">}</span> +<span class="special">};</span> + +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">short</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">vector_type</span><span class="special">;</span> +<span class="identifier">vector_type</span> <span class="identifier">vec</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="number">5</span><span class="special">,</span> <span class="number">3.3</span><span class="special">);</span> + +<span class="identifier">transform_view</span><span class="special"><</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">square</span><span class="special">></span> <span class="identifier">transform</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">square</span><span class="special">());</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">transform</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="zip_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reverse_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/fusion/view/zip_view.html b/libs/fusion/doc/html/fusion/view/zip_view.html new file mode 100644 index 000000000..cf137f1fd --- /dev/null +++ b/libs/fusion/doc/html/fusion/view/zip_view.html @@ -0,0 +1,226 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>zip_view</title> +<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.1"> +<link rel="up" href="../view.html" title="View"> +<link rel="prev" href="joint_view.html" title="joint_view"> +<link rel="next" href="transform_view.html" title="transform_view"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> +<td align="center"><a href="../../../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="joint_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="fusion.view.zip_view"></a><a class="link" href="zip_view.html" title="zip_view">zip_view</a> +</h3></div></div></div> +<h5> +<a name="fusion.view.zip_view.h0"></a> + <span class="phrase"><a name="fusion.view.zip_view.description"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.description">Description</a> + </h5> +<p> + <code class="computeroutput"><span class="identifier">zip_view</span></code> presents a view + which iterates over a collection of <a class="link" href="../sequence.html" title="Sequence">Sequence</a>(s) + in parallel. A <code class="computeroutput"><span class="identifier">zip_view</span></code> is + constructed from a <a class="link" href="../sequence.html" title="Sequence">Sequence</a> of references + to the component __sequence__s. + </p> +<h5> +<a name="fusion.view.zip_view.h1"></a> + <span class="phrase"><a name="fusion.view.zip_view.header"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.header">Header</a> + </h5> +<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">view</span><span class="special">/</span><span class="identifier">zip_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">zip_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> +</pre> +<h5> +<a name="fusion.view.zip_view.h2"></a> + <span class="phrase"><a name="fusion.view.zip_view.synopsis"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.synopsis">Synopsis</a> + </h5> +<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Sequences</span><span class="special">></span> +<span class="keyword">struct</span> <span class="identifier">zip_view</span><span class="special">;</span> +</pre> +<h5> +<a name="fusion.view.zip_view.h3"></a> + <span class="phrase"><a name="fusion.view.zip_view.template_parameters"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.template_parameters">Template + parameters</a> + </h5> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Parameter + </p> + </th> +<th> + <p> + Description + </p> + </th> +<th> + <p> + Default + </p> + </th> +</tr></thead> +<tbody><tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">Sequences</span></code> + </p> + </td> +<td> + <p> + A <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a> of references to other Fusion __sequence__s + </p> + </td> +<td> + </td> +</tr></tbody> +</table></div> +<h5> +<a name="fusion.view.zip_view.h4"></a> + <span class="phrase"><a name="fusion.view.zip_view.model_of"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.model_of">Model + of</a> + </h5> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> + <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward Sequence</a>, + <a class="link" href="../sequence/concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional + Sequence</a> or <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random + Access Sequence</a> depending on the traversal characteristics (see + <a class="link" href="../sequence/concepts.html#fusion.sequence.concepts.traversal">Sequence Traversal + Concept</a>) of its underlying sequence. + </li></ul></div> +<div class="variablelist"> +<p class="title"><b>Notation</b></p> +<dl class="variablelist"> +<dt><span class="term"><code class="computeroutput"><span class="identifier">ZV</span></code></span></dt> +<dd><p> + A <code class="computeroutput"><span class="identifier">zip_view</span></code> type + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt> +<dd><p> + An instance of <code class="computeroutput"><span class="identifier">Sequences</span></code> + </p></dd> +<dt><span class="term"><code class="computeroutput"><span class="identifier">zv1</span></code>, <code class="computeroutput"><span class="identifier">zv2</span></code></span></dt> +<dd><p> + Instances of <code class="computeroutput"><span class="identifier">ZV</span></code> + </p></dd> +</dl> +</div> +<h5> +<a name="fusion.view.zip_view.h5"></a> + <span class="phrase"><a name="fusion.view.zip_view.expression_semantics"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.expression_semantics">Expression + Semantics</a> + </h5> +<p> + Semantics of an expression is defined only where it differs from, or is not + defined in <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward + Sequence</a>. + </p> +<div class="informaltable"><table class="table"> +<colgroup> +<col> +<col> +</colgroup> +<thead><tr> +<th> + <p> + Expression + </p> + </th> +<th> + <p> + Semantics + </p> + </th> +</tr></thead> +<tbody> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">ZV</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Creates a <code class="computeroutput"><span class="identifier">zip_view</span></code> + given a sequence of references to the component __sequence__s. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">ZV</span><span class="special">(</span><span class="identifier">zv1</span><span class="special">)</span></code> + </p> + </td> +<td> + <p> + Copy constructs a <code class="computeroutput"><span class="identifier">zip_view</span></code> + from another <code class="computeroutput"><span class="identifier">zip_view</span></code>, + <code class="computeroutput"><span class="identifier">zv</span></code>. + </p> + </td> +</tr> +<tr> +<td> + <p> + <code class="computeroutput"><span class="identifier">zv1</span> <span class="special">=</span> + <span class="identifier">zv2</span></code> + </p> + </td> +<td> + <p> + Assigns to a <code class="computeroutput"><span class="identifier">zip_view</span></code>, + <code class="computeroutput"><span class="identifier">zv</span></code>, from another + <code class="computeroutput"><span class="identifier">zip_view</span></code>, <code class="computeroutput"><span class="identifier">zv2</span></code>. + </p> + </td> +</tr> +</tbody> +</table></div> +<h5> +<a name="fusion.view.zip_view.h6"></a> + <span class="phrase"><a name="fusion.view.zip_view.example"></a></span><a class="link" href="zip_view.html#fusion.view.zip_view.example">Example</a> + </h5> +<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec1</span><span class="special">;</span> +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">char</span><span class="special">,</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">vec2</span><span class="special">;</span> +<span class="identifier">vec1</span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">);</span> +<span class="identifier">vec2</span> <span class="identifier">v2</span><span class="special">(</span><span class="char">'a'</span><span class="special">,</span><span class="char">'b'</span><span class="special">);</span> +<span class="keyword">typedef</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">vec1</span><span class="special">&,</span> <span class="identifier">vec2</span><span class="special">&></span> <span class="identifier">sequences</span><span class="special">;</span> +<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">zip_view</span><span class="special"><</span><span class="identifier">sequences</span><span class="special">>(</span><span class="identifier">sequences</span><span class="special">(</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// ((1 a) (2 b))</span> +</pre> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"></td> +<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></td> +</tr></table> +<hr> +<div class="spirit-nav"> +<a accesskey="p" href="joint_view.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../view.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="transform_view.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> +</div> +</body> +</html> diff --git a/libs/fusion/doc/html/images/alert.png b/libs/fusion/doc/html/images/alert.png Binary files differnew file mode 100644 index 000000000..b4645bc7e --- /dev/null +++ b/libs/fusion/doc/html/images/alert.png diff --git a/libs/fusion/doc/html/images/caution.png b/libs/fusion/doc/html/images/caution.png Binary files differnew file mode 100644 index 000000000..5b7809ca4 --- /dev/null +++ b/libs/fusion/doc/html/images/caution.png diff --git a/libs/fusion/doc/html/images/fusion_org.png b/libs/fusion/doc/html/images/fusion_org.png Binary files differnew file mode 100644 index 000000000..3bb56539d --- /dev/null +++ b/libs/fusion/doc/html/images/fusion_org.png diff --git a/libs/fusion/doc/html/images/home.png b/libs/fusion/doc/html/images/home.png Binary files differnew file mode 100644 index 000000000..5584aacb0 --- /dev/null +++ b/libs/fusion/doc/html/images/home.png diff --git a/libs/fusion/doc/html/images/important.png b/libs/fusion/doc/html/images/important.png Binary files differnew file mode 100644 index 000000000..12c90f607 --- /dev/null +++ b/libs/fusion/doc/html/images/important.png diff --git a/libs/fusion/doc/html/images/next.png b/libs/fusion/doc/html/images/next.png Binary files differnew file mode 100644 index 000000000..59800b4e8 --- /dev/null +++ b/libs/fusion/doc/html/images/next.png diff --git a/libs/fusion/doc/html/images/note.png b/libs/fusion/doc/html/images/note.png Binary files differnew file mode 100644 index 000000000..3ed047cac --- /dev/null +++ b/libs/fusion/doc/html/images/note.png diff --git a/libs/fusion/doc/html/images/prev.png b/libs/fusion/doc/html/images/prev.png Binary files differnew file mode 100644 index 000000000..d88a40f92 --- /dev/null +++ b/libs/fusion/doc/html/images/prev.png diff --git a/libs/fusion/doc/html/images/smiley.png b/libs/fusion/doc/html/images/smiley.png Binary files differnew file mode 100644 index 000000000..30a77f71c --- /dev/null +++ b/libs/fusion/doc/html/images/smiley.png diff --git a/libs/fusion/doc/html/images/tip.png b/libs/fusion/doc/html/images/tip.png Binary files differnew file mode 100644 index 000000000..9f596b0b8 --- /dev/null +++ b/libs/fusion/doc/html/images/tip.png diff --git a/libs/fusion/doc/html/images/up.png b/libs/fusion/doc/html/images/up.png Binary files differnew file mode 100644 index 000000000..17d9c3ec4 --- /dev/null +++ b/libs/fusion/doc/html/images/up.png diff --git a/libs/fusion/doc/html/images/warning.png b/libs/fusion/doc/html/images/warning.png Binary files differnew file mode 100644 index 000000000..1c33db8f3 --- /dev/null +++ b/libs/fusion/doc/html/images/warning.png diff --git a/libs/fusion/doc/html/index.html b/libs/fusion/doc/html/index.html new file mode 100644 index 000000000..45e8e1940 --- /dev/null +++ b/libs/fusion/doc/html/index.html @@ -0,0 +1,277 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<title>Chapter 1. Fusion 2.1</title> +<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> +<link rel="home" href="index.html" title="Chapter 1. Fusion 2.1"> +<link rel="next" href="fusion/preface.html" title="Preface"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table cellpadding="2" width="100%"><tr> +<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> +<td align="center"><a href="../../../../index.html">Home</a></td> +<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> +<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> +<td align="center"><a href="../../../../more/index.htm">More</a></td> +</tr></table> +<hr> +<div class="spirit-nav"><a accesskey="n" href="fusion/preface.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> +<div class="chapter"> +<div class="titlepage"><div> +<div><h2 class="title"> +<a name="fusion"></a>Chapter 1. Fusion 2.1</h2></div> +<div><div class="author"><h3 class="author"> +<span class="firstname">Joel</span> <span class="surname">de Guzman</span> +</h3></div></div> +<div><div class="author"><h3 class="author"> +<span class="firstname">Dan</span> <span class="surname">Marsden</span> +</h3></div></div> +<div><div class="author"><h3 class="author"> +<span class="firstname">Tobias</span> <span class="surname">Schwinger</span> +</h3></div></div> +<div><p class="copyright">Copyright © 2001-2006, 2011, 2012 Joel de Guzman, + Dan Marsden, Tobias Schwinger</p></div> +<div><div class="legalnotice"> +<a name="fusion.legal"></a><p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) + </p> +</div></div> +</div></div> +<div class="toc"> +<p><b>Table of Contents</b></p> +<dl class="toc"> +<dt><span class="section"><a href="fusion/preface.html">Preface</a></span></dt> +<dt><span class="section"><a href="fusion/introduction.html">Introduction</a></span></dt> +<dt><span class="section"><a href="fusion/quick_start.html">Quick Start</a></span></dt> +<dt><span class="section"><a href="fusion/organization.html">Organization</a></span></dt> +<dt><span class="section"><a href="fusion/support.html">Support</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/support/is_sequence.html">is_sequence</a></span></dt> +<dt><span class="section"><a href="fusion/support/is_view.html">is_view</a></span></dt> +<dt><span class="section"><a href="fusion/support/tag_of.html">tag_of</a></span></dt> +<dt><span class="section"><a href="fusion/support/category_of.html">category_of</a></span></dt> +<dt><span class="section"><a href="fusion/support/deduce.html">deduce</a></span></dt> +<dt><span class="section"><a href="fusion/support/deduce_sequence.html">deduce_sequence</a></span></dt> +<dt><span class="section"><a href="fusion/support/pair.html">pair</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/iterator.html">Iterator</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/iterator/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/iterator/concepts/forward_iterator.html">Forward + Iterator</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/concepts/bidirectional_iterator.html">Bidirectional + Iterator</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/concepts/random_access_iterator.html">Random + Access Iterator</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/concepts/associative_iterator.html">Associative + Iterator</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/iterator/functions.html">Functions</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/iterator/functions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/next.html">next</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/functions/deref_data.html">deref_data</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/iterator/operator.html">Operator</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/iterator/operator/operator_unary_star.html">Operator + *</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/operator/operator_equality.html">Operator + ==</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/operator/operator_inequality.html">Operator + !=</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/iterator/metafunctions.html">Metafunctions</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/iterator/metafunctions/value_of.html">value_of</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/deref.html">deref</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/next.html">next</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/prior.html">prior</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/equal_to.html">equal_to</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/distance.html">distance</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/advance.html">advance</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/advance_c.html">advance_c</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/key_of.html">key_of</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/value_of_data.html">value_of_data</a></span></dt> +<dt><span class="section"><a href="fusion/iterator/metafunctions/deref_data.html">deref_data</a></span></dt> +</dl></dd> +</dl></dd> +<dt><span class="section"><a href="fusion/sequence.html">Sequence</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/sequence/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/sequence/concepts/forward_sequence.html">Forward + Sequence</a></span></dt> +<dt><span class="section"><a href="fusion/sequence/concepts/bidirectional_sequence.html">Bidirectional + Sequence</a></span></dt> +<dt><span class="section"><a href="fusion/sequence/concepts/random_access_sequence.html">Random + Access Sequence</a></span></dt> +<dt><span class="section"><a href="fusion/sequence/concepts/associative_sequence.html">Associative + Sequence</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/sequence/intrinsic.html">Intrinsic</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/sequence/intrinsic/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/sequence/intrinsic/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/sequence/operator.html">Operator</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/sequence/operator/i_o.html">I/O</a></span></dt> +<dt><span class="section"><a href="fusion/sequence/operator/comparison.html">Comparison</a></span></dt> +</dl></dd> +</dl></dd> +<dt><span class="section"><a href="fusion/container.html">Container</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/container/vector.html">vector</a></span></dt> +<dt><span class="section"><a href="fusion/container/cons.html">cons</a></span></dt> +<dt><span class="section"><a href="fusion/container/list.html">list</a></span></dt> +<dt><span class="section"><a href="fusion/container/deque.html">deque</a></span></dt> +<dt><span class="section"><a href="fusion/container/front_extended_deque.html">front_extended_deque</a></span></dt> +<dt><span class="section"><a href="fusion/container/back_extended_deque.html">back_extended_deque</a></span></dt> +<dt><span class="section"><a href="fusion/container/set.html">set</a></span></dt> +<dt><span class="section"><a href="fusion/container/map.html">map</a></span></dt> +<dt><span class="section"><a href="fusion/container/generation.html">Generation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/container/generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/container/generation/metafunctions.html">MetaFunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/container/conversion.html">Conversion</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/container/conversion/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/container/conversion/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></dd> +<dt><span class="section"><a href="fusion/view.html">View</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/view/single_view.html">single_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/filter_view.html">filter_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/iterator_range.html">iterator_range</a></span></dt> +<dt><span class="section"><a href="fusion/view/joint_view.html">joint_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/zip_view.html">zip_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/transform_view.html">transform_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/reverse_view.html">reverse_view</a></span></dt> +<dt><span class="section"><a href="fusion/view/nview.html">nview</a></span></dt> +<dt><span class="section"><a href="fusion/view/repetitive_view.html">repetitive_view</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/adapted.html">Adapted</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/adapted/array.html">Array</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/std__pair.html">std::pair</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/mpl_sequence.html">mpl sequence</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/boost__array.html">boost::array</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/boost__tuple.html">boost::tuple</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_struct.html">BOOST_FUSION_ADAPT_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_tpl_struct.html">BOOST_FUSION_ADAPT_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_struct_named.html">BOOST_FUSION_ADAPT_STRUCT_NAMED</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_assoc.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_assoc_tpl_struct.html">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_assoc_struct_named.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_adt.html">BOOST_FUSION_ADAPT_ADT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_tpl_adt.html">BOOST_FUSION_ADAPT_TPL_ADT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_assoc_adt.html">BOOST_FUSION_ADAPT_ASSOC_ADT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/adapt_assoc_tpl_adt.html">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_struct.html">BOOST_FUSION_DEFINE_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_tpl_struct.html">BOOST_FUSION_DEFINE_TPL_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_struct_inline.html">BOOST_FUSION_DEFINE_STRUCT_INLINE</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_tpl_struct_inline.html">BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_assoc_struct.html">BOOST_FUSION_DEFINE_ASSOC_STRUCT</a></span></dt> +<dt><span class="section"><a href="fusion/adapted/define_assoc_tpl_struct.html">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/algorithm.html">Algorithm</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/algorithm/auxiliary.html">Auxiliary</a></span></dt> +<dd><dl><dt><span class="section"><a href="fusion/algorithm/auxiliary/functions.html">Functions</a></span></dt></dl></dd> +<dt><span class="section"><a href="fusion/algorithm/iteration.html">Iteration</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/algorithm/iteration/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/algorithm/iteration/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/algorithm/query.html">Query</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/algorithm/query/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/algorithm/query/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/algorithm/transformation.html">Transformation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/algorithm/transformation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/algorithm/transformation/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></dd> +<dt><span class="section"><a href="fusion/tuple.html">Tuple</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple.html">Class template tuple</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple/construction.html">Construction</a></span></dt> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple/tuple_creation_functions.html">Tuple + creation functions</a></span></dt> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple/tuple_helper_classes.html">Tuple + helper classes</a></span></dt> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple/element_access.html">Element + access</a></span></dt> +<dt><span class="section"><a href="fusion/tuple/class_template_tuple/relational_operators.html">Relational + operators</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/tuple/pairs.html">Pairs</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/extension.html">Extension</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/extension/ext_full.html">The Full Extension Mechanism</a></span></dt> +<dt><span class="section"><a href="fusion/extension/sequence_facade.html">Sequence Facade</a></span></dt> +<dt><span class="section"><a href="fusion/extension/iterator_facade.html">Iterator Facade</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/functional.html">Functional</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/functional/concepts.html">Concepts</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/functional/concepts/callable.html">Callable Object</a></span></dt> +<dt><span class="section"><a href="fusion/functional/concepts/reg_callable.html">Regular Callable + Object</a></span></dt> +<dt><span class="section"><a href="fusion/functional/concepts/def_callable.html">Deferred Callable + Object</a></span></dt> +<dt><span class="section"><a href="fusion/functional/concepts/poly.html">Polymorphic Function + Object</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/functional/invocation.html">Invocation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/functional/invocation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/functional/invocation/metafunctions.html">Metafunctions</a></span></dt> +<dt><span class="section"><a href="fusion/functional/invocation/limits.html">Limits</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/functional/adapters.html">Adapters</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/functional/adapters/fused.html">fused</a></span></dt> +<dt><span class="section"><a href="fusion/functional/adapters/fused_procedure.html">fused_procedure</a></span></dt> +<dt><span class="section"><a href="fusion/functional/adapters/fused_function_object.html">fused_function_object</a></span></dt> +<dt><span class="section"><a href="fusion/functional/adapters/unfused.html">unfused</a></span></dt> +<dt><span class="section"><a href="fusion/functional/adapters/unfused_typed.html">unfused_typed</a></span></dt> +<dt><span class="section"><a href="fusion/functional/adapters/limits.html">Limits</a></span></dt> +</dl></dd> +<dt><span class="section"><a href="fusion/functional/generation.html">Generation</a></span></dt> +<dd><dl> +<dt><span class="section"><a href="fusion/functional/generation/functions.html">Functions</a></span></dt> +<dt><span class="section"><a href="fusion/functional/generation/metafunctions.html">Metafunctions</a></span></dt> +</dl></dd> +</dl></dd> +<dt><span class="section"><a href="fusion/notes.html">Notes</a></span></dt> +<dt><span class="section"><a href="fusion/change_log.html">Change log</a></span></dt> +<dt><span class="section"><a href="fusion/acknowledgements.html">Acknowledgements</a></span></dt> +<dt><span class="section"><a href="fusion/references.html">References</a></span></dt> +</dl> +</div> +</div> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> +<td align="left"><p><small>Last revised: June 25, 2013 at 21:59:19 GMT</small></p></td> +<td align="right"><div class="copyright-footer"></div></td> +</tr></table> +<hr> +<div class="spirit-nav"><a accesskey="n" href="fusion/preface.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> +</body> +</html> diff --git a/libs/fusion/doc/html/quickbook_HTML.manifest b/libs/fusion/doc/html/quickbook_HTML.manifest new file mode 100644 index 000000000..0f882c24e --- /dev/null +++ b/libs/fusion/doc/html/quickbook_HTML.manifest @@ -0,0 +1,293 @@ +index.html +fusion/preface.html +fusion/introduction.html +fusion/quick_start.html +fusion/organization.html +fusion/support.html +fusion/support/is_sequence.html +fusion/support/is_view.html +fusion/support/tag_of.html +fusion/support/category_of.html +fusion/support/deduce.html +fusion/support/deduce_sequence.html +fusion/support/pair.html +fusion/iterator.html +fusion/iterator/concepts.html +fusion/iterator/concepts/forward_iterator.html +fusion/iterator/concepts/bidirectional_iterator.html +fusion/iterator/concepts/random_access_iterator.html +fusion/iterator/concepts/associative_iterator.html +fusion/iterator/functions.html +fusion/iterator/functions/deref.html +fusion/iterator/functions/next.html +fusion/iterator/functions/prior.html +fusion/iterator/functions/distance.html +fusion/iterator/functions/advance.html +fusion/iterator/functions/advance_c.html +fusion/iterator/functions/deref_data.html +fusion/iterator/operator.html +fusion/iterator/operator/operator_unary_star.html +fusion/iterator/operator/operator_equality.html +fusion/iterator/operator/operator_inequality.html +fusion/iterator/metafunctions.html +fusion/iterator/metafunctions/value_of.html +fusion/iterator/metafunctions/deref.html +fusion/iterator/metafunctions/next.html +fusion/iterator/metafunctions/prior.html +fusion/iterator/metafunctions/equal_to.html +fusion/iterator/metafunctions/distance.html +fusion/iterator/metafunctions/advance.html +fusion/iterator/metafunctions/advance_c.html +fusion/iterator/metafunctions/key_of.html +fusion/iterator/metafunctions/value_of_data.html +fusion/iterator/metafunctions/deref_data.html +fusion/sequence.html +fusion/sequence/concepts.html +fusion/sequence/concepts/forward_sequence.html +fusion/sequence/concepts/bidirectional_sequence.html +fusion/sequence/concepts/random_access_sequence.html +fusion/sequence/concepts/associative_sequence.html +fusion/sequence/intrinsic.html +fusion/sequence/intrinsic/functions.html +fusion/sequence/intrinsic/functions/begin.html +fusion/sequence/intrinsic/functions/end.html +fusion/sequence/intrinsic/functions/empty.html +fusion/sequence/intrinsic/functions/front.html +fusion/sequence/intrinsic/functions/back.html +fusion/sequence/intrinsic/functions/size.html +fusion/sequence/intrinsic/functions/at.html +fusion/sequence/intrinsic/functions/at_c.html +fusion/sequence/intrinsic/functions/has_key.html +fusion/sequence/intrinsic/functions/at_key.html +fusion/sequence/intrinsic/functions/swap.html +fusion/sequence/intrinsic/metafunctions.html +fusion/sequence/intrinsic/metafunctions/begin.html +fusion/sequence/intrinsic/metafunctions/end.html +fusion/sequence/intrinsic/metafunctions/empty.html +fusion/sequence/intrinsic/metafunctions/front.html +fusion/sequence/intrinsic/metafunctions/back.html +fusion/sequence/intrinsic/metafunctions/size.html +fusion/sequence/intrinsic/metafunctions/at.html +fusion/sequence/intrinsic/metafunctions/at_c.html +fusion/sequence/intrinsic/metafunctions/value_at.html +fusion/sequence/intrinsic/metafunctions/value_at_c.html +fusion/sequence/intrinsic/metafunctions/has_key.html +fusion/sequence/intrinsic/metafunctions/at_key.html +fusion/sequence/intrinsic/metafunctions/value_at_key.html +fusion/sequence/intrinsic/metafunctions/swap.html +fusion/sequence/operator.html +fusion/sequence/operator/i_o.html +fusion/sequence/operator/i_o/in.html +fusion/sequence/operator/i_o/out.html +fusion/sequence/operator/comparison.html +fusion/sequence/operator/comparison/equal.html +fusion/sequence/operator/comparison/not_equal.html +fusion/sequence/operator/comparison/less_than.html +fusion/sequence/operator/comparison/less_than_equal.html +fusion/sequence/operator/comparison/greater_than.html +fusion/sequence/operator/comparison/greater_than_equal.html +fusion/container.html +fusion/container/vector.html +fusion/container/cons.html +fusion/container/list.html +fusion/container/deque.html +fusion/container/front_extended_deque.html +fusion/container/back_extended_deque.html +fusion/container/set.html +fusion/container/map.html +fusion/container/generation.html +fusion/container/generation/functions.html +fusion/container/generation/functions/make_list.html +fusion/container/generation/functions/make_cons.html +fusion/container/generation/functions/make_vector.html +fusion/container/generation/functions/make_deque.html +fusion/container/generation/functions/make_set.html +fusion/container/generation/functions/make_map.html +fusion/container/generation/functions/tiers.html +fusion/container/generation/functions/list_tie.html +fusion/container/generation/functions/vector_tie.html +fusion/container/generation/functions/map_tie.html +fusion/container/generation/functions/deque_tie.html +fusion/container/generation/metafunctions.html +fusion/container/generation/metafunctions/make_list.html +fusion/container/generation/metafunctions/make_cons.html +fusion/container/generation/metafunctions/make_vector.html +fusion/container/generation/metafunctions/make_deque.html +fusion/container/generation/metafunctions/make_set.html +fusion/container/generation/metafunctions/make_map.html +fusion/container/generation/metafunctions/list_tie.html +fusion/container/generation/metafunctions/vector_tie.html +fusion/container/generation/metafunctions/deque_tie.html +fusion/container/generation/metafunctions/map_tie.html +fusion/container/conversion.html +fusion/container/conversion/functions.html +fusion/container/conversion/functions/as_list.html +fusion/container/conversion/functions/as_vector.html +fusion/container/conversion/functions/as_deque.html +fusion/container/conversion/functions/as_set.html +fusion/container/conversion/functions/as_map.html +fusion/container/conversion/metafunctions.html +fusion/container/conversion/metafunctions/as_list.html +fusion/container/conversion/metafunctions/as_vector.html +fusion/container/conversion/metafunctions/as_deque.html +fusion/container/conversion/metafunctions/as_set.html +fusion/container/conversion/metafunctions/as_map.html +fusion/view.html +fusion/view/single_view.html +fusion/view/filter_view.html +fusion/view/iterator_range.html +fusion/view/joint_view.html +fusion/view/zip_view.html +fusion/view/transform_view.html +fusion/view/reverse_view.html +fusion/view/nview.html +fusion/view/repetitive_view.html +fusion/adapted.html +fusion/adapted/array.html +fusion/adapted/std__pair.html +fusion/adapted/mpl_sequence.html +fusion/adapted/boost__array.html +fusion/adapted/boost__tuple.html +fusion/adapted/adapt_struct.html +fusion/adapted/adapt_tpl_struct.html +fusion/adapted/adapt_struct_named.html +fusion/adapted/adapt_assoc.html +fusion/adapted/adapt_assoc_tpl_struct.html +fusion/adapted/adapt_assoc_struct_named.html +fusion/adapted/adapt_adt.html +fusion/adapted/adapt_tpl_adt.html +fusion/adapted/adapt_assoc_adt.html +fusion/adapted/adapt_assoc_tpl_adt.html +fusion/adapted/define_struct.html +fusion/adapted/define_tpl_struct.html +fusion/adapted/define_struct_inline.html +fusion/adapted/define_tpl_struct_inline.html +fusion/adapted/define_assoc_struct.html +fusion/adapted/define_assoc_tpl_struct.html +fusion/algorithm.html +fusion/algorithm/auxiliary.html +fusion/algorithm/auxiliary/functions.html +fusion/algorithm/auxiliary/functions/copy.html +fusion/algorithm/iteration.html +fusion/algorithm/iteration/functions.html +fusion/algorithm/iteration/functions/fold.html +fusion/algorithm/iteration/functions/reverse_fold.html +fusion/algorithm/iteration/functions/iter_fold.html +fusion/algorithm/iteration/functions/reverse_iter_fold.html +fusion/algorithm/iteration/functions/accumulate.html +fusion/algorithm/iteration/functions/for_each.html +fusion/algorithm/iteration/metafunctions.html +fusion/algorithm/iteration/metafunctions/fold.html +fusion/algorithm/iteration/metafunctions/reverse_fold.html +fusion/algorithm/iteration/metafunctions/iter_fold.html +fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html +fusion/algorithm/iteration/metafunctions/accumulate.html +fusion/algorithm/iteration/metafunctions/for_each.html +fusion/algorithm/query.html +fusion/algorithm/query/functions.html +fusion/algorithm/query/functions/any.html +fusion/algorithm/query/functions/all.html +fusion/algorithm/query/functions/none.html +fusion/algorithm/query/functions/find.html +fusion/algorithm/query/functions/find_if.html +fusion/algorithm/query/functions/count.html +fusion/algorithm/query/functions/count_if.html +fusion/algorithm/query/metafunctions.html +fusion/algorithm/query/metafunctions/any.html +fusion/algorithm/query/metafunctions/all.html +fusion/algorithm/query/metafunctions/none.html +fusion/algorithm/query/metafunctions/find.html +fusion/algorithm/query/metafunctions/find_if.html +fusion/algorithm/query/metafunctions/count.html +fusion/algorithm/query/metafunctions/count_if.html +fusion/algorithm/transformation.html +fusion/algorithm/transformation/functions.html +fusion/algorithm/transformation/functions/filter.html +fusion/algorithm/transformation/functions/filter_if.html +fusion/algorithm/transformation/functions/transform.html +fusion/algorithm/transformation/functions/replace.html +fusion/algorithm/transformation/functions/replace_if.html +fusion/algorithm/transformation/functions/remove.html +fusion/algorithm/transformation/functions/remove_if.html +fusion/algorithm/transformation/functions/reverse.html +fusion/algorithm/transformation/functions/clear.html +fusion/algorithm/transformation/functions/erase.html +fusion/algorithm/transformation/functions/erase_key.html +fusion/algorithm/transformation/functions/insert.html +fusion/algorithm/transformation/functions/insert_range.html +fusion/algorithm/transformation/functions/join.html +fusion/algorithm/transformation/functions/zip.html +fusion/algorithm/transformation/functions/pop_back.html +fusion/algorithm/transformation/functions/pop_front.html +fusion/algorithm/transformation/functions/push_back.html +fusion/algorithm/transformation/functions/push_front.html +fusion/algorithm/transformation/metafunctions.html +fusion/algorithm/transformation/metafunctions/filter.html +fusion/algorithm/transformation/metafunctions/filter_if.html +fusion/algorithm/transformation/metafunctions/transform.html +fusion/algorithm/transformation/metafunctions/replace.html +fusion/algorithm/transformation/metafunctions/replace_if.html +fusion/algorithm/transformation/metafunctions/remove.html +fusion/algorithm/transformation/metafunctions/remove_if.html +fusion/algorithm/transformation/metafunctions/reverse.html +fusion/algorithm/transformation/metafunctions/clear.html +fusion/algorithm/transformation/metafunctions/erase.html +fusion/algorithm/transformation/metafunctions/erase_key.html +fusion/algorithm/transformation/metafunctions/insert.html +fusion/algorithm/transformation/metafunctions/insert_range.html +fusion/algorithm/transformation/metafunctions/join.html +fusion/algorithm/transformation/metafunctions/zip.html +fusion/algorithm/transformation/metafunctions/pop_back.html +fusion/algorithm/transformation/metafunctions/pop_front.html +fusion/algorithm/transformation/metafunctions/push_back.html +fusion/algorithm/transformation/metafunctions/push_front.html +fusion/tuple.html +fusion/tuple/class_template_tuple.html +fusion/tuple/class_template_tuple/construction.html +fusion/tuple/class_template_tuple/tuple_creation_functions.html +fusion/tuple/class_template_tuple/tuple_helper_classes.html +fusion/tuple/class_template_tuple/element_access.html +fusion/tuple/class_template_tuple/relational_operators.html +fusion/tuple/pairs.html +fusion/extension.html +fusion/extension/ext_full.html +fusion/extension/sequence_facade.html +fusion/extension/iterator_facade.html +fusion/functional.html +fusion/functional/concepts.html +fusion/functional/concepts/callable.html +fusion/functional/concepts/reg_callable.html +fusion/functional/concepts/def_callable.html +fusion/functional/concepts/poly.html +fusion/functional/invocation.html +fusion/functional/invocation/functions.html +fusion/functional/invocation/functions/invoke.html +fusion/functional/invocation/functions/invoke_proc.html +fusion/functional/invocation/functions/invoke_fobj.html +fusion/functional/invocation/metafunctions.html +fusion/functional/invocation/metafunctions/invoke.html +fusion/functional/invocation/metafunctions/invoke_proc.html +fusion/functional/invocation/metafunctions/invoke_fobj.html +fusion/functional/invocation/limits.html +fusion/functional/adapters.html +fusion/functional/adapters/fused.html +fusion/functional/adapters/fused_procedure.html +fusion/functional/adapters/fused_function_object.html +fusion/functional/adapters/unfused.html +fusion/functional/adapters/unfused_typed.html +fusion/functional/adapters/limits.html +fusion/functional/generation.html +fusion/functional/generation/functions.html +fusion/functional/generation/functions/mk_fused.html +fusion/functional/generation/functions/mk_fused_proc.html +fusion/functional/generation/functions/mk_fused_fobj.html +fusion/functional/generation/functions/mk_unfused.html +fusion/functional/generation/metafunctions.html +fusion/functional/generation/metafunctions/mk_fused.html +fusion/functional/generation/metafunctions/mk_fused_proc.html +fusion/functional/generation/metafunctions/mk_fused_fobj.html +fusion/functional/generation/metafunctions/mk_unfused.html +fusion/notes.html +fusion/change_log.html +fusion/acknowledgements.html +fusion/references.html diff --git a/libs/fusion/doc/introduction.qbk b/libs/fusion/doc/introduction.qbk new file mode 100644 index 000000000..f8979bfc0 --- /dev/null +++ b/libs/fusion/doc/introduction.qbk @@ -0,0 +1,91 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Introduction] + +An advantage other languages such as Python and Lisp/ Scheme, ML and +Haskell, etc., over C++ is the ability to have heterogeneous containers +that can hold arbitrary element types. All the containers in the standard +library can only hold a specific type. A `vector<int>` can only hold +`int`s. A `list<X>` can only hold elements of type `X`, and so on. + +True, you can use inheritance to make the containers hold different types, +related through subclassing. However, you have to hold the objects through +a pointer or smart reference of some sort. Doing this, you'll have to rely +on virtual functions to provide polymorphic behavior since the actual type +is erased as soon as you store a pointer to a derived class to a pointer to +its base. The held objects must be related: you cannot hold objects of +unrelated types such as `char`, `int`, `class X`, `float`, etc. Oh sure you +can use something like __boost_any__ to hold arbitrary types, but then you +pay more in terms of runtime costs and due to the fact that you practically +erased all type information, you'll have to perform dangerous casts to get +back the original type. + +The __tuple__ library written by __jaakko_jarvi__ provides heterogeneous +containers in C++. The `tuple` is a basic data structure that can hold +heterogeneous types. It's a good first step, but it's not complete. What's +missing are the algorithms. It's nice that we can store and retrieve data +to and from tuples, pass them around as arguments and return types. As it +is, the __tuple__ facility is already very useful. Yet, as soon as you use +it more often, usage patterns emerge. Eventually, you collect these +patterns into algorithm libraries. + +Hmmm, kinda reminds us of STL right? Right! Can you imagine how it would be +like if you used STL without the algorithms? Everyone will have to reinvent +their own /algorithm/ wheels. + +Fusion is a library and a framework similar to both __stl__ and the boost +__mpl__. The structure is modeled after __mpl__, which is modeled +after __stl__. It is named "fusion" because the library is reminiscent of +the "fusion" of compile time meta-programming with runtime programming. The +library inherently has some interesting flavors and characteristics of both +__mpl__ and __stl__. It lives in the twilight zone between compile time +meta-programming and run time programming. __stl__ containers work on +values. MPL containers work on types. Fusion containers work on both types +and values. + +Unlike __mpl__, Fusion algorithms are lazy and non sequence-type +preserving. What does that mean? It means that when you operate on a +sequence through a Fusion algorithm that returns a sequence, the sequence +returned may not be of the same class as the original. This is by design. +Runtime efficiency is given a high priority. Like __mpl__, and unlike +__stl__, fusion algorithms are functional in nature such that algorithms +are non mutating (no side effects). However, due to the high cost of +returning full sequences such as vectors and lists, /Views/ are returned +from Fusion algorithms instead. For example, the __transform__ algorithm +does not actually return a transformed version of the original sequence. +__transform__ returns a __transform_view__. This view holds a reference to +the original sequence plus the transform function. Iteration over the +__transform_view__ will apply the transform function over the sequence +elements on demand. This /lazy/ evaluation scheme allows us to chain as +many algorithms as we want without incurring a high runtime penalty. + +The /lazy/ evaluation scheme where algorithms return views allows +operations such as __push_back__ to be totally generic. In Fusion, +__push_back__ is actually a generic algorithm that works on all sequences. +Given an input sequence `s` and a value `x`, Fusion's __push_back__ +algorithm simply returns a __joint_view__: a view that holds a reference to +the original sequence `s` and the value `x`. Functions that were once +sequence specific and need to be implemented N times over N different +sequences are now implemented only once. + +Fusion provides full round compatibility with __mpl__. Fusion sequences are +fully conforming __mpl__ sequences and __mpl__ sequences are fully compatible +with Fusion. You can work with Fusion sequences on __mpl__ if you wish to work +solely on types [footnote Choose __mpl__ over fusion when doing pure type +calculations. Once the static type calculation is finished, you can instantiate +a fusion sequence (see __conversion__) for the runtime part.]. In __mpl__, +Fusion sequences follow __mpl__'s sequence-type preserving semantics (i.e. +algorithms preserve the original sequence type. e.g. transforming a vector +returns a vector). You can also convert from an __mpl__ sequence to a Fusion +sequence. For example, there are times when it is convenient to work solely on +__mpl__ using pure __mpl__ sequences, then, convert them to Fusion sequences as +a final step before actual instantiation of real runtime objects with data. You +have the best of both worlds. + +[endsect] diff --git a/libs/fusion/doc/iterator.qbk b/libs/fusion/doc/iterator.qbk new file mode 100644 index 000000000..ff768f92a --- /dev/null +++ b/libs/fusion/doc/iterator.qbk @@ -0,0 +1,1081 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Iterator] + +Like __mpl__ and __stl__, iterators are a fundamental concept in Fusion. +As with __mpl__ and __stl__ iterators describe positions, and +provide access to data within an underlying __sequence__. + +[heading Header] + #include <boost/fusion/iterator.hpp> + #include <boost/fusion/include/iterator.hpp> + +[section Concepts] + +Fusion iterators are divided into different traversal categories. +__forward_iterator__ is the most basic concept. __bidirectional_iterator__ +is a refinement of __forward_iterator__. __random_access_iterator__ is a +refinement of __bidirectional_iterator__. __associative_iterator__ is a +refinement of __forward_iterator__, __bidirectional_iterator__ or +__random_access_iterator__. + +[section Forward Iterator] + +[heading Description] +A Forward Iterator traverses a __sequence__ allowing movement in only one direction through +it's elements, one element at a time. + +[variablelist Notation + [[`i`, `j`] [Forward Iterators]] + [[`I`, `J`] [Forward Iterator types]] + [[`M`] [An __mpl__ integral constant]] + [[`N`] [An integral constant]] +] + +[heading Expression requirements] +A type models Forward Iterator if, in addition to being CopyConstructable, +the following expressions are valid: + +[table + [[Expression] [Return type] [Runtime Complexity]] + [[`__next__(i)`] [__forward_iterator__] [Constant]] + [[`i == j`] [Convertible to bool] [Constant]] + [[`i != j`] [Convertible to bool] [Constant]] + [[`__advance_c__<N>(i)`] [__forward_iterator__] [Constant]] + [[`__advance__<M>(i)`] [__forward_iterator__] [Constant]] + [[`__distance__(i, j)`] [`__result_of_distance__<I, J>::type`][Constant]] + [[`__deref__(i)`] [`__result_of_deref__<I>::type`] [Constant]] + [[`*i`] [`__result_of_deref__<I>::type`] [Constant]] +] + +[heading Meta Expressions] +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_next__<I>::type`] [Amortized constant time]] + [[`__result_of_equal_to__<I, J>::type`] [Amortized constant time]] + [[`__result_of_advance_c__<I, N>::type`] [Linear]] + [[`__result_of_advance__<I ,M>::type`] [Linear]] + [[`__result_of_distance__<I ,J>::type`] [Linear]] + [[`__result_of_deref__<I>::type`] [Amortized constant time]] + [[`__result_of_value_of__<I>::type`] [Amortized constant time]] +] + +[heading Expression Semantics] +[ +table + [[Expression] [Semantics]] + [[`__next__(i)`] [An iterator to the element following `i`]] + [[`i == j`] [Iterator equality comparison]] + [[`i != j`] [Iterator inequality comparison]] + [[`__advance_c__<N>(i)`] [An iterator n elements after `i` in the sequence]] + [[`__advance__<M>(i)`] [Equivalent to `advance_c<M::value>(i)`]] + [[`__distance__(i, j)`] [The number of elements between `i` and `j`]] + [[`__deref__(i)`] [The element at position`i`]] + [[`*i`] [Equivalent to `deref(i)`]] +] + +[heading Invariants] +The following invariants always hold: + +* `!(i == j) == (i != j)` +* `__next__(i) == __advance_c__<1>(i)` +* `__distance__(i, __advance_c__<N>(i)) == N` +* Using `__next__` to traverse the sequence will never return to a previously seen position +* `__deref__(i)` is equivalent to `*i` +* If `i == j` then `*i` is equivalent to `*j` + +[heading Models] +* __std_pair__ iterator +* __boost_array__ iterator +* __vector__ iterator +* __cons__ iterator +* __list__ iterator +* __set__ iterator +* __map__ iterator +* __single_view__ iterator +* __filter_view__ iterator +* __iterator_range__ iterator +* __joint_view__ iterator +* __transform_view__ iterator +* __reverse_view__ iterator + +[endsect] + +[section Bidirectional Iterator] +[heading Description] +A Bidirectional Iterator traverses a __sequence__ allowing movement in either direction one +element at a time. + +[variablelist Notation + [[`i`] [A Bidirectional Iterator]] + [[`I`] [A Bidirectional Iterator type]] + [[`M`] [An __mpl__ integral constant]] + [[`N`] [An integral constant]] +] + +[heading Refinement of] +__forward_iterator__ + +[heading Expression requirements] +In addition to the requirements defined in __forward_iterator__, +the following expressions must be valid: + +[table + [[Expression] [Return type] [Runtime Complexity]] + [[`__next__(i)`] [__bidirectional_iterator__] [Constant]] + [[`__prior__(i)`] [__bidirectional_iterator__] [Constant]] + [[`__advance_c__<N>(i)`] [__bidirectional_iterator__] [Constant]] + [[`__advance__<M>(i)`] [__bidirectional_iterator__] [Constant]] +] + +[heading Meta Expressions] +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_prior__<I>::type`] [Amortized constant time]] +] + +[heading Expression Semantics] +The semantics of an expression are defined only where they differ from, or are not defined +in __forward_iterator__ + +[table + [[Expression] [Semantics]] + [[`__prior__(i)`] [An iterator to the element preceding `i`]] +] + +[heading Invariants] +In addition to the invariants of __forward_iterator__, +the following invariants always hold: + +* `__prior__(__next__(i)) == i && __prior__(__next__(i)) == __next__(__prior__(i))` +* `__prior__(i) == __advance_c__<-1>(i)` +* Using `__prior__` to traverse a sequence will never return a previously seen position + +[heading Models] +* __std_pair__ iterator +* __boost_array__ iterator +* __vector__ iterator +* __single_view__ iterator +* __iterator_range__ (where adapted sequence is a __bidirectional_sequence__) +* __transform_view__ (where adapted sequence is a __bidirectional_sequence__) +* __reverse_view__ + +[endsect] + +[section Random Access Iterator] +[heading Description] +A Random Access Iterator traverses a __sequence__ moving in either direction, +permitting efficient arbitrary distance movements back and forward through the +sequence. + +[variablelist Notation + [[`i`, `j`] [Random Access Iterators]] + [[`I`, `J`] [Random Access Iterator types]] + [[`M`] [An __mpl__ integral constant]] + [[`N`] [An integral constant]] +] + +[heading Refinement of] +__bidirectional_iterator__ + +[heading Expression requirements] +In addition to the requirements defined in __bidirectional_iterator__, +the following expressions must be valid: + +[table + [[Expression] [Return type] [Runtime Complexity]] + [[`__next__(i)`] [__random_access_iterator__] [Constant]] + [[`__prior__(i)`] [__random_access_iterator__] [Constant]] + [[`__advance_c__<N>(i)`] [__random_access_iterator__] [Constant]] + [[`__advance__<M>(i)`] [__random_access_iterator__] [Constant]] +] + +[heading Meta Expressions] +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_advance_c__<I, N>::type`] [Amortized constant time]] + [[`__result_of_advance__<I, M>::type`] [Amortized constant time]] + [[`__result_of_distance__<I ,J>::type`] [Amortized constant time]] +] + +[heading Models] +* __vector__ iterator +* __std_pair__ iterator +* __boost_array__ iterator +* __single_view__ iterator +* __iterator_range__ iterator (where adapted sequence is a __random_access_sequence__) +* __transform_view__ iterator (where adapted sequence is a __random_access_sequence__) +* __reverse_view__ iterator (where adapted sequence is a __random_access_sequence__) + +[endsect] + +[section Associative Iterator] +[heading Description] +An Associative Iterator provides additional semantics to obtain the properties +of the element of an associative forward, bidirectional or random access sequence. + +[variablelist Notation + [[`i`] [Associative Iterator]] + [[`I`] [Associative Iterator type]] +] + +[heading Refinement of] +__forward_iterator__, __bidirectional_iterator__ or __random_access_iterator__ + +[heading Expression requirements] +In addition to the requirements defined in __forward_iterator__, +__bidirectional_iterator__ or __random_access_iterator__ the following +expressions must be valid: + +[table + [[Expression] [Return type] [Runtime Complexity]] + [[`__deref_data__(i)`][`__result_of_deref_data__<I>::type`][Constant]] +] + +[heading Meta Expressions] +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_key_of__<I>::type`][Amortized constant time]] + [[`__result_of_value_of_data__<I>::type`][Amortized constant time]] + [[`__result_of_deref_data__<I>::type`][Amortized constant time]] +] + +[heading Models] +* __map__ iterator +* __set__ iterator +* __filter_view__ iterator (where adapted sequence is an __associative_sequence__ and a __forward_sequence__) +* __iterator_range__ iterator (where adapted iterators are __associative_iterator__\ s) +* __joint_view__ iterator (where adapted sequences are __associative_sequence__\ s and __forward_sequence__\ s) +* __reverse_view__ iterator (where adapted sequence is an __associative_sequence__ and a __bidirectional_sequence__) + +[endsect] + +[endsect] + +[section Functions] +Fusion provides functions for manipulating iterators, analogous to the similar functions +from the __mpl__ library. + +[section deref] + +[heading Description] +Deferences an iterator. + +[heading Synopsis] + template< + typename I + > + typename __result_of_deref__<I>::type deref(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __deref__(i); + +[*Return type]: `__result_of_deref__<I>::type` + +[*Semantics]: Dereferences the iterator `i`. + +[heading Header] + #include <boost/fusion/iterator/deref.hpp> + #include <boost/fusion/include/deref.hpp> + +[heading Example] + typedef __vector__<int,int&> vec; + + int i(0); + vec v(1,i); + assert(__deref__(__begin__(v)) == 1); + assert(__deref__(__next__(__begin__(v))) == 0); + assert(&(__deref__(__next__(__begin__(v)))) == &i); + +[endsect] + +[section next] + +[heading Description] +Moves an iterator 1 position forwards. + +[heading Synopsis] + template< + typename I + > + typename __result_of_next__<I>::type next(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + next(i); + +[*Return type]: A model of the same iterator concept as `i`. + +[*Semantics]: Returns an iterator to the next element after `i`. + +[heading Header] + #include <boost/fusion/iterator/next.hpp> + #include <boost/fusion/include/next.hpp> + +[heading Example] + typedef __vector__<int,int,int> vec; + + vec v(1,2,3); + assert(__deref__(__begin__(v)) == 1); + assert(__deref__(__next__(__begin__(v))) == 2); + assert(__deref__(__next__(__next__(__begin__(v)))) == 3); + +[endsect] + +[section prior] + +[heading Description] +Moves an iterator 1 position backwards. + +[heading Synopsis] + template< + typename I + > + typename __result_of_prior__<I>::type prior(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __bidirectional_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __prior__(i); + +[*Return type]: A model of the same iterator concept as `i`. + +[*Semantics]: Returns an iterator to the element prior to `i`. + +[heading Header] + #include <boost/fusion/iterator/prior.hpp> + #include <boost/fusion/include/prior.hpp> + +[heading Example] + typedef __vector__<int,int> vec; + + vec v(1,2); + assert(__deref__(__next__(__begin__(v))) == 2); + assert(__deref__(__prior__(__next__(__begin__(v)))) == 1); + +[endsect] + +[section distance] + +[heading Description] +Returns the distance between 2 iterators. + +[heading Synopsis] + template< + typename I, + typename J + > + typename __result_of_distance__<I, J>::type distance(I const& i, J const& j); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`, `j`] [Models of __forward_iterator__ into the same sequence] [The start and end points of the distance to be measured]] +] + +[heading Expression Semantics] + __distance__(i,j); + +[*Return type]: `int` + +[*Semantics]: Returns the distance between iterators `i` and `j`. + +[heading Header] + #include <boost/fusion/iterator/distance.hpp> + #include <boost/fusion/include/distance.hpp> + +[heading Example] + typedef __vector__<int,int,int> vec; + + vec v(1,2,3); + assert(__distance__(__begin__(v), __next__(__next__(__begin__(v)))) == 2); + +[endsect] + +[section advance] + +[heading Description] +Moves an iterator by a specified distance. + +[heading Synopsis] + template< + typename I, + typename M + > + typename __result_of_advance__<I, M>::type advance(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __forward_iterator__] [Iterator to move relative to]] + [[`N`] [An __mpl_integral_constant__] [Number of positions to move]] +] + +[heading Expression Semantics] + __advance__<M>(i); + +[*Return type]: A model of the same iterator concept as `i`. + +[*Semantics]: Returns an iterator to the element `M` positions from `i`. If `i` is a __bidirectional_iterator__ then `M` may be negative. + +[heading Header] + #include <boost/fusion/iterator/advance.hpp> + #include <boost/fusion/include/advance.hpp> + +[heading Example] + typedef __vector__<int,int,int> vec; + + vec v(1,2,3); + assert(__deref__(__advance__<mpl::int_<2> >(__begin__(v))) == 3); + +[endsect] + +[section advance_c] + +[heading Description] +Moves an iterator by a specified distance. + +[heading Synopsis] + template< + typename I, + int N + > + typename __result_of_advance_c__<I, N>::type advance_c(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __forward_iterator__] [Iterator to move relative to]] + [[`N`] [Integer constant] [Number of positions to move]] +] + +[heading Expression Semantics] + __advance_c__<N>(i); + +[*Return type]: A model of the same iterator concept as `i`. + +[*Semantics]: Returns an iterator to the element `N` positions from `i`. If `i` is a __bidirectional_iterator__ then `N` may be negative. + +[heading Header] + #include <boost/fusion/iterator/advance.hpp> + #include <boost/fusion/include/advance.hpp> + +[heading Example] + typedef __vector__<int,int,int> vec; + + vec v(1,2,3); + assert(__deref__(__advance_c__<2>(__begin__(v))) == 3); + +[endsect] + +[section deref_data] + +[heading Description] +Deferences the data property associated with the element referenced by an associative iterator. + +[heading Synopsis] + template< + typename I + > + typename __result_of_deref_data__<I>::type deref(I const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __associative_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __deref_data__(i); + +[*Return type]: `__result_of_deref_data__<I>::type` + +[*Semantics]: Dereferences the data property associated with the element referenced by an associative iterator `i`. + +[heading Header] + #include <boost/fusion/iterator/deref_data.hpp> + #include <boost/fusion/include/deref_data.hpp> + +[heading Example] + typedef __map__<__pair__<float,int&> > map; + + int i(0); + map m(1.0f,i); + assert(__deref_data__(__begin__(m)) == 0); + assert(&(__deref_data__(__begin__(m))) == &i); + +[endsect] + +[endsect] + +[section Operator] + +Overloaded operators are provided to provide a more natural syntax for dereferencing iterators, and comparing them for equality. + +[section:operator_unary_star Operator *] + +[heading Description] +Dereferences an iterator. + +[heading Synopsis] + template< + typename I + > + typename __result_of_deref__<I>::type operator*(__unspecified__<I> const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + *i + +[*Return type]: Equivalent to the return type of `__deref__(i)`. + +[*Semantics]: Equivalent to `__deref__(i)`. + +[heading Header] + #include <boost/fusion/iterator/deref.hpp> + #include <boost/fusion/include/deref.hpp> + +[heading Example] + typedef __vector__<int,int&> vec; + + int i(0); + vec v(1,i); + assert(*__begin__(v) == 1); + assert(*__next__(__begin__(v)) == 0); + assert(&(*__next__(__begin__(v))) == &i); + +[endsect] + +[section:operator_equality Operator ==] + +[heading Description] +Compares 2 iterators for equality. + +[heading Synopsis] + template< + typename I, + typename J + > + __unspecified__ operator==(I const& i, J const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`, `j`] [Any fusion iterators] [Operation's arguments]] +] + +[heading Expression Semantics] + i == j + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Equivalent to `__result_of_equal_to__<I,J>::value` where `I` and `J` are the types of `i` and `j` respectively. + +[heading Header] + #include <boost/fusion/iterator/equal_to.hpp> + #include <boost/fusion/include/equal_to.hpp> + +[endsect] + +[section:operator_inequality Operator !=] + +[heading Description] +Compares 2 iterators for inequality. + +[heading Synopsis] + template< + typename I, + typename J + > + __unspecified__ operator==(I const& i, J const& i); + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`i`, `j`] [Any fusion iterators] [Operation's arguments]] +] + +[heading Expression Semantics] + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Equivalent to `!__result_of_equal_to__<I,J>::value` where `I` and `J` are the types of `i` and `j` respectively. + +[heading Header] + #include <boost/fusion/iterator/equal_to.hpp> + #include <boost/fusion/include/equal_to.hpp> + +[endsect] + +[endsect] + +[section Metafunctions] + +[section value_of] + +[heading Description] + +Returns the type stored at the position of an iterator. + +[heading Synopsis] + template< + typename I + > + struct value_of + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_value_of__<I>::type + +[*Return type]: Any type + +[*Semantics]: Returns the type stored in a sequence at iterator position `I`. + +[heading Header] + #include <boost/fusion/iterator/value_of.hpp> + #include <boost/fusion/include/value_of.hpp> + +[heading Example] + typedef __vector__<int,int&,const int&> vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_next__<first>::type second; + typedef __result_of_next__<second>::type third; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<first>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, int&>)); + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<third>::type, const int&>)); + +[endsect] + +[section deref] + +[heading Description] +Returns the type that will be returned by dereferencing an iterator. + +[heading Synposis] + template< + typename I + > + struct deref + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_deref__<I>::type + +[*Return type]: Any type + +[*Semantics]: Returns the result of dereferencing an iterator of type `I`. + +[heading Header] + #include <boost/fusion/iterator/deref.hpp> + #include <boost/fusion/include/deref.hpp> + +[heading Example] + typedef __vector__<int,int&> vec; + typedef const vec const_vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_next__<first>::type second; + + typedef __result_of_begin__<const_vec>::type const_first; + typedef __result_of_next__<const_first>::type const_second; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<first>::type, int&>)); + BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<second>::type, int&>)); + +[endsect] + +[section next] + +[heading Description] +Returns the type of the next iterator in a sequence. + +[heading Synposis] + template< + typename I + > + struct next + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __forward_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_next__<I>::type + +[*Return type]: A model of the same iterator concept as `I`. + +[*Semantics]: Returns an iterator to the next element in the sequence after `I`. + +[heading Header] + #include <boost/fusion/iterator/next.hpp> + #include <boost/fusion/include/next.hpp> + +[heading Example] + typedef __vector__<int,double> vec; + typedef __result_of_next__<__result_of_begin__<vec>::type>::type second; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, double>)); + +[endsect] + +[section prior] + +[heading Description] +Returns the type of the previous iterator in a sequence. + +[heading Synopsis] + template< + typename I + > + struct prior + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __bidirectional_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_prior__<I>::type + +[*Return type]: A model of the same iterator concept as `I`. + +[*Semantics]: Returns an iterator to the previous element in the sequence before `I`. + +[heading Header] + #include <boost/fusion/iterator/prior.hpp> + #include <boost/fusion/include/prior.hpp> + +[heading Example] + typedef __vector__<int,double> vec; + typedef __result_of_next__<__result_of_begin__<vec>::type>::type second; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, double>)); + + typedef __result_of_prior__<second>::type first; + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<first>::type, int>)); + +[endsect] + +[section equal_to] + +[heading Description] +Returns a true-valued __mpl_integral_constant__ if `I` and `J` are equal. + +[heading Synopsis] + template< + typename I, + typename J + > + struct equal_to + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`, `J`] [Any fusion iterators] [Operation's arguments]] +] + +[heading Expression Semantics] + __result_of_equal_to__<I, J>::type + +[*Return type]: A model of __mpl_integral_constant__. + +[*Semantics]: Returns `boost::mpl::true_` if `I` and `J` are iterators to the same position. Returns `boost::mpl::false_` otherwise. + +[heading Header] + #include <boost/fusion/iterator/equal_to.hpp> + #include <boost/fusion/include/equal_to.hpp> + +[heading Example] + typedef __vector__<int,double> vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_end__<vec>::type last; + BOOST_MPL_ASSERT((__result_of_equal_to__<first, first>)); + BOOST_MPL_ASSERT_NOT((__result_of_equal_to__<first,last>)); + +[endsect] + +[section distance] + +[heading Description] +Returns the distance between two iterators. + +[heading Synopsis] + template< + typename I, + typename J + > + struct distance + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`, `J`] [Models of __forward_iterator__ into the same sequence] [The start and end points of the distance to be measured]] +] + +[heading Expression Semantics] + __result_of_distance__<I, J>::type + +[*Return type]: A model of __mpl_integral_constant__. + +[*Semantics]: Returns the distance between iterators of types `I` and `J`. + +[heading Header] + #include <boost/fusion/iterator/distance.hpp> + #include <boost/fusion/include/distance.hpp> + +[heading Example] + typedef __vector__<int,double,char> vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_next__<first>::type second; + typedef __result_of_next__<second>::type third; + typedef __result_of_distance__<first,third>::type dist; + + BOOST_MPL_ASSERT_RELATION(dist::value, ==, 2); + +[endsect] + +[section advance] + +[heading Description] +Moves an iterator a specified distance. + +[heading Synopsis] + template< + typename I, + typename M + > + struct advance + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __forward_iterator__] [Iterator to move relative to]] + [[`M`] [Model of __mpl_integral_constant__] [Number of positions to move]] +] + +[heading Expression Semantics] + __result_of_advance__<I,M>::type + +[*Return type]: A model of the same iterator concept as `I`. + +[*Semantics]: Returns an iterator a distance `M` from `I`. If `I` is a __bidirectional_iterator__ then `M` may be negative. + +[heading Header] + #include <boost/fusion/iterator/advance.hpp> + #include <boost/fusion/include/advance.hpp> + +[heading Example] + typedef __vector__<int,double,char> vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_next__<first>::type second; + typedef __result_of_next__<second>::type third; + + BOOST_MPL_ASSERT((__result_of_equal_to__<__result_of_advance__<first, boost::mpl::int_<2> >::type, third>)); + +[endsect] + +[section advance_c] + +[heading Description] +Moves an iterator by a specified distance. + +[heading Synopsis] + template< + typename I, + int N + > + struct advance_c + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __forward_iterator__] [Iterator to move relative to]] + [[`N`] [Integer constant] [Number of positions to move]] +] + +[heading Expression Semantics] + __result_of_advance_c__<I, N>::type + +[*Return type]: A model of the same iterator concept as `I`. + +[*Semantics]: Returns an iterator a distance `N` from `I`. If `I` is a __bidirectional_iterator__ then `N` may be negative. Equivalent to `__result_of_advance__<I, boost::mpl::int_<N> >::type`. + +[heading Header] + #include <boost/fusion/iterator/advance.hpp> + #include <boost/fusion/include/advance.hpp> + +[heading Example] + typedef __vector__<int,double,char> vec; + typedef __result_of_begin__<vec>::type first; + typedef __result_of_next__<first>::type second; + typedef __result_of_next__<second>::type third; + + BOOST_MPL_ASSERT((__result_of_equal_to__<__result_of_advance_c__<first, 2>::type, third>)); + +[endsect] + +[section key_of] + +[heading Description] + +Returns the key type associated with the element referenced by an associative iterator. + +[heading Synopsis] + template< + typename I + > + struct key_of + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __associative_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_key_of__<I>::type + +[*Return type]: Any type + +[*Semantics]: Returns the key type associated with the element referenced by an associative iterator `I`. + +[heading Header] + #include <boost/fusion/iterator/key_of.hpp> + #include <boost/fusion/include/key_of.hpp> + +[heading Example] + typedef __map__<__pair__<float,int> > vec; + typedef __result_of_begin__<vec>::type first; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_key_of__<first>::type, float>)); + +[endsect] + +[section value_of_data] + +[heading Description] + +Returns the type of the data property associated with the element referenced by an associative iterator references. + +[heading Synopsis] + template< + typename I + > + struct value_of_data + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __associative_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_value_of_data__<I>::type + +[*Return type]: Any type + +[*Semantics]: Returns the type of the data property associated with the element referenced by an associative iterator `I`. + +[heading Header] + #include <boost/fusion/iterator/value_of_data.hpp> + #include <boost/fusion/include/value_of_data.hpp> + +[heading Example] + typedef __map__<__pair__<float,int> > vec; + typedef __result_of_begin__<vec>::type first; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of_data__<first>::type, int>)); + +[endsect] + +[section deref_data] + +[heading Description] +Returns the type that will be returned by dereferencing the data property referenced by an associative iterator. + +[heading Synposis] + template< + typename I + > + struct deref_data + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`I`] [Model of __associative_iterator__] [Operation's argument]] +] + +[heading Expression Semantics] + __result_of_deref_data__<I>::type + +[*Return type]: Any type + +[*Semantics]: Returns the result of dereferencing the data property referenced by an associative iterator of type `I`. + +[heading Header] + #include <boosta/fusion/iterator/deref_data.hpp> + #include <boost/fusion/include/deref_data.hpp> + +[heading Example] + typedef __map__<__pair__<float,int> > map; + typedef __result_of_begin__<vec>::type first; + + BOOST_MPL_ASSERT((boost::is_same<__result_of_deref_data__<first>::type, int&>)); + +[endsect] + +[endsect] + +[endsect] + diff --git a/libs/fusion/doc/notes.qbk b/libs/fusion/doc/notes.qbk new file mode 100644 index 000000000..6c1b883cd --- /dev/null +++ b/libs/fusion/doc/notes.qbk @@ -0,0 +1,229 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + Copyright (C) 2010 Christopher Schmidt + + Use, modification and distribution is 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) +===============================================================================/] +[section Notes] + +[heading Recursive Inlined Functions] + +An interesting peculiarity of functions like __at__ when applied to a +__forward_sequence__ like __list__ is that what could have been linear +runtime complexity effectively becomes constant O(1) due to compiler +optimization of C++ inlined functions, however deeply recursive (up to a +certain compiler limit of course). Compile time complexity remains linear. + +[heading Overloaded Functions] + +Associative sequences use function overloading to implement membership +testing and type associated key lookup. This amounts to constant runtime +and amortized constant compile time complexities. There is an overloaded +function, `f(k)`, for each key /type/ `k`. The compiler chooses the +appropriate function given a key, `k`. + +[heading Tag Dispatching] + +Tag dispatching is a generic programming technique for selecting template +specializations. There are typically 3 components involved in the tag +dispatching mechanism: + +# A type for which an appropriate template specialization is required +# A metafunction that associates the type with a tag type +# A template that is specialized for the tag type + +For example, the fusion `result_of::begin` metafunction is implemented +as follows: + + template <typename Sequence> + struct begin + { + typedef typename + result_of::begin_impl<typename traits::tag_of<Sequence>::type>:: + template apply<Sequence>::type + type; + }; + +In the case: + +# `Sequence` is the type for which a suitable implementation of + `result_of::begin_impl` is required +# `traits::tag_of` is the metafunction that associates `Sequence` + with an appropriate tag +# `result_of::begin_impl` is the template which is specialized to provide + an implementation for each tag type + +[heading Extensibility] + +Unlike __mpl__, there is no extensibe sequence concept in fusion. This does +not mean that Fusion sequences are not extensible. In fact, all Fusion +sequences are inherently extensible. It is just that the manner of sequence +extension in Fusion is diferent from both __stl__ and __mpl__ on account of +the lazy nature of fusion __algorithms__. __stl__ containers extend +themselves in place though member functions such as __push_back__ and +__insert__. __mpl__ sequences, on the other hand, are extended through +"intrinsic" functions that actually return whole sequences. __mpl__ is +purely functional and can not have side effects. For example, __mpl__'s +`push_back` does not actually mutate an `mpl::vector`. It can't do that. +Instead, it returns an extended `mpl::vector`. + +Like __mpl__, Fusion too is purely functional and can not have side +effects. With runtime efficiency in mind, Fusion sequences are extended +through generic functions that return __views__. __views__ are sequences +that do not actually contain data, but instead impart an alternative +presentation over the data from one or more underlying sequences. __views__ +are proxies. They provide an efficient yet purely functional way to work on +potentially expensive sequence operations. For example, given a __vector__, +Fusion's __push_back__ returns a __joint_view__, instead of an actual +extended __vector__. A __joint_view__ holds a reference to the original +sequence plus the appended data --making it very cheap to pass around. + +[heading Element Conversion] + +Functions that take in elemental values to form sequences (e.g. +__make_list__) convert their arguments to something suitable to be stored +as a sequence element. In general, the element types are stored as plain +values. Example: + + __make_list__(1, 'x') + +returns a __list__`<int, char>`. + +There are a few exceptions, however. + +[*Arrays:] + +Array arguments are deduced to reference to const types. For example +[footnote Note that the type of a string literal is an array of const +characters, not `const char*`. To get __make_list__ to create a __list__ +with an element of a non-const array type one must use the `ref` wrapper +(see __note_boost_ref__).]: + + __make_list__("Donald", "Daisy") + +creates a __list__ of type + + __list__<const char (&)[7], const char (&)[6]> + +[*Function pointers:] + +Function pointers are deduced to the plain non-reference type (i.e. to +plain function pointer). Example: + + void f(int i); + ... + __make_list__(&f); + +creates a __list__ of type + + __list__<void (*)(int)> + +[heading boost::ref] + +Fusion's generation functions (e.g. __make_list__) by default stores the +element types as plain non-reference types. Example: + + void foo(const A& a, B& b) { + ... + __make_list__(a, b) + +creates a __list__ of type + + __list__<A, B> + +Sometimes the plain non-reference type is not desired. You can use +`boost::ref` and `boost::cref` to store references or const references +(respectively) instead. The mechanism does not compromise const correctness +since a const object wrapped with ref results in a tuple element with const +reference type (see the fifth code line below). Examples: + +For example: + + A a; B b; const A ca = a; + __make_list__(cref(a), b); // creates list<const A&, B> + __make_list__(ref(a), b); // creates list<A&, B> + __make_list__(ref(a), cref(b)); // creates list<A&, const B&> + __make_list__(cref(ca)); // creates list<const A&> + __make_list__(ref(ca)); // creates list<const A&> + +See __boost_ref__ for details. + +[heading adt_attribute_proxy] + +To adapt arbitrary data types that do not allow direct access to their members, +but allow indirect access via expressions (such as invocations of get- and +set-methods), fusion's [^BOOST\_FUSION\_ADAPT\_['xxx]ADT['xxx]]-family (e.g. +__adapt_adt__) may be used. +To bypass the restriction of not having actual lvalues that +represent the elements of the fusion sequence, but rather a sequence of paired +expressions that access the elements, the actual return type of fusion's +intrinsic sequence access functions (__at__, __at_c__, __at_key__, __deref__, +and __deref_data__) is a proxy type, an instance of +`adt_attribute_proxy`, that encapsulates these expressions. + +`adt_attribute_proxy` is defined in the namespace `boost::fusion::extension` and +has three template arguments: + + namespace boost { namespace fusion { namespace extension + { + template< + typename Type + , int Index + , bool Const + > + struct adt_attribute_proxy; + }}} + +When adapting a class type, `adt_attribute_proxy` is specialized for every +element of the adapted sequence, with `Type` being the class type that is +adapted, `Index` the 0-based indices of the elements, and `Const` both `true` +and `false`. The return type of fusion's intrinsic sequence access functions +for the ['N]th element of an adapted class type `type_name` is +[^adt_attribute_proxy<type_name, ['N], ['Const]>], with [^['Const]] being `true` +for constant instances of `type_name` and `false` for non-constant ones. + +[variablelist Notation + [[`type_name`] + [The type to be adapted, with M attributes]] + [[`inst`] + [Object of type `type_name`]] + [[`const_inst`] + [Object of type `type_name const`]] + [[[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])]] + [Attribute descriptor of the ['N]th attribute of `type_name` as passed to the adaption macro, 0\u2264['N]<M]] + [[[^proxy_type['N]]] + [[^adt_attribute_proxy<type_name, ['N], `false`>] with ['N] being an integral constant, 0\u2264['N]<M]] + [[[^const_proxy_type['N]]] + [[^adt_attribute_proxy<type_name, ['N], `true`>] with ['N] being an integral constant, 0\u2264['N]<M]] + [[[^proxy['N]]] + [Object of type [^proxy_type['N]]]] + [[[^const_proxy['N]]] + [Object of type [^const_proxy_type['N]]]] +] + +[*Expression Semantics] + +[table + [[Expression] [Semantics]] + [[[^proxy_type['N](inst)]] [Creates an instance of [^proxy_type['N]] with underlying object `inst`]] + [[[^const_proxy_type['N](const_inst)]] [Creates an instance of [^const_proxy_type['N]] with underlying object `const_inst`]] + [[[^proxy_type['N]::type]] [Another name for [^attribute_type['N]]]] + [[[^const_proxy_type['N]::type]] [Another name for [^const_attribute_type['N]]]] + [[[^proxy['N]=t]] [Invokes [^set_expr['N]], with `t` being an arbitrary object. [^set_expr['N]] may access the variables named `obj` of type `type_name&`, which represent the corresponding instance of `type_name`, and `val` of an arbitrary const-qualified reference template type parameter `Val`, which represents `t`.]] + [[[^proxy['N].get()]] [Invokes [^get_expr['N]] and forwards its return value. [^get_expr['N]] may access the variable named `obj` of type `type_name&` which represents the underlying instance of `type_name`. [^attribute_type['N]] may specify the type that [^get_expr['N]] denotes to.]] + [[[^const_proxy['N].get()]] [Invokes [^get_expr['N]] and forwards its return value. [^get_expr['N]] may access the variable named `obj` of type `type_name const&` which represents the underlying instance of `type_name`. [^attribute_const_type['N]] may specify the type that [^get_expr['N]] denotes to.]] +] + +Additionally, [^proxy_type['N]] and [^const_proxy_type['N]] are copy +constructible, copy assignable and implicitly convertible to +[^proxy_type['N]::type] or [^const_proxy_type['N]::type]. + +[tip To avoid the pitfalls of the proxy type, an arbitrary class type may also +be adapted directly using fusion's [link fusion.extension intrinsic extension +mechanism].] + +[endsect] + diff --git a/libs/fusion/doc/organization.qbk b/libs/fusion/doc/organization.qbk new file mode 100644 index 000000000..e3dd7fb49 --- /dev/null +++ b/libs/fusion/doc/organization.qbk @@ -0,0 +1,88 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Organization] + +The library is organized into layers of modules, with each module addressing a particular +area of responsibility. A module may not depend on modules in higher layers. + +The library is organized in three layers: + +[heading Layers] + +[:[$images/fusion_org.png]] + +The entire library is found in the `"boost/fusion"` directory. Modules are +organized in directories. Each module has its own header file placed in +the same directory with the actual module-directory. For example, there +exists `"boost/fusion/support.hpp"` in the same directory as +"boost/fusion/support". Everything, except those found inside "detail" +directories, is public. + +There is also a `"boost/fusion/include/"` directory that contains all the +headers to all the components and modules. If you are unsure where to +find a specific component or module, or don't want to fuss with +hierarchy and nesting, use this. + +The library is header-only. There is no need to build object files to +link against. + +[heading Directory] + +* tuple +* algorithm + * iteration + * query + * transformation +* adapted + * array + * mpl + * boost::tuple + * std_pair + * struct + * variant +* view + * filter_view + * iterator_range + * joint_view + * reverse_view + * single_view + * transform_view + * zip_view +* container + * deque + * list + * map + * set + * vector + * generation +* mpl +* functional +* sequence + * comparison + * intrinsic + * io +* iterator +* support + +[heading Example] + +If, for example, you want to use `list`, depending on the granularity that +you desire, you may do so by including one of + + #include <boost/fusion/container.hpp> + #include <boost/fusion/include/container.hpp> + #include <boost/fusion/container/list.hpp> + #include <boost/fusion/include/list.hpp> + +The first includes all containers The second includes only `list` +[footnote Modules may contain smaller components. Header file +information for each component will be provided as part of the +component's documentation.]. + +[endsect] diff --git a/libs/fusion/doc/preface.qbk b/libs/fusion/doc/preface.qbk new file mode 100644 index 000000000..cdf0114f8 --- /dev/null +++ b/libs/fusion/doc/preface.qbk @@ -0,0 +1,76 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Preface] + +[:['["Algorithms + Data Structures = Programs.]]] +[:*--Niklaus Wirth*] + +[heading Description] + +Fusion is a library for working with heterogenous collections of data, +commonly referred to as tuples. A set of containers (vector, list, set and map) +is provided, along with views that provide a transformed presentation +of their underlying data. Collectively the containers and views are referred to +as sequences, and Fusion has a suite of algorithms that operate upon the +various sequence types, using an iterator concept that binds everything +together. + +The architecture is modeled after __mpl__ which in turn is modeled after +__stl__. It is named "fusion" because the library is a "fusion" of compile +time metaprogramming with runtime programming. + +[heading Motivation] + +Tuples are powerful beasts. After having developed two significant projects +(__spirit__ and __phoenix__) that relied heavily metaprogramming, it +became apparent that tuples are a powerful means to simplify otherwise tricky +tasks; especially those that require a combination of metaprogramming and +manipulation of heterogenous data types with values. While __mpl__ is an +extremely powerful metaprogramming tool, __mpl__ focuses on type +manipulation only. Ultimately, you'll have to map these types to real +values to make them useful in the runtime world where all the real action +takes place. + +As __spirit__ and __phoenix__ evolved, patterns and idioms related to tuple +manipulation emerged. Soon, it became clear that those patterns and idioms +were best assembled in a tuples algorithms library. __david_abrahams__ +outlined such a scheme in 2002. At that time, it just so happened that +__spirit__ and __phoenix__ had an adhoc collection of tuple manipulation +and traversal routines. It was an instant /AHA!/ moment. + +[heading How to use this manual] + +Some icons are used to mark certain topics indicative of their relevance. +These icons precede some text to indicate: + +[table Icons + [[Icon] [Name] [Meaning]] + [[__note__] [Note] [Information provided is auxiliary but will + give the reader a deeper insight into a specific + topic. May be skipped.]] + [[__alert__] [Alert] [Information provided is of utmost importance.]] + [[__caution__] [Caution] [A mild warning.]] + [[__tip__] [Tip] [A potentially useful and helpful piece of + information.]] +] + +This documentation is automatically generated by Boost QuickBook documentation +tool. QuickBook can be found in the __boost_tools__. + +[heading Support] + +Please direct all questions to Spirit's mailing list. You can subscribe to the +__spirit_list__. The mailing list has a searchable archive. A search link to +this archive is provided in __spirit__'s home page. You may also read and post +messages to the mailing list through __spirit_general__ (thanks to __gmane__). +The news group mirrors the mailing list. Here is a link to the archives: +__mlist_archive__. + +[endsect] + diff --git a/libs/fusion/doc/quick_start.qbk b/libs/fusion/doc/quick_start.qbk new file mode 100644 index 000000000..e6e6c3c10 --- /dev/null +++ b/libs/fusion/doc/quick_start.qbk @@ -0,0 +1,169 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Quick Start] + +I assume the reader is already familiar with tuples (__tuple__) and its +ancestor `std::pair`. The tuple is a generalization of `std::pair` for +multiple heterogeneous elements (triples, quadruples, etc.). The tuple is +more or less a synonym for fusion's `__vector__`. + +For starters, we shall include all of Fusion's __sequence__(s) [footnote There +are finer grained header files available if you wish to have more control +over which components to include (see section __organization__ for +details).]: + + #include <boost/fusion/sequence.hpp> + #include <boost/fusion/include/sequence.hpp> + +Let's begin with a `__vector__` [footnote Unless otherwise noted, components are +in namespace `boost::fusion`. For the sake of simplicity, code in this +quick start implies `using` directives for the fusion components we will be +using.]: + + __vector__<int, char, std::string> stuff(1, 'x', "howdy"); + int i = __at_c__<0>(stuff); + char ch = __at_c__<1>(stuff); + std::string s = __at_c__<2>(stuff); + +Just replace `tuple` for `__vector__` and `get` for `__at_c__` and this is exactly +like __tuple__. Actually, either names can be used interchangeably. Yet, +the similarity ends there. You can do a lot more with Fusion `__vector__` or +`tuple`. Let's see some examples. + +[heading Print the vector as XML] + +First, let's include the algorithms: + + #include <boost/fusion/algorithm.hpp> + #include <boost/fusion/include/algorithm.hpp> + +Now, let's write a function object that prints XML of the form <type>data</type> +for each member in the tuple. + + struct print_xml + { + template <typename T> + void operator()(T const& x) const + { + std::cout + << '<' << typeid(x).name() << '>' + << x + << "</" << typeid(x).name() << '>' + ; + } + }; + +Now, finally: + + __for_each__(stuff, print_xml()); + +That's it! `__for_each__` is a fusion algorithm. It is a generic algorithm +similar to __stl__'s. It iterates over the sequence and calls a user +supplied function. In our case, it calls `print_xml`'s `operator()` for +each element in `stuff`. + +[caution The result of `typeid(x).name()` is platform specific. The code +here is just for exposition. Of course you already know that :-)] + +`__for_each__` is generic. With `print_xml`, you can use it to print just about +any Fusion __sequence__. + +[heading Print only pointers] + +Let's get a little cleverer. Say we wish to write a /generic/ function +that takes in an arbitrary sequence and XML prints only those elements +which are pointers. Ah, easy. First, let's include the `is_pointer` boost +type trait: + + #include <boost/type_traits/is_pointer.hpp> + +Then, simply: + + template <typename Sequence> + void xml_print_pointers(Sequence const& seq) + { + __for_each__(__filter_if__<boost::is_pointer<_> >(seq), print_xml()); + } + +`__filter_if__` is another Fusion algorithm. It returns a __filter_view__, +a conforming Fusion sequence. This view reflects only those elements that +pass the given predicate. In this case, the predicate is +`boost::is_pointer<_>`. This "filtered view" is then passed to the +__for_each__ algorithm, which then prints the "filtered view" as XML. + +Easy, right? + +[heading Associative tuples] + +Ok, moving on... + +Apart from `__vector__`, fusion has a couple of other sequence types to choose +from. Each sequence has its own characteristics. We have `__list__`, `__set__`, +`__map__`, plus a multitude of `views` that provide various ways to present the +sequences. + +Fusion's `__map__` associate types with elements. It can be used as a cleverer +replacement of the `struct`. Example: + + namespace fields + { + struct name; + struct age; + } + + typedef __map__< + __fusion_pair__<fields::name, std::string> + , __fusion_pair__<fields::age, int> > + person; + +`__map__` is an associative sequence. Its elements are Fusion pairs which differ +somewhat from `std::pair`. Fusion pairs only contain one member, with the type of +their second template parameter. The first type parameter of the pair is used as an +index to the associated element in the sequence. For example, given a `a_person` +of type, `person`, you can do: + + using namespace fields; + std::string person_name = __at_key__<name>(a_person); + int person_age = __at_key__<age>(a_person); + +Why go through all this trouble, you say? Well, for one, unlike the +`struct`, we are dealing with a generic data structure. There are a +multitude of facilities available at your disposal provided out of the box +with fusion or written by others. With these facilities, introspection +comes for free, for example. We can write one serialization function (well, +two, if you consider loading and saving) that will work for all your fusion +`__map__`s. Example: + + struct saver + { + template <typename Pair> + void operator()(Pair const& data) const + { + some_archive << data.second; + } + }; + + template <typename Stuff> + void save(Stuff const& stuff) + { + __for_each__(stuff, saver()); + } + +The `save` function is generic and will work for all types of `stuff` +regardless if it is a `person`, a `dog` or a whole `alternate_universe`. + +[heading Tip of the Iceberg] + +And... we've barely scratched the surface! You can compose and expand the +data structures, remove elements from the structures, find specific data +types, query the elements, filter out types for inspection, transform data +structures, etc. What you've seen is just the tip of the iceberg. + +[endsect] + diff --git a/libs/fusion/doc/references.qbk b/libs/fusion/doc/references.qbk new file mode 100644 index 000000000..d0d63019c --- /dev/null +++ b/libs/fusion/doc/references.qbk @@ -0,0 +1,27 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section References] + +# [@http://boost.org/libs/iterator/doc/new-iter-concepts.html New Iterator Concepts], + David Abrahams, Jeremy Siek, Thomas Witt, 2004-11-01. +# [@http://boost.org/libs/tuple/doc/tuple_users_guide.html The Boost Tuple Library], + Jaakko Jarvi, 2001. +# [@http://www.boost.org/libs/spirit/ Spirit Parser Library], + Joel de Guzman, 2001-2006. +# [@http://www.boost.org/libs/mpl/ The Boost MPL Library], + Aleksey Gurtovoy and David Abrahams, 2002-2004. +# [@http://www.boost.org/doc/html/array.html Boost Array], + Nicolai Josuttis, 2002-2004. +# [@http://www.sgi.com/tech/stl/ Standard Template Library Programmer's Guide], + Hewlett-Packard Company, 1994. +# [@http://www.boost.org/doc/html/ref.html Boost.Ref], + Jaakko Jarvi, Peter Dimov, Douglas Gregor, Dave Abrahams, 1999-2002. + +[endsect] + diff --git a/libs/fusion/doc/sequence.qbk b/libs/fusion/doc/sequence.qbk new file mode 100644 index 000000000..c95fd51ab --- /dev/null +++ b/libs/fusion/doc/sequence.qbk @@ -0,0 +1,1891 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Sequence] + +Like __mpl__, the Sequence is a fundamental concept in Fusion. A Sequence +may or may not actually store or contain data. __containers__ are sequences +that hold data. __views__, on the other hand, are sequences that do not +store any data. Instead, they are proxies that impart an alternative +presentation over another sequence. All models of Sequence have an +associated __iterator__ type that can be used to iterate through the +Sequence's elements. + +[heading Header] + + #include <boost/fusion/sequence.hpp> + #include <boost/fusion/include/sequence.hpp> + +[section Concepts] + +Fusion Sequences are organized into a hierarchy of concepts. + +[heading Traversal] + +Fusion's sequence traversal related concepts parallel Fusion's +__iterator_concepts__. __forward_sequence__ is the most basic concept. +__bidirectional_sequence__ is a refinement of __forward_sequence__. +__random_access_sequence__ is a refinement of __bidirectional_sequence__. +These concepts pertain to sequence traversal. + +[heading Associativity] + +The __associative_sequence__ concept is orthogonal to traversal. An Associative +Sequence allows efficient retrieval of elements based on keys. + +[section Forward Sequence] + +[heading Description] + +A Forward Sequence is a Sequence whose elements are arranged in a definite +order. The ordering is guaranteed not to change from iteration to +iteration. The requirement of a definite ordering allows the definition of +element-by-element equality (if the container's element type is Equality +Comparable) and of lexicographical ordering (if the container's element +type is LessThan Comparable). + +[variablelist Notation + [[`s`] [A Forward Sequence]] + [[`S`] [A Forward Sequence type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +For any Forward Sequence the following expressions must be valid: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__forward_iterator__] [] [Constant]] + [[`__end__(s)`] [__forward_iterator__] [] [Constant]] + [[`__size__(s)`] [__mpl_integral_constant__. + Convertible to int.] [] [Constant]] + [[`__empty__(s)`] [__mpl_boolean_constant__. + Convertible to bool.] [] [Constant]] + [[`__front__(s)`] [Any type] [] [Constant]] + [[`__front__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__<S>::type`] [Amortized constant time]] + [[`__result_of_end__<S>::type`] [Amortized constant time]] + [[`__result_of_size__<S>::type`] [Unspecified]] + [[`__result_of_empty__<S>::type`] [Constant time]] + [[`__result_of_front__<S>::type`] [Amortized constant time]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`__begin__(s)`] [An iterator to the first element of the sequence; see __begin__.]] + [[`__end__(s)`] [A past-the-end iterator to the sequence; see __end__.]] + [[`__size__(s)`] [The size of the sequence; see __size__.]] + [[`__empty__(s)`] [A boolean Integral Constant `c` such that + `c::value == true` if and only if the sequence + is empty; see __empty__.]] + [[`__front__(s)`] [The first element in the sequence; see __front__.]] +] + +[heading Invariants] + +For any Forward Sequence s the following invariants always hold: + +* `[__begin__(s), __end__(s))` is always a valid range. +* An __algorithm__ that iterates through the range `[__begin__(s), __end__(s))` + will pass through every element of `s` exactly once. +* `__begin__(s)` is identical to `__end__(s))` if and only if `s` is empty. +* Two different iterations through `s` will access its elements in + the same order. + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __cons__ +* __list__ +* __set__ +* __map__ +* __single_view__ +* __filter_view__ +* __iterator_range__ +* __joint_view__ +* __transform_view__ +* __reverse_view__ +* __zip_view__ + +[endsect] + +[section Bidirectional Sequence] + +[heading Description] + +A Bidirectional Sequence is a __forward_sequence__ whose iterators model +__bidirectional_iterator__. + +[heading Refinement of] + +__forward_sequence__ + +[variablelist Notation + [[`s`] [A Forward Sequence]] + [[`S`] [A Forward Sequence type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +In addition to the requirements defined in __forward_sequence__, for any +Bidirectional Sequence the following must be met: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__bidirectional_iterator__] [] [Constant]] + [[`__end__(s)`] [__bidirectional_iterator__] [] [Constant]] + [[`__back__(s)`] [Any type] [] [Constant]] + [[`__back__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__<S>::type`] [Amortized constant time]] + [[`__result_of_end__<S>::type`] [Amortized constant time]] + [[`__result_of_back__<S>::type`] [Amortized constant time]] +] + +[heading Expression Semantics] + +The semantics of an expression are defined only where they differ from, or +are not defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`__back__(s)`] [The last element in the sequence; see __back__.]] +] + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __reverse_view__ +* __single_view__ +* __iterator_range__ (where adapted sequence is a Bidirectional Sequence) +* __transform_view__ (where adapted sequence is a Bidirectional Sequence) +* __zip_view__ (where adapted sequences are models of Bidirectional Sequence) + +[endsect] + +[section Random Access Sequence] + +[heading Description] + +A Random Access Sequence is a __bidirectional_sequence__ whose iterators +model __random_access_iterator__. It guarantees constant time access to +arbitrary sequence elements. + +[heading Refinement of] + +__bidirectional_sequence__ + +[variablelist Notation + [[`s`] [A Random Access Sequence]] + [[`S`] [A Random Access Sequence type]] + [[`N`] [An __mpl_integral_constant__]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +In addition to the requirements defined in __bidirectional_sequence__, for +any Random Access Sequence the following must be met: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__random_access_iterator__] [] [Constant]] + [[`__end__(s)`] [__random_access_iterator__] [] [Constant]] + [[`__at__<N>(s)`] [Any type] [] [Constant]] + [[`__at__<N>(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__<S>::type`] [Amortized constant time]] + [[`__result_of_end__<S>::type`] [Amortized constant time]] + [[`__result_of_at__<S, N>::type`] [Amortized constant time]] + [[`__result_of_value_at__<S, N>::type`] [Amortized constant time]] +] + +[blurb __note__ `__result_of_at__<S, N>` returns the actual type returned by +`__at__<N>(s)`. In most cases, this is a reference. Hence, there is no way to +know the exact element type using `__result_of_at__<S, N>`.The element at `N` +may actually be a reference to begin with. For this purpose, you can use +`__result_of_value_at__<S, N>`.] + +[heading Expression Semantics] + +The semantics of an expression are defined only where they differ from, or +are not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`__at__<N>(s)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __reverse_view__ +* __single_view__ +* __iterator_range__ (where adapted sequence is a Random Access Sequence) +* __transform_view__ (where adapted sequence is a Random Access Sequence) +* __zip_view__ (where adapted sequences are models of Random Access Sequence) + +[endsect] + +[section Associative Sequence] + +[heading Description] + +An Associative Sequence allows efficient retrieval of elements based on keys. +Like associative sequences in __mpl__, and unlike associative containers in +__stl__, Fusion associative sequences have no implied ordering relation. +Instead, type identity is used to impose an equivalence relation on keys. + +[variablelist Notation + [[`s`] [An Associative Sequence]] + [[`S`] [An Associative Sequence type]] + [[`K`] [An arbitrary /key/ type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +For any Associative Sequence the following expressions must be valid: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__has_key__<K>(s)`] [__mpl_boolean_constant__. + Convertible to bool.] [] [Constant]] + [[`__at_key__<K>(s)`] [Any type] [] [Constant]] + [[`__at_key__<K>(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_has_key__<S, K>::type`] [Amortized constant time]] + [[`__result_of_at_key__<S, K>::type`] [Amortized constant time]] + [[`__result_of_value_at_key__<S, K>::type`] [Amortized constant time]] +] + +[blurb __note__ `__result_of_at_key__<S, K>` returns the actual type returned +by `__at_key__<K>(s)`. In most cases, this is a reference. Hence, there is no +way to know the exact element type using `__result_of_at_key__<S, K>`.The +element at `K` may actually be a reference to begin with. For this purpose, +you can use `__result_of_value_at_key__<S, N>`.] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`__has_key__<K>(s)`] [A boolean Integral Constant `c` such that + `c::value == true` if and only if there is + one or more elements with the key `k` in `s`; + see __has_key__.]] + [[`__at_key__<K>(s)`] [The element associated with the key + `K` in the sequence `s`; see __at__.]] +] + +[heading Models] + +* __set__ +* __map__ +* __filter_view__ (where adapted sequence is an __associative_sequence__ and a __forward_sequence__) +* __iterator_range__ (where adapted iterators are __associative_iterator__\ s) +* __joint_view__ (where adapted sequences are __associative_sequence__\ s and __forward_sequence__\ s) +* __reverse_view__ (where adapted sequence is an __associative_sequence__ and a __bidirectional_sequence__) + +[endsect] + +[endsect] + +[section Intrinsic] + +Intrinsic form the essential interface of every Fusion __sequence__. __stl__ +counterparts of these functions are usually implemented as member +functions. Intrinsic functions, unlike __algorithms__, are not generic +across the full __sequence__ repertoire. They need to be implemented for +each Fusion __sequence__[footnote In practice, many of intrinsic functions +have default implementations that will work in majority of cases]. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic.hpp> + #include <boost/fusion/include/intrinsic.hpp> + +[section Functions] + +[section begin] + +[heading Description] + +Returns an iterator pointing to the first element in the sequence. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_begin__<Sequence>::type + begin(Sequence& seq); + + template <typename Sequence> + typename __result_of_begin__<Sequence const>::type + begin(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] +] + +[heading Expression Semantics] + + begin(seq); + +[*Return type]: + +* A model of __forward_iterator__ if `seq` is a __forward_sequence__ +else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__ +else, __random_access_iterator__ if `seq` is a __random_access_sequence__. +* A model of __associative_iterator__ if `seq` is an __associative_sequence__. + +[*Semantics]: Returns an iterator pointing to the first element in the sequence. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/begin.hpp> + #include <boost/fusion/include/begin.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(__deref__(begin(v)) == 1); + +[endsect] + +[section end] + +[heading Description] + +Returns an iterator pointing to one element past the end of the sequence. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_end__<Sequence>::type + end(Sequence& seq); + + template <typename Sequence> + typename __result_of_end__<Sequence const>::type + end(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] +] + +[heading Expression Semantics] + + end(seq); + +[*Return type]: + +* A model of __forward_iterator__ if `seq` is a __forward_sequence__ +else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__ +else, __random_access_iterator__ if `seq` is a __random_access_sequence__. +* A model of __associative_iterator__ if `seq` is an __associative_sequence__. + +[*Semantics]: Returns an iterator pointing to one element past the end of +the sequence. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/end.hpp> + #include <boost/fusion/include/end.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(__deref__(__prior__(end(v))) == 3); + +[endsect] + +[section empty] + +[heading Description] + +Returns a type convertible to `bool` that evaluates to `true` if the +sequence is empty, else, evaluates to `false`. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_empty__<Sequence>::type + empty(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + empty(seq); + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Evaluates to `true` if the sequence is empty, else, evaluates +to `false`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/empty.hpp> + #include <boost/fusion/include/empty.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(empty(v) == false); + +[endsect] + +[section front] + +[heading Description] + +Returns the first element in the sequence. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_front__<Sequence>::type + front(Sequence& seq); + + template <typename Sequence> + typename __result_of_front__<Sequence const>::type + front(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + front(seq); + +[*Return type]: Returns a reference to the first element in the sequence +`seq` if `seq` is mutable and `e = o`, where `e` is the first element in +the sequence, is a valid expression. Else, returns a type convertable to +the first element in the sequence. + +[*Precondition]: `__empty__(seq) == false` + +[*Semantics]: Returns the first element in the sequence. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/front.hpp> + #include <boost/fusion/include/front.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(front(v) == 1); + +[endsect] + +[section back] + +[heading Description] + +Returns the last element in the sequence. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_back__<Sequence>::type + back(Sequence& seq); + + template <typename Sequence> + typename __result_of_back__<Sequence const>::type + back(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __bidirectional_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + back(seq); + +[*Return type]: Returns a reference to the last element in the sequence +`seq` if `seq` is mutable and `e = o`, where `e` is the last element in the +sequence, is a valid expression. Else, returns a type convertable to the +last element in the sequence. + +[*Precondition]: `__empty__(seq) == false` + +[*Semantics]: Returns the last element in the sequence. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/back.hpp> + #include <boost/fusion/include/back.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(back(v) == 3); + +[endsect] + +[section size] + +[heading Description] + +Returns a type convertible to `int` that evaluates the number of elements +in the sequence. + +[heading Synopsis] + + template <typename Sequence> + typename __result_of_size__<Sequence>::type + size(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + size(seq); + +[*Return type]: Convertible to `int`. + +[*Semantics]: Returns the number of elements in the sequence. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/size.hpp> + #include <boost/fusion/include/size.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(size(v) == 3); + +[endsect] + +[section at] + +[heading Description] + +Returns the N-th element from the beginning of the sequence. + +[heading Synopsis] + + template <typename N, typename Sequence> + typename __result_of_at__<Sequence, N>::type + at(Sequence& seq); + + template <typename N, typename Sequence> + typename __result_of_at__<Sequence const, N>::type + at(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] + [[`N`] [An __mpl_integral_constant__] [An index from the beginning of the + sequence.]] +] + +[heading Expression Semantics] + + at<N>(seq); + +[*Return type]: Returns a reference to the N-th element from the beginning +of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th +element from the beginning of the sequence, is a valid expression. Else, +returns a type convertable to the N-th element from the beginning of the +sequence. + +[*Precondition]: `0 <= N::value < __size__(s)` + +[*Semantics]: Equivalent to + + __deref__(__advance__<N>(__begin__(s))) + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at.hpp> + #include <boost/fusion/include/at.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(at<mpl::int_<1> >(v) == 2); + +[endsect] + +[section at_c] + +[heading Description] + +Returns the N-th element from the beginning of the sequence. + +[heading Synopsis] + + template <int N, typename Sequence> + typename __result_of_at_c__<Sequence, N>::type + at_c(Sequence& seq); + + template <int N, typename Sequence> + typename __result_of_at_c__<Sequence const, N>::type + at_c(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] + [[`N`] [An integral constant] [An index from the beginning of the + sequence.]] +] + +[heading Expression Semantics] + + at_c<N>(seq); + +[*Return type]: Returns a reference to the N-th element from the beginning +of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th +element from the beginning of the sequence, is a valid expression. Else, +returns a type convertable to the N-th element from the beginning of the +sequence. + +[*Precondition]: `0 <= N < __size__(s)` + +[*Semantics]: Equivalent to + + __deref__(__advance__<N>(__begin__(s))) + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at_c.hpp> + #include <boost/fusion/include/at_c.hpp> + +[heading Example] + + __vector__<int, int, int> v(1, 2, 3); + assert(at_c<1>(v) == 2); + +[endsect] + +[section has_key] + +[heading Description] + +Returns a type convertible to `bool` that evaluates to `true` if the +sequence contains an element associated with a Key, else, evaluates to +`false`. + +[heading Synopsis] + + template <typename Key, typename Sequence> + typename __result_of_has_key__<Sequence, Key>::type + has_key(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] + [[`Key`] [Any type] [The queried key.]] +] + +[heading Expression Semantics] + + has_key<Key>(seq); + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Evaluates to `true` if the sequence contains an element +associated with Key, else, evaluates to `false`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/has_key.hpp> + #include <boost/fusion/include/has_key.hpp> + +[heading Example] + + __set__<int, char, bool> s(1, 'x', true); + assert(has_key<char>(s) == true); + +[endsect] + +[section at_key] + +[heading Description] + +Returns the element associated with a Key from the sequence. + +[heading Synopsis] + + template <typename Key, typename Sequence> + typename __result_of_at_key__<Sequence, Key>::type + at_key(Sequence& seq); + + template <typename Key, typename Sequence> + typename __result_of_at_key__<Sequence const, Key>::type + at_key(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] + [[`Key`] [Any type] [The queried key.]] +] + +[heading Expression Semantics] + + at_key<Key>(seq); + +[*Return type]: Returns a reference to the element associated with Key from +the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the +element associated with Key, is a valid expression. Else, returns a type +convertable to the element associated with Key. + +[*Precondition]: `has_key<Key>(seq) == true` + +[*Semantics]: Returns the element associated with Key. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at_key.hpp> + #include <boost/fusion/include/at_key.hpp> + +[heading Example] + + __set__<int, char, bool> s(1, 'x', true); + assert(at_key<char>(s) == 'x'); + +[endsect] + +[section swap] + +[heading Description] + +Performs an element by element swap of the elements in 2 sequences. + +[heading Synopsis] + template<typename Seq1, typename Seq2> + void swap(Seq1& seq1, Seq2& seq2); + +[heading Parameters] + +[table + [[Parameters] [Requirement] [Description]] + [[`seq1`, `seq2`] [Models of __forward_sequence__][The sequences whos elements we wish to swap.]] +] + +[heading Expression Semantics] + + swap(seq1, seq2); + +[*Return type]: `void` + +[*Precondition]: `__size__(seq1) == __size__(seq2)` + +[*Semantics]: Calls `swap(a1, b1)` for corresponding elements in `seq1` and `seq2`. + +/sequence/intrinsic/swap.hpp> + +[heading Example] + __vector__<int, std::string> v1(1, "hello"), v2(2, "world"); + swap(v1, v2); + assert(v1 == __make_vector__(2, "world")); + assert(v2 == __make_vector__(1, "hello")); + +[endsect] + +[endsect] + +[section Metafunctions] + +[section begin] + +[heading Description] +Returns the result type of __begin__. + +[heading Synopsis] + template<typename Seq> + struct begin + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::begin<Seq>::type + +[*Return type]: + +* A model of __forward_iterator__ if `seq` is a __forward_sequence__ +else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__ +else, __random_access_iterator__ if `seq` is a __random_access_sequence__. +* A model of __associative_iterator__ if `seq` is an __associative_sequence__. + +[*Semantics]: Returns the type of an iterator to the first element of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/begin.hpp> + #include <boost/fusion/include/begin.hpp> + +[heading Example] + typedef __vector__<int> vec; + typedef __result_of_begin__<vec>::type it; + BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<it>::type, int&>)) + +[endsect] + +[section end] + +[heading Description] +Returns the result type of __end__. + +[heading Synopsis] + template<typename Seq> + struct end + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::end<Seq>::type + +[*Return type]: + +* A model of __forward_iterator__ if `seq` is a __forward_sequence__ +else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__ +else, __random_access_iterator__ if `seq` is a __random_access_sequence__. +* A model of __associative_iterator__ if `seq` is an __associative_sequence__. + +[*Semantics]: Returns the type of an iterator one past the end of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/end.hpp> + #include <boost/fusion/include/end.hpp> + +[heading Example] + typedef __vector__<int> vec; + typedef __result_of_prior__<__result_of_end__<vec>::type>::type first; + BOOST_MPL_ASSERT((__result_of_equal_to__<first, __result_of_begin__<vec>::type>)) + +[endsect] + +[section empty] + +[heading Description] +Returns the result type of __empty__. + +[heading Synopsis] + template<typename Seq> + struct empty + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::empty<Seq>::type + +[*Return type]: An __mpl_integral_constant__ + +[*Semantics]: Returns `mpl::true_` if `Seq` has zero elements, `mpl::false_` otherwise. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/empty.hpp> + #include <boost/fusion/include/empty.hpp> + +[heading Example] + typedef __vector__<> empty_vec; + typedef __vector__<int,float,char> vec; + + BOOST_MPL_ASSERT((__result_of_empty__<empty_vec>)); + BOOST_MPL_ASSERT_NOT((__result_of_empty__<vec>)); + +[endsect] + +[section front] + +[heading Description] +Returns the result type of __front__. + +[heading Synopsis] + template<typename Seq> + struct front + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::front<Seq>::type + +[*Return type]: Any type + +[*Semantics]: The type returned by dereferencing an iterator to the first element in `Seq`. Equivalent to `__result_of_deref__<__result_of_begin__<Seq>::type>::type`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/front.hpp> + #include <boost/fusion/include/front.hpp> + +[heading Example] + typedef __vector__<int,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_front__<vec>::type, int&>)); + +[endsect] + +[section back] + +[heading Description] +Returns the result type of __back__. + +[heading Synopsis] + template<typename Seq> + struct back + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::back<Seq>::type + +[*Return type]: Any type + +[*Semantics]: The type returned by dereferencing an iterator to the last element in the sequence. Equivalent to `__result_of_deref__<__result_of_prior__<__result_of_end__<Seq>::type>::type>::type`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/back.hpp> + #include <boost/fusion/include/back.hpp> + +[heading Example] + typedef __vector__<int,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_back__<vec>::type, char&>)); + +[endsect] + +[section size] + +[heading Description] +Returns the result type of __size__. + +[heading Synopsis] + template<typename Seq> + struct size + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::size<Seq>::type + +[*Return type]: An __mpl_integral_constant__. + +[*Semantics]: Returns the number of elements in `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/size.hpp> + #include <boost/fusion/include/size.hpp> + +[heading Example] + typedef __vector__<int,float,char> vec; + typedef __result_of_size__<vec>::type size_mpl_integral_constant; + BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3); + +[endsect] + +[section at] + +[heading Description] + +Returns the result type of __at__[footnote __result_of_at__ reflects the +actual return type of the function __at__. __sequence__(s) typically return +references to its elements via the __at__ function. If you want to get +the actual element type, use __result_of_value_at__]. + +[heading Synopsis] + template< + typename Seq, + typename N> + struct at + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __random_access_sequence__][Argument sequence]] + [[`N`][An __mpl_integral_constant__][Index of element]] +] + +[heading Expression Semantics] + result_of::at<Seq, N>::type + +[*Return type]: Any type. + +[*Semantics]: Returns the result type of using __at__ to access the `N`th element of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at.hpp> + #include <boost/fusion/include/at.hpp> + +[heading Example] + typedef __vector__<int,float,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at__<vec, boost::mpl::int_<1> >::type, float&>)); + +[endsect] + +[section at_c] + +[heading Description] + +Returns the result type of __at_c__[footnote __result_of_at_c__ reflects +the actual return type of the function __at_c__. __sequence__(s) typically +return references to its elements via the __at_c__ function. If you want to +get the actual element type, use __result_of_value_at_c__]. + +[heading Synopsis] + template< + typename Seq, + int M> + struct at_c + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __random_access_sequence__][Argument sequence]] + [[`M`][Positive integer index][Index of element]] +] + +[heading Expression Semantics] + result_of::at_c<Seq, M>::type + +[*Return type]: Any type + +[*Semantics]: Returns the result type of using __at_c__ to access the `M`th element of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at.hpp> + #include <boost/fusion/include/at.hpp> + +[heading Example] + typedef __vector__<int,float,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_c__<vec, 1>::type, float&>)); + +[endsect] + +[section value_at] + +[heading Description] + +Returns the actual type at a given index from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + typename N> + struct value_at + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __random_access_sequence__][Argument sequence]] + [[`N`][An __mpl_integral_constant__][Index of element]] +] + +[heading Expression Semantics] + result_of::value_at<Seq, N>::type + +[*Return type]: Any type. + +[*Semantics]: Returns the actual type at the `N`th element of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/value_at.hpp> + #include <boost/fusion/include/value_at.hpp> + +[heading Example] + typedef __vector__<int,float,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at__<vec, boost::mpl::int_<1> >::type, float>)); + +[endsect] + +[section value_at_c] + +[heading Description] + +Returns the actual type at a given index from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + int M> + struct value_at_c + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __random_access_sequence__][Argument sequence]] + [[`M`][Positive integer index][Index of element]] +] + +[heading Expression Semantics] + result_of::value_at_c<Seq, M>::type + +[*Return type]: Any type + +[*Semantics]: Returns the actual type at the `M`th element of `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/value_at.hpp> + #include <boost/fusion/include/value_at.hpp> + +[heading Example] + typedef __vector__<int,float,char> vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at_c__<vec, 1>::type, float>)); + +[endsect] + +[section has_key] + +[heading Description] +Returns the result type of __has_key__. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct has_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __associative_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::has_key<Seq, Key>::type + +[*Return type]: An __mpl_integral_constant__. + +[*Semantics]: Returns `mpl::true_` if `Seq` contains an element with key type `Key`, returns `mpl::false_` otherwise. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/has_key.hpp> + #include <boost/fusion/include/has_key.hpp> + +[heading Example] + typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap; + BOOST_MPL_ASSERT((__result_of_has_key__<mymap, int>)); + BOOST_MPL_ASSERT_NOT((__result_of_has_key__<mymap, void*>)); + +[endsect] + +[section at_key] + +[heading Description] + +Returns the result type of __at_key__[footnote __result_of_at_key__ +reflects the actual return type of the function __at_key__. __sequence__s +typically return references to its elements via the __at_key__ function. If +you want to get the actual element type, use __result_of_value_at_key__]. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct at_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __associative_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::at_key<Seq, Key>::type + +[*Return type]: Any type. + +[*Semantics]: Returns the result of using __at_key__ to access the element with key type `Key` in `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/at_key.hpp> + #include <boost/fusion/include/at_key.hpp> + +[heading Example] + typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__<mymap, int>::type, char&>)); + +[endsect] + +[section value_at_key] + +[heading Description] +Returns the actual element type associated with a Key from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct value_at_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __associative_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::value_at_key<Seq, Key>::type + +[*Return type]: Any type. + +[*Semantics]: Returns the actual element type associated with key type +`Key` in `Seq`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/value_at_key.hpp> + #include <boost/fusion/include/value_at_key.hpp> + +[heading Example] + typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__<mymap, int>::type, char>)); + +[endsect] + +[section swap] + +[heading Description] +Returns the return type of swap. + +[heading Synopsis] + template<typename Seq1, typename Seq2> + struct swap + { + typedef void type; + }; + +[table Parameters + [[Parameters] [Requirement] [Description]] + [[`Seq1`, `Seq2`][Models of __forward_sequence__][The sequences being swapped]] +] + +[heading Expression Semantics] + result_of::swap<Seq1, Seq2>::type + +[*Return type]: `void`. + +[*Semantics]: Always returns `void`. + +[heading Header] + + #include <boost/fusion/sequence/intrinsic/swap.hpp> + #include <boost/fusion/include/swap.hpp> + +[endsect] + +[endsect] + +[endsect] + +[section Operator] + +These operators, like the __algorithms__, work generically on all Fusion +sequences. All conforming Fusion sequences automatically get these +operators for free. + +[section I/O] + +The I/O operators: `<<` and `>>` work generically on all Fusion +sequences. The I/O operators are overloaded in namespace `boost::fusion` +[footnote __sequences__ and __views__ residing in different namespaces +will have to either provide their own I/O operators (possibly forwarding +to fusion's I/O operators) or hoist fusion's I/O operators (using +declaration), in their own namespaces for proper argument dependent +lookup.] + +The `operator<<` has been overloaded for generic output streams such +that __sequence__(s) are output by recursively calling `operator<<` for +each element. Analogously, the global `operator>>` has been overloaded +to extract __sequence__(s) from generic input streams by recursively +calling `operator>>` for each element. + +The default delimiter between the elements is space, and the __sequence__ +is enclosed in parenthesis. For Example: + + __vector__<float, int, std::string> a(1.0f, 2, std::string("Howdy folks!"); + cout << a; + +outputs the __vector__ as: (1.0 2 Howdy folks!) + +The library defines three manipulators for changing the default behavior: + +[variablelist Manipulators + [[`tuple_open(arg)`] [Defines the character that is output before the first element.]] + [[`tuple_close(arg)`] [Defines the character that is output after the last element.]] + [[`tuple_delimiter(arg)`] [Defines the delimiter character between elements.]] +] + +The argument to `tuple_open`, `tuple_close` and `tuple_delimiter` may be a +`char`, `wchar_t`, a C-string, or a wide C-string. + +Example: + + std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << a; + +outputs the same __vector__, `a` as: [1.0, 2, Howdy folks!] + +The same manipulators work with `operator>>` and `istream` as well. Suppose +the `std::cin` stream contains the following data: + + (1 2 3) [4:5] + +The code: + + __vector__<int, int, int> i; + __vector__<int, int> j; + + std::cin >> i; + std::cin >> set_open('[') >> set_close(']') >> set_delimiter(':'); + std::cin >> j; + +reads the data into the __vector__(s) `i` and `j`. + +Note that extracting __sequence__(s) with `std::string` or C-style string +elements does not generally work, since the streamed __sequence__ +representation may not be unambiguously parseable. + +[heading Header] + + #include <boost/fusion/sequence/io.hpp> + #include <boost/fusion/include/io.hpp> + +[section in] + +[heading Description] + +Read a __sequence__ from an input stream. + +[heading Synopsis] + + template <typename IStream, typename Sequence> + IStream& + operator>>(IStream& is, Sequence& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[is] [An input stream.] [Stream to extract information from.]] + [[seq] [A __sequence__.] [The sequence to read.]] +] + +[heading Expression Semantics] + + is >> seq + +[*Return type]: IStream& + +[*Semantics]: For each element, `e`, in sequence, `seq`, call `is >> e`. + +[heading Header] + + #include <boost/fusion/sequence/io/in.hpp> + #include <boost/fusion/include/in.hpp> + +[heading Example] + + __vector__<int, std::string, char> v; + std::cin >> v; + +[endsect] + +[section out] + +[heading Description] + +Write a __sequence__ to an output stream. + +[heading Synopsis] + + template <typename OStream, typename Sequence> + OStream& + operator<<(OStream& os, Sequence& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[os] [An output stream.] [Stream to write information to.]] + [[seq] [A __sequence__.] [The sequence to write.]] +] + +[heading Expression Semantics] + + os << seq + +[*Return type]: OStream& + +[*Semantics]: For each element, `e`, in sequence, `seq`, call `os << e`. + +[heading Header] + + #include <boost/fusion/sequence/io/out.hpp> + #include <boost/fusion/include/out.hpp> + +[heading Example] + + std::cout << __make_vector__(123, "Hello", 'x') << std::endl; + +[endsect] + +[endsect] + +[section Comparison] + +The Comparison operators: `==`, `!=`, `<`, `<=`, `>=` and `>=` work +generically on all Fusion sequences. Comparison operators are "short- +circuited": elementary comparisons start from the first elements and are +performed only until the result is clear. + +[heading Header] + + #include <boost/fusion/sequence/comparison.hpp> + #include <boost/fusion/include/comparison.hpp> + +[section equal] + +[heading Description] + +Compare two sequences for equality. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator==(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a == b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a == b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `e1 == e2` returns true. For any 2 zero length __sequence__s, +e and f, e == f returns true. + +[heading Header] + + #include <boost/fusion/sequence/comparison/equal_to.hpp> + #include <boost/fusion/include/equal_to.hpp> + +[heading Example] + + __vector__<int, char> v1(5, 'a'); + __vector__<int, char> v2(5, 'a'); + assert(v1 == v2); + +[endsect] + +[section not equal] + +Compare two sequences for inequality. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator!=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a != b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a == b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: + +Returns !(a == b). + +[heading Header] + + #include <boost/fusion/sequence/comparison/not_equal_to.hpp> + #include <boost/fusion/include/not_equal_to.hpp> + +[heading Example] + + __vector__<int, char> v3(5, 'b'); + __vector__<int, char> t4(2, 'a'); + assert(v1 != v3); + assert(v1 != t4); + assert(!(v1 != v2)); + +[endsect] + +[section less than] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator<(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a < b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a < b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns the lexicographical comparison of between `a` and `b`. + +[heading Header] + + #include <boost/fusion/sequence/comparison/less.hpp> + #include <boost/fusion/include/less.hpp> + +[heading Example] + + __vector__<int, float> v1(4, 3.3f); + __vector__<short, float> v2(5, 3.3f); + __vector__<long, double> v3(5, 4.4); + assert(v1 < v2); + assert(v2 < v3); + +[endsect] + +[section less than equal] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator<=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a <= b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a < b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns !(b < a). + +[heading Header] + + #include <boost/fusion/sequence/comparison/less_equal.hpp> + #include <boost/fusion/include/less_equal.hpp> + +[heading Example] + + __vector__<int, float> v1(4, 3.3f); + __vector__<short, float> v2(5, 3.3f); + __vector__<long, double> v3(5, 4.4); + assert(v1 <= v2); + assert(v2 <= v3); + +[endsect] + +[section greater than] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator>(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a > b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a < b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns b < a. + +[heading Header] + + #include <boost/fusion/sequence/comparison/less_equal.hpp> + #include <boost/fusion/include/less_equal.hpp> + +[heading Example] + + __vector__<int, float> v1(4, 3.3f); + __vector__<short, float> v2(5, 3.3f); + __vector__<long, double> v3(5, 4.4); + assert(v2 > v1); + assert(v3 > v2); + +[endsect] + +[section greater than equal] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template <typename Seq1, typename Seq2> + bool + operator>=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a >= b + +[*Return type]: `bool` + +[*Requirements]: + +For each element, `e1`, in sequence `a`, and for each element, `e2`, in +sequence `b`, `a < b` is a valid expression returning a type that is +convertible to bool. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns !(a < b). + +[heading Header] + + #include <boost/fusion/sequence/comparison/greater_equal.hpp> + #include <boost/fusion/include/greater_equal.hpp> + +[heading Example] + + __vector__<int, float> v1(4, 3.3f); + __vector__<short, float> v2(5, 3.3f); + __vector__<long, double> v3(5, 4.4); + assert(v2 >= v1); + assert(v3 >= v2); + +[endsect] + +[endsect] + +[endsect] + +[endsect] + diff --git a/libs/fusion/doc/support.qbk b/libs/fusion/doc/support.qbk new file mode 100644 index 000000000..4a040015f --- /dev/null +++ b/libs/fusion/doc/support.qbk @@ -0,0 +1,424 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Support] + +A couple of classes and metafunctions provide basic support for Fusion. + +[section is_sequence] + +[heading Description] + +Metafunction that evaluates to `mpl::true_` if a certain type `T` is a +conforming Fusion __sequence__, `mpl::false_` otherwise. This may be +specialized to accomodate clients which provide Fusion conforming sequences. + +[heading Synopsis] + + namespace traits + { + template <typename T> + struct is_sequence + { + typedef __unspecified__ type; + }; + } + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T`] [Any type] [The type to query.]] +] + +[heading Expression Semantics] + + typedef traits::is_sequence<T>::type c; + +[*Return type]: An __mpl_boolean_constant__. + +[*Semantics]: Metafunction that evaluates to `mpl::true_` if a certain type +`T` is a conforming Fusion sequence, `mpl::false_` otherwise. + +[heading Header] + + #include <boost/fusion/support/is_sequence.hpp> + #include <boost/fusion/include/is_sequence.hpp> + +[heading Example] + + BOOST_MPL_ASSERT_NOT(( traits::is_sequence< std::vector<int> > )); + BOOST_MPL_ASSERT_NOT(( is_sequence< int > )); + BOOST_MPL_ASSERT(( traits::is_sequence<__list__<> > )); + BOOST_MPL_ASSERT(( traits::is_sequence<__list__<int> > )); + BOOST_MPL_ASSERT(( traits::is_sequence<__vector__<> > )); + BOOST_MPL_ASSERT(( traits::is_sequence<__vector__<int> > )); + +[endsect] + +[section is_view] + +[heading Description] + +Metafunction that evaluates to `mpl::true_` if a certain type `T` is a +conforming Fusion __view__, `mpl::false_` otherwise. A view is a +specialized sequence that does not actually contain data. Views hold +sequences which may be other views. In general, views are held by other +views by value, while non-views are held by other views by reference. `is_view` +may be specialized to accomodate clients providing Fusion conforming views. + +[heading Synopsis] + + namespace traits + { + template <typename T> + struct is_view + { + typedef __unspecified__ type; + }; + } + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T`] [Any type] [The type to query.]] +] + +[heading Expression Semantics] + + typedef traits::is_view<T>::type c; + +[*Return type]: An __mpl_boolean_constant__. + +[*Semantics]: Metafunction that evaluates to `mpl::true_` if a certain type +`T` is a conforming Fusion view, `mpl::false_` otherwise. + +[heading Header] + + #include <boost/fusion/support/is_view.hpp> + #include <boost/fusion/include/is_view.hpp> + +[heading Example] + + BOOST_MPL_ASSERT_NOT(( traits::is_view<std::vector<int> > )); + BOOST_MPL_ASSERT_NOT(( traits::is_view<int> )); + + using boost::mpl::_ + using boost::is_pointer; + typedef __vector__<int*, char, long*, bool, double> vector_type; + typedef __filter_view__<vector_type, is_pointer<_> > filter_view_type; + BOOST_MPL_ASSERT(( traits::is_view<filter_view_type> )); + +[endsect] + +[section tag_of] + +[heading Description] + +All conforming Fusion sequences and iterators have an associated tag type. The +purpose of the tag is to enable __tag_dispatching__ from __intrinsic__ +functions to implementations appropriate for the type. + +This metafunction may be specialized to accomodate clients providing Fusion +conforming sequences. + +[heading Synopsis] + + namespace traits + { + template<typename Sequence> + struct tag_of + { + typedef __unspecified__ type; + }; + } + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T`] [Any type] [The type to query.]] +] + +[heading Expression Semantics] + + typedef traits::tag_of<T>::type tag; + +[*Return type]: Any type. + +[*Semantics]: Returns the tag type associated with `T`. + +[heading Header] + + #include <boost/fusion/support/tag_of.hpp> + #include <boost/fusion/include/tag_of.hpp> + +[heading Example] + + typedef traits::tag_of<__list__<> >::type tag1; + typedef traits::tag_of<__list__<int> >::type tag2; + typedef traits::tag_of<__vector__<> >::type tag3; + typedef traits::tag_of<__vector__<int> >::type tag4; + + BOOST_MPL_ASSERT((boost::is_same<tag1, tag2>)); + BOOST_MPL_ASSERT((boost::is_same<tag3, tag4>)); + +[endsect] + +[section category_of] + +[heading Description] + +A metafunction that establishes the conceptual classification of a particular +__sequence__ or __iterator__ (see __iterator_concepts__ and +__sequence_concepts__). + +[heading Synopsis] + + namespace traits + { + template <typename T> + struct category_of + { + typedef __unspecified__ type; + }; + } + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T`] [Any type] [The type to query.]] +] + +[heading Expression Semantics] + + typedef traits::category_of<T>::type category; + +[*Return type]: + +The return type is derived from one of: + + namespace boost { namespace fusion + { + struct incrementable_traversal_tag {}; + + struct single_pass_traversal_tag + : incrementable_traversal_tag {}; + + struct forward_traversal_tag + : single_pass_traversal_tag {}; + + struct bidirectional_traversal_tag + : forward_traversal_tag {}; + + struct random_access_traversal_tag + : bidirectional_traversal_tag {}; + }} + +And optionally from: + + namespace boost { namespace fusion + { + struct associative_tag {}; + }} + +[*Semantics]: Establishes the conceptual classification of a particular +__sequence__ or __iterator__. + +[heading Header] + + #include <boost/fusion/support/category_of.hpp> + #include <boost/fusion/include/category_of.hpp> + +[heading Example] + + using boost::is_base_of; + typedef traits::category_of<__list__<> >::type list_category; + typedef traits::category_of<__vector__<> >::type vector_category; + BOOST_MPL_ASSERT(( is_base_of<forward_traversal_tag, list_category> )); + BOOST_MPL_ASSERT(( is_base_of<random_access_traversal_tag, vector_category> )); + +[endsect] + +[section deduce] + +[heading Description] +Metafunction to apply __element_conversion__ to the full argument type. + +It removes references to `const`, references to array types are kept, even +if the array is `const`. Reference wrappers are removed (see +__note_boost_ref__). + +[heading Header] + + #include <boost/fusion/support/deduce.hpp> + #include <boost/fusion/include/deduce.hpp> + +[heading Synopsis] + namespace traits + { + template <typename T> + struct deduce + { + typedef __unspecified__ type; + }; + } + +[heading Example] + template <typename T> + struct holder + { + typename traits::deduce<T const &>::type element; + + holder(T const & a) + : element(a) + { } + }; + + template <typename T> + holder<T> make_holder(T const & a) + { + return holder<T>(a); + } + +[heading See also] +* __deduce_sequence__ + +[endsect] + +[section deduce_sequence] + +[heading Description] +Applies __element_conversion__ to each element in a __forward_sequence__. +The resulting type is a __random_access_sequence__ that provides a converting +constructor accepting the original type as its argument. + +[heading Header] + + #include <boost/fusion/support/deduce_sequence.hpp> + #include <boost/fusion/include/deduce_sequence.hpp> + +[heading Synopsis] + namespace traits + { + template <class Sequence> + struct deduce_sequence + { + typedef __unspecified__ type; + }; + } + +[heading Example] + template <class Seq> + struct holder + { + typename traits::deduce_sequence<Seq>::type element; + + holder(Seq const & a) + : element(a) + { } + }; + + template <typename T0, typename T1> + holder< __vector__<T0 const &, T1 const &> > + make_holder(T0 const & a0, T1 const & a1) + { + typedef __vector__<T0 const &, T1 const &> arg_vec_t; + return holder<arg_vec_t>( arg_vec_t(a0,a1) ); + } + +[heading See also] +* __deduce__ + +[endsect] + +[section pair] + +[heading Description] + +Fusion `pair` type is a half runtime pair. A half runtime pair is similar +to a __std_pair__, but, unlike __std_pair__, the first type does not have data. +It is used as elements in __map__\ s, for example. + +[heading Synopsis] + + template <typename First, typename Second> + struct pair; + + namespace result_of + { + template <typename Pair> + struct first; + + template <typename Pair> + struct second; + + template <typename First, typename Second> + struct make_pair; + } + + template <typename First, typename Second> + typename result_of::make_pair<First,Second>::type + make_pair(Second const &); + +[heading Template parameters] + +[table + [[Parameter] [Description]] + [[First] [The first type. This is purely a type. No data is held.]] + [[Second] [The second type. This contains data.]] +] + +[variablelist Notation + [[`P`] [Fusion pair type]] + [[`p`, `p2`] [Fusion pairs]] + [[`F`, `S`] [Arbitrary types]] + [[`s`] [Value of type `S`]] + [[`o`] [Output stream]] + [[`i`] [Input stream]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`P::first_type`] [The type of the first template parameter, `F`, equivalent to + `result_of::first<P>::type`. ]] + [[`P::second_type`] [The type of the second template parameter, `S`, equivalent to + `result_of::second<P>::type`. ]] + [[`P()`] [Default construction.]] + [[`P(s)`] [Construct a pair given value for the second type, `s`.]] + [[`P(p2)`] [Copy constructs a pair from another pair, `p2`.]] + [[`p.second`] [Get the data from `p1`.]] + [[`p = p2`] [Assigns a pair, `p1`, from another pair, `p2`.]] + [[make_pair<F>(s)] [Make a pair given the first type, `F`, and a value for + the second type, `s`. The second type assumes the type of `s`]] + [[`o << p`] [Output `p` to output stream, `o`.]] + [[`i >> p`] [Input `p` from input stream, `i`.]] + [[`p == p2`] [Tests two pairs for equality.]] + [[`p != p2`] [Tests two pairs for inequality.]] +] + +[heading Header] + + #include <boost/fusion/support/pair.hpp> + #include <boost/fusion/include/pair.hpp> + +[heading Example] + + pair<int, char> p('X'); + std::cout << p << std::endl; + std::cout << make_pair<int>('X') << std::endl; + assert((p == make_pair<int>('X'))); + +[endsect] + +[endsect] + diff --git a/libs/fusion/doc/tuple.qbk b/libs/fusion/doc/tuple.qbk new file mode 100644 index 000000000..3be81bbeb --- /dev/null +++ b/libs/fusion/doc/tuple.qbk @@ -0,0 +1,272 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section Tuple] + +The TR1 technical report describes extensions to the C++ standard library. +Many of these extensions will be considered for the next +iteration of the C++ standard. TR1 describes a tuple type, and +support for treating `std::pair` as a type of tuple. + +Fusion provides full support for the __tr1__tuple__ interface, and the extended +uses of `std::pair` described in the TR1 document. + +[section Class template tuple] +Fusion's implementation of the __tr1__tuple__ is also a fusion __forward_sequence__. +As such the fusion tuple type provides a lot of functionality beyond that required by TR1. + +Currently tuple is basically a synonym for __vector__, although this may be changed +in future releases of fusion. + +[heading Synopsis] + template< + typename T1 = __unspecified__, + typename T2 = __unspecified__, + ... + typename TN = __unspecified__> + class tuple; + +/tuple.hpp> + +[section Construction] + +[heading Description] +The __tr1__tuple__ type provides a default constructor, a constructor that takes initializers for all of its elements, a copy constructor, and a converting copy constructor. The details of the various constructors are described in this section. + +[heading Specification] + +[variablelist Notation + [[`T1 ... TN`, `U1 ... UN`][Tuple element types]] + [[`P1 ... PN`] [Parameter types]] + [[`Ti`, `Ui`] [The type of the `i`th element of a tuple]] + [[`Pi`] [The type of the `i`th parameter]] +] + + tuple(); + +[*Requirements]: Each `Ti` is default constructable. + +[*Semantics]: Default initializes each element of the tuple. + + tuple(P1,P2,...,PN); + +[*Requirements]: Each `Pi` is `Ti` if `Ti` is a reference type, `const Ti&` otherwise. + +[*Semantics]: Copy initializes each element with the corresponding parameter. + + tuple(const tuple& t); + +[*Requirements]: Each `Ti` should be copy constructable. + +[*Semantics]: Copy constructs each element of `*this` with the corresponding element of `t`. + + template<typename U1, typename U2, ..., typename UN> + tuple(const tuple<U1, U2, ..., UN>& t); + +[*Requirements]: Each `Ti` shall be constructible from the corresponding `Ui`. + +[*Semantics]: Constructs each element of `*this` with the corresponding element of `t`. + +[endsect] + +[section Tuple creation functions] + +[heading Description] +TR1 describes 2 utility functions for creating __tr1__tuple__s. `make_tuple` builds a tuple out of it's argument list, and `tie` builds a tuple of references to it's arguments. The details of these creation functions are described in this section. + +[heading Specification] + + template<typename T1, typename T2, ..., typename TN> + tuple<V1, V2, ..., VN> make_tuple(const T1& t1, const T2& t2, ..., const TN& tn); + +Where `Vi` is `X&` if the cv-unqualified type `Ti` is `reference_wrapper<X>`, otherwise `Vi` is `Ti`. + +[*Returns]: `tuple<V1, V2, ..., VN>(t1, t2, ..., tN)` + + template<typename T1, typename T2, ..., typename TN> + tuple<T1&, T2&, ..., TN&> tie(T1& t1, T2& t2, ..., TN& tn); + +[*Returns]: tuple<T1&, T2&, ..., TN&>(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has has no effect. + +[endsect] + +[section Tuple helper classes] + +[heading Description] +The __tr1__tuple__ provides 2 helper traits, for compile time access to the tuple size, and the element types. + +[heading Specification] + + tuple_size<T>::value + +[*Requires]: `T` is any fusion sequence type, including `tuple`. + +[*Type]: __mpl_integral_constant__ + +[*Value]: The number of elements in the sequence. Equivalent to `__result_of_size__<T>::type`. + + tuple_element<I, T>::type + +[*Requires]: `T` is any fusion sequence type, including `tuple`. `0 <= I < N` or the program is ill formed. + +[*Value]: The type of the `I`th element of `T`. Equivalent to `__result_of_value_at__<I,T>::type`. + +[endsect] + +[section Element access] + +[heading Description] +The __tr1__tuple__ provides the `get` function to provide access to it's elements by zero based numeric index. + +[heading Specification] + template<int I, T> + RJ get(T& t); + +[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds. +`T` is any fusion sequence type, including `tuple`. + +[*Return type]: `RJ` is equivalent to `__result_of_at_c__<I,T>::type`. + +[*Returns]: A reference to the `I`th element of `T`. + + template<int I, typename T> + PJ get(T const& t); + +[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds. +`T` is any fusion sequence type, including `tuple`. + +[*Return type]: `PJ` is equivalent to `__result_of_at_c__<I,T>::type`. + +[*Returns]: A const reference to the `I`th element of `T`. + +[endsect] + +[section Relational operators] + +[heading Description] +The __tr1__tuple__ provides the standard boolean relational operators. + +[heading Specification] + +[variablelist Notation + [[`T1 ... TN`, `U1 ... UN`][Tuple element types]] + [[`P1 ... PN`] [Parameter types]] + [[`Ti`, `Ui`] [The type of the `i`th element of a tuple]] + [[`Pi`] [The type of the `i`th parameter]] +] + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator==( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns `true` if and only if `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` for all `i`. +For any 2 zero length tuples `e` and `f`, `e == f` returns `true`. + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator<( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) < __tuple_get__<i>(rhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns the lexicographical comparison of between `lhs` and `rhs`. + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator!=( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns `!(lhs == rhs)`. + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator<=( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(rhs) < __tuple_get__<i>(lhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns `!(rhs < lhs)` + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator>( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(rhs) < __tuple_get__<i>(lhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns `rhs < lhs`. + + template<typename T1, typename T2, ..., typename TN, + typename U1, typename U2, ..., typename UN> + bool operator>=( + const tuple<T1, T2, ..., TN>& lhs, + const tuple<U1, U2, ..., UN>& rhs); + +[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) < __tuple_get__<i>(rhs)` is a valid +expression returning a type that is convertible to `bool`. + +[*Semantics]: Returns `!(lhs < rhs)`. + +[endsect] + +[endsect] + +[section Pairs] + +[heading Description] +The __tr1__tuple__ interface is specified to provide uniform access to `std::pair` as if it were a 2 element tuple. + +[heading Specification] + + tuple_size<std::pair<T1, T2> >::value + +[*Type]: An __mpl_integral_constant__ + +[*Value]: Returns 2, the number of elements in a pair. + + tuple_element<0, std::pair<T1, T2> >::type + +[*Type]: `T1` + +[*Value]: Returns the type of the first element of the pair + + tuple_element<1, std::pair<T1, T2> >::type + +[*Type]: `T2` + +[*Value]: Returns thetype of the second element of the pair + + template<int I, typename T1, typename T2> + P& get(std::pair<T1, T2>& pr); + + template<int I, typename T1, typename T2> + const P& get(const std::pair<T1, T2>& pr); + +[*Type]: If `I == 0` `P` is `T1`, else if `I == 1` `P` is `T2` else the program is ill-formed. + +[*Returns: `pr.first` if `I == 0` else `pr.second`. + +[endsect] + +[endsect] + diff --git a/libs/fusion/doc/view.qbk b/libs/fusion/doc/view.qbk new file mode 100644 index 000000000..de39c6942 --- /dev/null +++ b/libs/fusion/doc/view.qbk @@ -0,0 +1,618 @@ +[/============================================================================== + Copyright (C) 2001-2011 Joel de Guzman + Copyright (C) 2006 Dan Marsden + + Use, modification and distribution is 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) +===============================================================================/] +[section View] + +Views are sequences that do not actually contain data, but instead impart +an alternative presentation over the data from one or more underlying +sequences. Views are proxies. They provide an efficient yet purely +functional way to work on potentially expensive sequence operations. Views +are inherently lazy. Their elements are only computed on demand only when +the elements of the underlying sequence(s) are actually accessed. Views' +lazy nature make them very cheap to copy and be passed around by value. + +[heading Header] + + #include <boost/fusion/view.hpp> + #include <boost/fusion/include/view.hpp> + +[section single_view] + +`single_view` is a view into a value as a single element sequence. + +[heading Header] + + #include <boost/fusion/view/single_view.hpp> + #include <boost/fusion/include/single_view.hpp> + +[heading Synopsis] + + template <typename T> + struct single_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T`] [Any type] []] +] + +[heading Model of] + +* __random_access_sequence__ + +[variablelist Notation + [[`S`] [A `single_view` type]] + [[`s`, `s2`] [Instances of `single_view`]] + [[`x`] [An instance of `T`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`S(x)`] [Creates a `single_view` from `x`.]] + [[`S(s)`] [Copy constructs a `single_view` from another `single_view`, `s`.]] + [[`s = s2`] [Assigns to a `single_view`, `s`, from another `single_view`, `s2`.]] +] + +[heading Example] + + single_view<int> view(3); + std::cout << view << std::endl; + +[endsect] + +[section filter_view] + +[heading Description] + +`filter_view` is a view into a subset of its underlying sequence's elements +satisfying a given predicate (an __mpl__ metafunction). The `filter_view` +presents only those elements for which its predicate evaluates to +`mpl::true_`. + +[heading Header] + + #include <boost/fusion/view/filter_view.hpp> + #include <boost/fusion/include/filter_view.hpp> + +[heading Synopsis] + + template <typename Sequence, typename Pred> + struct filter_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __forward_sequence__] []] + [[`Pred`] [Unary Metafunction + returning an `mpl::bool_`] []] +] + +[heading Model of] + +* __forward_sequence__ +* __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[variablelist Notation + [[`F`] [A `filter_view` type]] + [[`f`, `f2`] [Instances of `filter_view`]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in the implemented models. + +[table + [[Expression] [Semantics]] + [[`F(s)`] [Creates a `filter_view` given a sequence, `s`.]] + [[`F(f)`] [Copy constructs a `filter_view` from another `filter_view`, `f`.]] + [[`f = f2`] [Assigns to a `filter_view`, `f`, from another `filter_view`, `f2`.]] +] + +[heading Example] + + using boost::mpl::_; + using boost::mpl::not_; + using boost::is_class; + + typedef __vector__<std::string, char, long, bool, double> vector_type; + + vector_type v("a-string", '@', 987654, true, 6.6); + filter_view<vector_type const, not_<is_class<_> > > view(v); + std::cout << view << std::endl; + +[endsect] + +[section iterator_range] + +[heading Description] + +`iterator_range` presents a sub-range of its underlying sequence delimited +by a pair of iterators. + +[heading Header] + + #include <boost/fusion/view/iterator_range.hpp> + #include <boost/fusion/include/iterator_range.hpp> + +[heading Synopsis] + + template <typename First, typename Last> + struct iterator_range; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`First`] [A fusion __iterator__] []] + [[`Last`] [A fusion __iterator__] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. +* __associative_sequence__ if `First` and `Last` implement the __associative_iterator__ model. + +[variablelist Notation + [[`IR`] [An `iterator_range` type]] + [[`f`] [An instance of `First`]] + [[`l`] [An instance of `Last`]] + [[`ir`, `ir2`] [Instances of `iterator_range`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in the implemented models. + +[table + [[Expression] [Semantics]] + [[`IR(f, l)`] [Creates an `iterator_range` given iterators, `f` and `l`.]] + [[`IR(ir)`] [Copy constructs an `iterator_range` from another `iterator_range`, `ir`.]] + [[`ir = ir2`] [Assigns to a `iterator_range`, `ir`, from another `iterator_range`, `ir2`.]] +] + +[heading Example] + + char const* s = "Ruby"; + typedef __vector__<int, char, double, char const*> vector_type; + vector_type vec(1, 'x', 3.3, s); + + typedef __result_of_begin__<vector_type>::type A; + typedef __result_of_end__<vector_type>::type B; + typedef __result_of_next__<A>::type C; + typedef __result_of_prior__<B>::type D; + + C c(vec); + D d(vec); + + iterator_range<C, D> range(c, d); + std::cout << range << std::endl; + +[endsect] + +[section joint_view] + +[heading Description] + +`joint_view` presents a view which is a concatenation of two sequences. + +[heading Header] + + #include <boost/fusion/view/joint_view.hpp> + #include <boost/fusion/include/joint_view.hpp> + +[heading Synopsis] + + template <typename Sequence1, typename Sequence2> + struct joint_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence1`] [A __forward_sequence__] []] + [[`Sequence2`] [A __forward_sequence__] []] +] + +[heading Model of] + +* __forward_sequence__ +* __associative_sequence__ if `Sequence1` and `Sequence2` implement the __associative_sequence__ model. + +[variablelist Notation + [[`JV`] [A `joint_view` type]] + [[`s1`] [An instance of `Sequence1`]] + [[`s2`] [An instance of `Sequence2`]] + [[`jv`, `jv2`] [Instances of `joint_view`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in the implemented models. + +[table + [[Expression] [Semantics]] + [[`JV(s1, s2)`] [Creates a `joint_view` given sequences, `s1` and `s2`.]] + [[`JV(jv)`] [Copy constructs a `joint_view` from another `joint_view`, `jv`.]] + [[`jv = jv2`] [Assigns to a `joint_view`, `jv`, from another `joint_view`, `jv2`.]] +] + +[heading Example] + + __vector__<int, char> v1(3, 'x'); + __vector__<std::string, int> v2("hello", 123); + joint_view< + __vector__<int, char> + , __vector__<std::string, int> + > view(v1, v2); + std::cout << view << std::endl; + +[endsect] + +[section zip_view] + +[heading Description] + +`zip_view` presents a view which iterates over a collection of __sequence__(s) in parallel. A `zip_view` +is constructed from a __sequence__ of references to the component __sequence__s. + +[heading Header] + + #include <boost/fusion/view/zip_view.hpp> + #include <boost/fusion/include/zip_view.hpp> + +[heading Synopsis] + + template <typename Sequences> + struct zip_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequences`] [A __forward_sequence__ of references to other Fusion __sequence__s] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. + +[variablelist Notation + [[`ZV`] [A `zip_view` type]] + [[`s`] [An instance of `Sequences`]] + [[`zv1`, `zv2`] [Instances of `ZV`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`ZV(s)`] [Creates a `zip_view` given a sequence of references to the component __sequence__s.]] + [[`ZV(zv1)`] [Copy constructs a `zip_view` from another `zip_view`, `zv`.]] + [[`zv1 = zv2`] [Assigns to a `zip_view`, `zv`, from another `zip_view`, `zv2`.]] +] + +[heading Example] + typedef __vector__<int,int> vec1; + typedef __vector__<char,char> vec2; + vec1 v1(1,2); + vec2 v2('a','b'); + typedef __vector__<vec1&, vec2&> sequences; + std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b)) + +[endsect] + +[section transform_view] + +The unary version of `transform_view` presents a view of its underlying +sequence given a unary function object or function pointer. The binary +version of `transform_view` presents a view of 2 underlying sequences, +given a binary function object or function pointer. The `transform_view` +inherits the traversal characteristics (see __traversal_concept__) of +its underlying sequence or sequences. + +[heading Header] + + #include <boost/fusion/view/transform_view.hpp> + #include <boost/fusion/include/transform_view.hpp> + +[heading Synopsis] + +[*Unary Version] + + template <typename Sequence, typename F1> + struct transform_view; + +[*Binary Version] + + template <typename Sequence1, typename Sequence2, typename F2> + struct transform_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __forward_sequence__] []] + [[`Sequence1`] [A __forward_sequence__] []] + [[`Sequence2`] [A __forward_sequence__] []] + [[`F1`] [A unary function object or function pointer. `__boost_result_of_call__<F1(E)>::type` is the return type of an instance of `F1` when called with a value of each element type `E` in the input sequence.] []] + [[`F2`] [A binary function object or function pointer. `__boost_result_of_call__<F2(E1, E2)>::type` is the return type of an instance of `F2` when called with a value of each corresponding pair of element type `E1` and `E2` in the input sequences.] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. + +[variablelist Notation + [[`TV`] [A `transform_view` type]] + [[`BTV`] [A binary `transform_view` type]] + [[`UTV`] [A unary `transform_view` type]] + [[`f1`] [An instance of `F1`]] + [[`f2`] [An instance of `F2`]] + [[`s`] [An instance of `Sequence`]] + [[`s1`] [An instance of `Sequence1`]] + [[`s2`] [An instance of `Sequence2`]] + [[`tv`, `tv2`] [Instances of `transform_view`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence or sequences. + +[table + [[Expression] [Semantics]] + [[`UTV(s, f1)`] [Creates a unary `transform_view` given sequence, + `s` and unary function object or function pointer, `f1`.]] + [[`BTV(s1, s2, f2)`] [Creates a binary `transform_view` given sequences, `s1` and `s2` + and binary function object or function pointer, `f2`.]] + [[`TV(tv)`] [Copy constructs a `transform_view` from another `transform_view`, `tv`.]] + [[`tv = tv2`] [Assigns to a `transform_view`, `tv`, from another `transform_view`, `tv2`.]] +] + +[heading Example] + + struct square + { + template<typename Sig> + struct result; + + template<typename U> + struct result<square(U)> + : remove_reference<U> + {}; + + template <typename T> + T operator()(T x) const + { + return x * x; + } + }; + + typedef __vector__<int, short, double> vector_type; + vector_type vec(2, 5, 3.3); + + transform_view<vector_type, square> transform(vec, square()); + std::cout << transform << std::endl; + +[endsect] + +[section reverse_view] + +`reverse_view` presents a reversed view of underlying sequence. The first +element will be its last and the last element will be its first. + +[heading Header] + + #include <boost/fusion/view/reverse_view.hpp> + #include <boost/fusion/include/reverse_view.hpp> + +[heading Synopsis] + + template <typename Sequence> + struct reverse_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __bidirectional_sequence__] []] +] + +[heading Model of] + +* A model of __bidirectional_sequence__ if `Sequence` is a __bidirectional_sequence__ +else, __random_access_sequence__ if `Sequence` is a __random_access_sequence__. +* __associative_sequence__ if `Sequence` implements the __associative_sequence__ model. + +[variablelist Notation + [[`RV`] [A `reverse_view` type]] + [[`s`] [An instance of `Sequence`]] + [[`rv`, `rv2`] [Instances of `reverse_view`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in the implemented models. + +[table + [[Expression] [Semantics]] + [[`RV(s)`] [Creates a unary `reverse_view` given sequence, `s`.]] + [[`RV(rv)`] [Copy constructs a `reverse_view` from another `reverse_view`, `rv`.]] + [[`rv = rv2`] [Assigns to a `reverse_view`, `rv`, from another `reverse_view`, `rv2`.]] +] + +[heading Example] + + typedef __vector__<int, short, double> vector_type; + vector_type vec(2, 5, 3.3); + + reverse_view<vector_type> reverse(vec); + std::cout << reverse << std::endl; + +[endsect] + +[section nview] + +[heading Description] + +`nview` presents a view which iterates over a given __sequence__ in a specified order. +An `nview` is constructed from an arbitrary __sequence__ and a list of indicies specifying +the elements to iterate over. + +[heading Header] + + #include <boost/fusion/view/nview.hpp> + #include <boost/fusion/include/nview.hpp> + +[heading Synopsis] + + template <typename Sequence, typename Indicies> + struct nview; + + template <typename Sequence, int I1, int I2 = -1, ...> + typename result_of::nview<Sequence, I1, I2, ...>::type + as_nview(Sequence& s); + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [An arbitrary Fusion __forward_sequence__] + []] + [[`Indicies`] [A `mpl::vector_c<int, ...>` holding the indicies defining + the required iteration order.] []] + [[`I1`, `I2`, `I3`...] [A list of integers specifying the required + iteration order.] [`INT_MAX` for `I2`, `I3`...]] +] + +[heading Model of] + +* __random_access_sequence__ (see __traversal_concept__) + +[variablelist Notation + [[`NV`] [A `nview` type]] + [[`s`] [An instance of `Sequences`]] + [[`nv1`, `nv2`] [Instances of `NV`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`NV(s)`] [Creates an `nview` given a sequence and a list of indicies.]] + [[`NV(nv1)`] [Copy constructs an `nview` from another `nview`, `nv1`.]] + [[`nv1 = nv2`] [Assigns to an `nview`, `nv1`, from another `nview`, `nv2`.]] +] + +The `nview` internally stores a Fusion __vector__ of references to the elements +of the original Fusion __sequence__ + +[heading Example] + typedef __vector__<int, char, double> vec; + typedef mpl::vector_c<int, 2, 1, 0, 2, 0> indicies; + + vec v1(1, 'c', 2.0); + + std::cout << nview<vec, indicies>(v1) << std::endl; // (2.0 c 1 2.0 1) + std::cout << as_nview<2, 1, 1, 0>(v1) << std::endl; // (2.0 c c 1) + +[endsect] + + +[section repetitive_view] + +[heading Description] + +`repetitive_view` presents a view which iterates over a given +__sequence__ repeatedly. Because a `repetitive_view` +has infinite length, it can only be used when some external +condition determines the end. Thus, initializing a fixed +length sequence with a `repetitive_view` is okay, but +printing a `repetitive_view` to `std::cout` is not. + +[heading Header] + + #include <boost/fusion/view/repetitive_view.hpp> + #include <boost/fusion/include/repetitive_view.hpp> + +[heading Synopsis] + + template <typename Sequence> + struct repetitive_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [An arbitrary Fusion __forward_sequence__] + []] +] + +[variablelist Notation + [[`RV`] [A `repetitive_view` type]] + [[`s`] [An instance of `Sequences`]] + [[`rv`, `rv1`, `rv2`] [Instances of `RV`]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Return Type] [Semantics]] + [[`RV(s)`] [] [Creates an `repetitive_view` given the underlying sequence.]] + [[`RV(rv1)`] [] [Copy constructs an `repetitive_view` from another `repetitive_view`, `rv1`.]] + [[`rv1 = rv2`] [] [Assigns to a `repetitive_view`, `rv1`, from another `repetitive_view`, `rv2`.]] + [[`__begin__(rv)`] [__forward_iterator__] []] + [[`__end__(rv)`] [__forward_iterator__] [Creates an unreachable iterator (since the sequnce is infinite)]] +] + +[heading Result Type Expressions] + +[table + [[Expression]] + [[`__result_of_begin__<RV>::type`]] + [[`__result_of_end__<RV>::type`]] +] + +[heading Example] + typedef __vector__<int, char, double> vec1; + typedef __vector__<int, char, double, int, char> vec2; + + vec1 v1(1, 'c', 2.0); + vec2 v2(repetitive_view<vec1>(v1)); + + std::cout << v2 << std::endl; // 1, 'c', 2.0, 1, 'c' + +[endsect] + +[endsect] diff --git a/libs/fusion/example/cookbook/do_the_bind.cpp b/libs/fusion/example/cookbook/do_the_bind.cpp new file mode 100644 index 000000000..ac5baee4d --- /dev/null +++ b/libs/fusion/example/cookbook/do_the_bind.cpp @@ -0,0 +1,268 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). + + Problem: + + How to "do the Bind?" + + This recipe shows how to implement a function binder, similar to + Boost.Bind based on the Functional module of Fusion. + + It works as follows: + + 'bind' is a global, stateless function object. It is implemented in + fused form (fused_binder) and transformed into a variadic function + object. When called, 'bind' returns another function object, which + holds the arguments of the call to 'bind'. It is, again, implemented + in fused form (fused_bound_function) and transformed into unfused + form. +==============================================================================*/ + + +#include <boost/fusion/functional/invocation/invoke.hpp> +#include <boost/fusion/functional/adapter/unfused.hpp> +#include <boost/fusion/support/deduce_sequence.hpp> + +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/algorithm/transformation/pop_front.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/view/filter_view.hpp> + +#include <boost/functional/forward_adapter.hpp> +#include <boost/functional/lightweight_forward_adapter.hpp> + +#include <boost/type_traits/remove_reference.hpp> + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/max.hpp> +#include <boost/mpl/next.hpp> + +#include <boost/ref.hpp> +#include <iostream> +#include <typeinfo> + +namespace impl +{ + namespace fusion = boost::fusion; + namespace traits = boost::fusion::traits; + namespace result_of = boost::fusion::result_of; + namespace mpl = boost::mpl; + using mpl::placeholders::_; + + // Placeholders (we inherit from mpl::int_, so we can use placeholders + // as indices for fusion::at, later) + template <int I> struct placeholder : mpl::int_<I> { }; + + // A traits class to find out whether T is a placeholeder + template <typename T> struct is_placeholder : mpl::false_ { }; + template <int I> struct is_placeholder< placeholder<I> > : mpl::true_ { }; + template <int I> struct is_placeholder< placeholder<I> & > : mpl::true_ { }; + template <int I> struct is_placeholder< placeholder<I> const > : mpl::true_ { }; + template <int I> struct is_placeholder< placeholder<I> const & > : mpl::true_ { }; + + // This class template provides a Polymorphic Function Object to be used + // with fusion::transform. It is applied to the sequence of arguments that + // describes the binding and holds a reference to the sequence of arguments + // from the final call. + template<class FinalArgs> struct argument_transform + { + FinalArgs const & ref_final_args; + public: + + explicit argument_transform(FinalArgs const & final_args) + : ref_final_args(final_args) + { } + + // A placeholder? Replace it with an argument from the final call... + template <int Index> + inline typename result_of::at_c<FinalArgs const, Index>::type + operator()(placeholder<Index> const &) const + { + return fusion::at_c<Index>(this->ref_final_args); + } + // ...just return the bound argument, otherwise. + template <typename T> inline T & operator()(T & bound) const + { + return bound; + } + + template <typename Signature> + struct result; + + template <class Self, typename T> + struct result< Self (T) > + : mpl::eval_if< is_placeholder<T>, + result_of::at<FinalArgs,typename boost::remove_reference<T>::type>, + mpl::identity<T> + > + { }; + }; + + // Fused implementation of the bound function, the function object + // returned by bind + template <class BindArgs> class fused_bound_function + { + // Transform arguments to be held by value + typedef typename traits::deduce_sequence<BindArgs>::type bound_args; + + bound_args fsq_bind_args; + public: + + fused_bound_function(BindArgs const & bind_args) + : fsq_bind_args(bind_args) + { } + + template <typename Signature> + struct result; + + template <class FinalArgs> + struct result_impl + : result_of::invoke< typename result_of::front<bound_args>::type, + typename result_of::transform< + typename result_of::pop_front<bound_args>::type, + argument_transform<FinalArgs> const + >::type + > + { }; + + template <class Self, class FinalArgs> + struct result< Self (FinalArgs) > + : result_impl< typename boost::remove_reference<FinalArgs>::type > + { }; + + template <class FinalArgs> + inline typename result_impl<FinalArgs>::type + operator()(FinalArgs const & final_args) const + { + return fusion::invoke( fusion::front(this->fsq_bind_args), + fusion::transform( fusion::pop_front(this->fsq_bind_args), + argument_transform<FinalArgs>(final_args) ) ); + } + // Could add a non-const variant - omitted for readability + + }; + + // Find the number of placeholders in use + struct n_placeholders + { + struct fold_op + { + template <typename Sig> struct result; + template <class S, class A, class B> struct result< S(A &,B &) > + : mpl::max<A,B> { }; + }; + struct filter_pred + { + template <class X> struct apply : is_placeholder<X> { }; + }; + + template <typename Seq> + struct apply + : mpl::next< typename result_of::fold< + fusion::filter_view<Seq,filter_pred>, mpl::int_<-1>, fold_op + >::type>::type + { }; + }; + + // Fused implementation of the 'bind' function + struct fused_binder + { + template <class Signature> + struct result; + + template <class BindArgs, + int Placeholders = n_placeholders::apply<BindArgs>::value> + struct result_impl + { + typedef boost::forward_adapter<fusion::unfused< + fused_bound_function<BindArgs>,!Placeholders>,Placeholders> type; + }; + + template <class Self, class BindArgs> + struct result< Self (BindArgs) > + : result_impl< typename boost::remove_reference<BindArgs>::type > + { }; + + template <class BindArgs> + inline typename result_impl< BindArgs >::type + operator()(BindArgs & bind_args) const + { + return typename result< void(BindArgs) >::type( + fusion::unfused< fused_bound_function<BindArgs>, + ! n_placeholders::apply<BindArgs>::value >(bind_args) ); + } + }; + + // The binder's unfused type. We use lightweght_forward_adapter to make + // that thing more similar to Boost.Bind. Because of that we have to use + // Boost.Ref (below in the sample code) + typedef boost::lightweight_forward_adapter< fusion::unfused<fused_binder> > binder; +} + +// Placeholder globals +impl::placeholder<0> const _1_ = impl::placeholder<0>(); +impl::placeholder<1> const _2_ = impl::placeholder<1>(); +impl::placeholder<2> const _3_ = impl::placeholder<2>(); +impl::placeholder<3> const _4_ = impl::placeholder<3>(); + +// The bind function is a global, too +impl::binder const bind = impl::binder(); + + +// OK, let's try it out: + +struct func +{ + typedef int result_type; + + inline int operator()() const + { + std::cout << "operator()" << std::endl; + return 0; + } + + template <typename A> + inline int operator()(A const & a) const + { + std::cout << "operator()(A const & a)" << std::endl; + std::cout << " a = " << a << " A = " << typeid(A).name() << std::endl; + return 1; + } + + template <typename A, typename B> + inline int operator()(A const & a, B & b) const + { + std::cout << "operator()(A const & a, B & b)" << std::endl; + std::cout << " a = " << a << " A = " << typeid(A).name() << std::endl; + std::cout << " b = " << b << " B = " << typeid(B).name() << std::endl; + return 2; + } +}; + +int main() +{ + func f; + int value = 42; + using boost::ref; + + int errors = 0; + + errors += !( bind(f)() == 0); + errors += !( bind(f,"Hi")() == 1); + errors += !( bind(f,_1_)("there.") == 1); + errors += !( bind(f,"The answer is",_1_)(12) == 2); + errors += !( bind(f,_1_,ref(value))("Really?") == 2); + errors += !( bind(f,_1_,_2_)("Dunno. If there is an answer, it's",value) == 2); + + return !! errors; +} + diff --git a/libs/fusion/example/cookbook/fill_em_up.cpp b/libs/fusion/example/cookbook/fill_em_up.cpp new file mode 100644 index 000000000..9b37aec8f --- /dev/null +++ b/libs/fusion/example/cookbook/fill_em_up.cpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2011 Joel de Guzman + + 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) + + Problem: + + So... you have an input sequence I and a target vector R. You want to + copy I into R. But, I may have less elements than the result vector R. + For those elements not in R, you want them to be default constructed. + + Here's a case: + + I: list<double, std::string> + R: vector<double, std::string, int, short> + + You want the elements at the right of I not in R (i.e. int, short) + default constructed. Those at the left, found in both I and R, you want + to simply copy from I. + + Of course you want to be able to handle any type of I and R. + +==============================================================================*/ + +// We'll use these containers as examples +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> + +// For doing I/O +#include <boost/fusion/sequence/io.hpp> + +// We'll use join and advance for processing +#include <boost/fusion/algorithm/transformation/join.hpp> +#include <boost/fusion/iterator/advance.hpp> + +// The fusion <--> MPL link header +#include <boost/fusion/mpl.hpp> + +// Same-o same-o +#include <iostream> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + // Let's specify our own tuple delimeters for nicer printing + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + // Here's your input sequence + typedef list<double, std::string> I; + I i(123.456, "Hello"); + + // Here's your output sequence. For now, it is just a typedef + typedef vector<double, std::string, int, short> R; + + // Let's get the sizes of the sequences. Yeah, you already know that. + // But with templates, you are simply given, say, R and I, corresponding + // to the types of the sequences. You'll have to deal with it generically. + static int const r_size = result_of::size<R>::value; + static int const i_size = result_of::size<I>::value; + + // Make sure that I has no more elements than R + // Be nice and catch obvious errors earlier rather than later. + // Without this assert, the mistake will still be caught by Fusion, + // but the error will point to somewhere really obscure. + BOOST_STATIC_ASSERT(i_size <= r_size); + + // Let's get the begin and end iterator types of the output sequence + // There's no actual vector yet. We just want to know the types. + typedef result_of::begin<R>::type r_begin; + typedef result_of::end<R>::type r_end; + + // Let's skip i_size elements from r_begin. Again, we just want to know the type. + typedef result_of::advance_c<r_begin, i_size>::type r_advance; + + // Now, make MPL iterators from r_advance and r_end. Ditto, just types. + typedef mpl::fusion_iterator<r_advance> mpl_r_advance; + typedef mpl::fusion_iterator<r_end> mpl_r_end; + + // Make an mpl::iterator_range from the MPL iterators we just created + // You guessed it! --just a type. + typedef mpl::iterator_range<mpl_r_advance, mpl_r_end> tail; + + // Use join to join the input sequence and our mpl::iterator_range + // Our mpl::iterator_range is 'tail'. Here, we'll actually instantiate + // 'tail'. Notice that this is a flyweight object, typically just 1 byte + // in size -- it doesn't really hold any data, but is a fully conforming + // sequence nonetheless. When asked to return its elements, 'tail' returns + // each element default constructed. Breeds like a rabbit! + + // Construct R from the joined sequences: + R r(join(i, tail())); + + // Then finally, print the result: + std::cout << r << std::endl; + + return 0; +} + diff --git a/libs/fusion/example/extension/Jamfile b/libs/fusion/example/extension/Jamfile new file mode 100644 index 000000000..aabe83021 --- /dev/null +++ b/libs/fusion/example/extension/Jamfile @@ -0,0 +1,20 @@ +#============================================================================== +# Copyright (c) 2003-2006 Joel de Guzman +# Copyright (c) 2006 Dan Marsden +# +# Use, modification and distribution is 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) +#============================================================================== + +# bring in rules for testing +import testing ; + +{ + test-suite example : + + [ run test_example.cpp : : : : ] + [ run triple.cpp : : : : ] + ; +} + diff --git a/libs/fusion/example/extension/detail/advance_impl.hpp b/libs/fusion/example/extension/detail/advance_impl.hpp new file mode 100644 index 000000000..0d7781237 --- /dev/null +++ b/libs/fusion/example/extension/detail/advance_impl.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_ADVANCE_IMPL_20060222_2150) +#define BOOST_FUSION_ADVANCE_IMPL_20060222_2150 + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct advance_impl; + + template<> + struct advance_impl<example::example_struct_iterator_tag> + { + template<typename Iterator, typename N> + struct apply + { + typedef typename Iterator::struct_type struct_type; + typedef typename Iterator::index index; + typedef example::example_struct_iterator< + struct_type, index::value + N::value> type; + + static type + call(Iterator const& it) + { + return type(it.struct_); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/at_impl.hpp b/libs/fusion/example/extension/detail/at_impl.hpp new file mode 100644 index 000000000..605589305 --- /dev/null +++ b/libs/fusion/example/extension/detail/at_impl.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_20060223_2017) +#define BOOST_FUSION_AT_IMPL_20060223_2017 + +#include <string> +#include <boost/mpl/if.hpp> +#include <boost/mpl/int.hpp> +#include <boost/type_traits/is_const.hpp> + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct at_impl; + + template<> + struct at_impl<example::example_sequence_tag> + { + template<typename Sequence, typename Key> + struct apply; + + template<typename Sequence> + struct apply<Sequence, mpl::int_<0> > + { + typedef typename mpl::if_< + is_const<Sequence>, + std::string const&, + std::string&>::type type; + + static type + call(Sequence& seq) + { + return seq.name; + }; + }; + + template<typename Sequence> + struct apply<Sequence, mpl::int_<1> > + { + typedef typename mpl::if_< + is_const<Sequence>, + int const&, + int&>::type type; + + static type + call(Sequence& seq) + { + return seq.age; + }; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/at_key_impl.hpp b/libs/fusion/example/extension/detail/at_key_impl.hpp new file mode 100644 index 000000000..e925c62a0 --- /dev/null +++ b/libs/fusion/example/extension/detail/at_key_impl.hpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_KEY_IMPL_20060223_2017) +#define BOOST_FUSION_AT_KEY_IMPL_20060223_2017 + +#include <string> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> + +namespace fields +{ + struct name; + struct age; +} + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct at_key_impl; + + template<> + struct at_key_impl<example::example_sequence_tag> + { + template<typename Sequence, typename Key> + struct apply; + + template<typename Sequence> + struct apply<Sequence, fields::name> + { + typedef typename mpl::if_< + is_const<Sequence>, + std::string const&, + std::string&>::type type; + + static type + call(Sequence& seq) + { + return seq.name; + }; + }; + + template<typename Sequence> + struct apply<Sequence, fields::age> + { + typedef typename mpl::if_< + is_const<Sequence>, + int const&, + int&>::type type; + + static type + call(Sequence& seq) + { + return seq.age; + }; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/begin_impl.hpp b/libs/fusion/example/extension/detail/begin_impl.hpp new file mode 100644 index 000000000..a4296c59c --- /dev/null +++ b/libs/fusion/example/extension/detail/begin_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BEGIN_IMPL_20060222_2042) +#define BOOST_FUSION_BEGIN_IMPL_20060222_2042 + +#include "../example_struct_iterator.hpp" + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct begin_impl; + + template<> + struct begin_impl<example::example_sequence_tag> + { + template<typename Sequence> + struct apply + { + typedef example::example_struct_iterator<Sequence, 0> type; + + static type + call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/category_of_impl.hpp b/libs/fusion/example/extension/detail/category_of_impl.hpp new file mode 100644 index 000000000..b0bc7d90e --- /dev/null +++ b/libs/fusion/example/extension/detail/category_of_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_20060223_2037) +#define BOOST_FUSION_CATEGORY_OF_IMPL_20060223_2037 + +#include <boost/fusion/support/category_of.hpp> + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<> + struct category_of_impl<example::example_sequence_tag> + { + template<typename Sequence> + struct apply + { + struct type : random_access_traversal_tag, associative_tag {}; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/deref_data_impl.hpp b/libs/fusion/example/extension/detail/deref_data_impl.hpp new file mode 100644 index 000000000..c9907d5cd --- /dev/null +++ b/libs/fusion/example/extension/detail/deref_data_impl.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_DEREF_DATA_IMPL_HPP +#define BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_DEREF_DATA_IMPL_HPP + +namespace example +{ + struct example_struct_iterator_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct deref_data_impl; + + template<> + struct deref_data_impl<example::example_struct_iterator_tag> + : deref_impl<example::example_struct_iterator_tag> + {}; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/deref_impl.hpp b/libs/fusion/example/extension/detail/deref_impl.hpp new file mode 100644 index 000000000..7e515e9d2 --- /dev/null +++ b/libs/fusion/example/extension/detail/deref_impl.hpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_DEREF_IMPL_20060222_1952) +#define BOOST_FUSION_DEREF_IMPL_20060222_1952 + +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/mpl/if.hpp> + +#include <string> + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct deref_impl; + + template<> + struct deref_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 0> > + { + typedef typename mpl::if_< + is_const<Struct>, std::string const&, std::string&>::type type; + + static type + call(example::example_struct_iterator<Struct, 0> const& it) + { + return it.struct_.name; + } + }; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 1> > + { + typedef typename mpl::if_< + is_const<Struct>, int const&, int&>::type type; + + static type + call(example::example_struct_iterator<Struct, 1> const& it) + { + return it.struct_.age; + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/distance_impl.hpp b/libs/fusion/example/extension/detail/distance_impl.hpp new file mode 100644 index 000000000..b138cc4a1 --- /dev/null +++ b/libs/fusion/example/extension/detail/distance_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_DISTANCE_IMPL_20060223_0814) +#define BOOST_FUSION_DISTANCE_IMPL_20060223_0814 + +#include <boost/mpl/minus.hpp> + +namespace example +{ + struct example_struct_iterator_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct distance_impl; + + template<> + struct distance_impl<example::example_struct_iterator_tag> + { + template<typename First, typename Last> + struct apply + : mpl::minus<typename Last::index, typename First::index> + { + typedef apply<First, Last> self; + + static typename self::type + call(First const& first, Last const& last) + { + return typename self::type(); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/end_impl.hpp b/libs/fusion/example/extension/detail/end_impl.hpp new file mode 100644 index 000000000..749bb33a8 --- /dev/null +++ b/libs/fusion/example/extension/detail/end_impl.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_END_IMPL_20060222_2042) +#define BOOST_FUSION_END_IMPL_20060222_2042 + +#include "../example_struct_iterator.hpp" + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct end_impl; + + template<> + struct end_impl<example::example_sequence_tag> + { + template<typename Sequence> + struct apply + { + typedef example::example_struct_iterator<Sequence, 2> type; + + static type + call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/equal_to_impl.hpp b/libs/fusion/example/extension/detail/equal_to_impl.hpp new file mode 100644 index 000000000..8ab27649d --- /dev/null +++ b/libs/fusion/example/extension/detail/equal_to_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_EQUAL_TO_IMPL_20060223_1941) +#define BOOST_FUSION_EQUAL_TO_IMPL_20060223_1941 + +#include <boost/mpl/equal_to.hpp> + +namespace example +{ + struct example_struct_iterator_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct equal_to_impl; + + template<> + struct equal_to_impl<example::example_struct_iterator_tag> + { + template<typename It1, typename It2> + struct apply + : mpl::equal_to< + typename It1::index, + typename It2::index> + {}; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/has_key_impl.hpp b/libs/fusion/example/extension/detail/has_key_impl.hpp new file mode 100644 index 000000000..596827cef --- /dev/null +++ b/libs/fusion/example/extension/detail/has_key_impl.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_HAS_KEY_IMPL_20060223_2156) +#define BOOST_FUSION_HAS_KEY_IMPL_20060223_2156 + +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/or.hpp> + +namespace fields +{ + struct name; + struct age; +} + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct has_key_impl; + + template<> + struct has_key_impl<example::example_sequence_tag> + { + template<typename Sequence, typename Key> + struct apply + : mpl::or_< + is_same<Key, fields::name>, + is_same<Key, fields::age> > + {}; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/is_sequence_impl.hpp b/libs/fusion/example/extension/detail/is_sequence_impl.hpp new file mode 100644 index 000000000..e373342a7 --- /dev/null +++ b/libs/fusion/example/extension/detail/is_sequence_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_20060228_1946) +#define BOOST_FUSION_IS_SEQUENCE_IMPL_20060228_1946 + +#include <boost/mpl/bool.hpp> + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion +{ + namespace extension + { + template<typename Tag> + struct is_sequence_impl; + + template<> + struct is_sequence_impl<example::example_sequence_tag> + { + template<typename T> + struct apply : mpl::true_ {}; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/is_view_impl.hpp b/libs/fusion/example/extension/detail/is_view_impl.hpp new file mode 100644 index 000000000..b2344bf2d --- /dev/null +++ b/libs/fusion/example/extension/detail/is_view_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_VIEW_IMPL_200604227_2150) +#define BOOST_FUSION_IS_VIEW_IMPL_200604227_2150 + +#include <boost/mpl/bool.hpp> + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion +{ + namespace extension + { + template<typename Tag> + struct is_view_impl; + + template<> + struct is_view_impl<example::example_sequence_tag> + : boost::mpl::false_ + {}; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/key_of_impl.hpp b/libs/fusion/example/extension/detail/key_of_impl.hpp new file mode 100644 index 000000000..6a7a836d7 --- /dev/null +++ b/libs/fusion/example/extension/detail/key_of_impl.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_KEY_OF_IMPL_HPP +#define BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_KEY_OF_IMPL_HPP + +#include <boost/mpl/if.hpp> + +namespace fields +{ + struct name; + struct age; +} + +namespace example +{ + struct example_struct_iterator_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct key_of_impl; + + template<> + struct key_of_impl<example::example_struct_iterator_tag> + { + template<typename It> + struct apply + : mpl::if_c<!It::index::value, fields::name, fields::age> + {}; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/next_impl.hpp b/libs/fusion/example/extension/detail/next_impl.hpp new file mode 100644 index 000000000..8fbaa8b17 --- /dev/null +++ b/libs/fusion/example/extension/detail/next_impl.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_NEXT_IMPL_20060222_1859) +#define BOOST_FUSION_NEXT_IMPL_20060222_1859 + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct next_impl; + + template<> + struct next_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply + { + typedef typename Iterator::struct_type struct_type; + typedef typename Iterator::index index; + typedef example::example_struct_iterator<struct_type, index::value + 1> type; + + static type + call(Iterator const& i) + { + return type(i.struct_); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/prior_impl.hpp b/libs/fusion/example/extension/detail/prior_impl.hpp new file mode 100644 index 000000000..415692cee --- /dev/null +++ b/libs/fusion/example/extension/detail/prior_impl.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_PRIOR_IMPL_20060222_1944) +#define BOOST_FUSION_PRIOR_IMPL_20060222_1944 + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct prior_impl; + + template<> + struct prior_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply + { + typedef typename Iterator::struct_type struct_type; + typedef typename Iterator::index index; + typedef example::example_struct_iterator<struct_type, index::value - 1> type; + + static type + call(Iterator const& i) + { + return type(i.struct_); + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/size_impl.hpp b/libs/fusion/example/extension/detail/size_impl.hpp new file mode 100644 index 000000000..4dc6ec930 --- /dev/null +++ b/libs/fusion/example/extension/detail/size_impl.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_SIZE_IMPL_20060223_2033) +#define BOOST_FUSION_SIZE_IMPL_20060223_2033 + +#include <boost/mpl/int.hpp> + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct size_impl; + + template<> + struct size_impl<example::example_sequence_tag> + { + template<typename Sequence> + struct apply + : mpl::int_<2> + {}; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/value_at_impl.hpp b/libs/fusion/example/extension/detail/value_at_impl.hpp new file mode 100644 index 000000000..6a1d63ef2 --- /dev/null +++ b/libs/fusion/example/extension/detail/value_at_impl.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_20060223_2025) +#define BOOST_FUSION_VALUE_AT_IMPL_20060223_2025 + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct value_at_impl; + + template<> + struct value_at_impl<example::example_sequence_tag> + { + template<typename Sequence, typename N> + struct apply; + + template<typename Sequence> + struct apply<Sequence, mpl::int_<0> > + { + typedef std::string type; + }; + + template<typename Sequence> + struct apply<Sequence, mpl::int_<1> > + { + typedef int type; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/value_at_key_impl.hpp b/libs/fusion/example/extension/detail/value_at_key_impl.hpp new file mode 100644 index 000000000..cabc59aad --- /dev/null +++ b/libs/fusion/example/extension/detail/value_at_key_impl.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_KEY_IMPL_20060223_2025) +#define BOOST_FUSION_VALUE_AT_KEY_IMPL_20060223_2025 + +namespace fields +{ + struct name; + struct age; +} + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct value_at_key_impl; + + template<> + struct value_at_key_impl<example::example_sequence_tag> + { + template<typename Sequence, typename N> + struct apply; + + template<typename Sequence> + struct apply<Sequence, fields::name> + { + typedef std::string type; + }; + + template<typename Sequence> + struct apply<Sequence, fields::age> + { + typedef int type; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/value_of_data_impl.hpp b/libs/fusion/example/extension/detail/value_of_data_impl.hpp new file mode 100644 index 000000000..94cdcc307 --- /dev/null +++ b/libs/fusion/example/extension/detail/value_of_data_impl.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2009 Christopher Schmidt + + 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_VALUE_OF_DATA_IMPL_HPP +#define BOOST_FUSION_EXAMPLE_EXTENSION_DETAIL_VALUE_OF_DATA_IMPL_HPP + +namespace example +{ + struct example_struct_iterator_tag; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct value_of_data_impl; + + template<> + struct value_of_data_impl<example::example_struct_iterator_tag> + : value_of_impl<example::example_struct_iterator_tag> + {}; + } +}} + +#endif diff --git a/libs/fusion/example/extension/detail/value_of_impl.hpp b/libs/fusion/example/extension/detail/value_of_impl.hpp new file mode 100644 index 000000000..6fc7e161f --- /dev/null +++ b/libs/fusion/example/extension/detail/value_of_impl.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_OF_IMPL_20060223_1905) +#define BOOST_FUSION_VALUE_OF_IMPL_20060223_1905 + +#include <string> + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace extension + { + template<typename Tag> + struct value_of_impl; + + template<> + struct value_of_impl<example::example_struct_iterator_tag> + { + template<typename Iterator> + struct apply; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 0> > + { + typedef std::string type; + }; + + template<typename Struct> + struct apply<example::example_struct_iterator<Struct, 1> > + { + typedef int type; + }; + }; + } +}} + +#endif diff --git a/libs/fusion/example/extension/example_struct.hpp b/libs/fusion/example/extension/example_struct.hpp new file mode 100644 index 000000000..cbb058f59 --- /dev/null +++ b/libs/fusion/example/extension/example_struct.hpp @@ -0,0 +1,25 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_EXAMPLE_STRUCT) +#define BOOST_FUSION_EXAMPLE_STRUCT + +#include "./tag_of.hpp" +#include "./example_struct_iterator.hpp" +#include "./detail/begin_impl.hpp" +#include "./detail/end_impl.hpp" +#include "./detail/at_impl.hpp" +#include "./detail/value_at_impl.hpp" +#include "./detail/size_impl.hpp" +#include "./detail/category_of_impl.hpp" +#include "./detail/at_key_impl.hpp" +#include "./detail/value_at_key_impl.hpp" +#include "./detail/has_key_impl.hpp" +#include "./detail/is_sequence_impl.hpp" +#include "./detail/is_view_impl.hpp" + +#endif diff --git a/libs/fusion/example/extension/example_struct_iterator.hpp b/libs/fusion/example/extension/example_struct_iterator.hpp new file mode 100644 index 000000000..fa04f0856 --- /dev/null +++ b/libs/fusion/example/extension/example_struct_iterator.hpp @@ -0,0 +1,70 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_EXAMPLE_STRUCT_ITERATOR) +#define BOOST_FUSION_EXAMPLE_STRUCT_ITERATOR + +#include <boost/fusion/support/iterator_base.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/support/tag_of_fwd.hpp> +#include <boost/mpl/int.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/static_assert.hpp> + +#include "./detail/next_impl.hpp" +#include "./detail/prior_impl.hpp" +#include "./detail/deref_impl.hpp" +#include "./detail/advance_impl.hpp" +#include "./detail/distance_impl.hpp" +#include "./detail/value_of_impl.hpp" +#include "./detail/equal_to_impl.hpp" +#include "./detail/key_of_impl.hpp" +#include "./detail/value_of_data_impl.hpp" +#include "./detail/deref_data_impl.hpp" + +namespace example +{ + struct example_struct_iterator_tag; + + template<typename Struct, int Pos> + struct example_struct_iterator; +} + +namespace boost { namespace fusion { + + namespace traits + { + template<typename Struct, int Pos> + struct tag_of<example::example_struct_iterator<Struct, Pos> > + { + typedef example::example_struct_iterator_tag type; + }; + } +}} + +namespace example { + template<typename Struct, int Pos> + struct example_struct_iterator + : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> > + { + BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3); + typedef Struct struct_type; + typedef boost::mpl::int_<Pos> index; + + struct category + : boost::fusion::random_access_traversal_tag + , boost::fusion::associative_tag + {}; + + example_struct_iterator(Struct& str) + : struct_(str) {} + + Struct& struct_; + }; +} + +#endif diff --git a/libs/fusion/example/extension/example_struct_type.hpp b/libs/fusion/example/extension/example_struct_type.hpp new file mode 100644 index 000000000..e1d8e1754 --- /dev/null +++ b/libs/fusion/example/extension/example_struct_type.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_EXAMPLE_STRUCT_TYPE) +#define BOOST_FUSION_EXAMPLE_STRUCT_TYPE + +#include <string> + +namespace example +{ + struct example_struct + { + std::string name; + int age; + example_struct( + const std::string& n, + int a) + : name(n), age(a) + {} + }; +} + +#endif diff --git a/libs/fusion/example/extension/tag_of.hpp b/libs/fusion/example/extension/tag_of.hpp new file mode 100644 index 000000000..083b730c8 --- /dev/null +++ b/libs/fusion/example/extension/tag_of.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_TAG_OF_20060222_2052) +#define BOOST_FUSION_TAG_OF_20060222_2052 + +#include <boost/fusion/support/tag_of_fwd.hpp> +#include "./example_struct_type.hpp" + +namespace example +{ + struct example_sequence_tag; +} + +namespace boost { namespace fusion { + +namespace traits { + + template<> + struct tag_of<example::example_struct> + { + typedef example::example_sequence_tag type; + }; +}}} + +#endif diff --git a/libs/fusion/example/extension/test_example.cpp b/libs/fusion/example/extension/test_example.cpp new file mode 100644 index 000000000..581e2300f --- /dev/null +++ b/libs/fusion/example/extension/test_example.cpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include "./example_struct.hpp" +#include "./example_struct_type.hpp" +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/assert.hpp> + +int main() +{ + example::example_struct bert("bert", 99); + using namespace boost::fusion; + + BOOST_MPL_ASSERT((traits::is_associative<example::example_struct>)); + BOOST_MPL_ASSERT((traits::is_random_access<example::example_struct>)); + BOOST_MPL_ASSERT((traits::is_sequence<example::example_struct>)); + + BOOST_TEST(deref(begin(bert)) == "bert"); + BOOST_TEST(*next(begin(bert)) == 99); + BOOST_TEST(*prior(end(bert)) == 99); + BOOST_TEST(*advance_c<1>(begin(bert)) == 99); + BOOST_TEST(*advance_c<-1>(end(bert)) == 99); + BOOST_TEST(distance(begin(bert), end(bert)) == 2); + + typedef result_of::begin<example::example_struct>::type first; + typedef result_of::next<first>::type second; + BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int>)); + + BOOST_TEST(begin(bert) != end(bert)); + BOOST_TEST(advance_c<2>(begin(bert)) == end(const_cast<const example::example_struct&>(bert))); + + BOOST_TEST(at_c<0>(bert) == "bert"); + BOOST_TEST(at_c<1>(bert) == 99); + + BOOST_TEST(at_key<fields::name>(bert) == "bert"); + BOOST_TEST(at_key<fields::age>(bert) == 99); + + BOOST_TEST(has_key<fields::name>(bert)); + BOOST_TEST(has_key<fields::age>(bert)); + BOOST_TEST(!has_key<int>(bert)); + + BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<example::example_struct, 0>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<example::example_struct, 1>::type, int>)); + + BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<example::example_struct, fields::name>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<example::example_struct, fields::age>::type, int>)); + + BOOST_TEST(deref_data(begin(bert)) == "bert"); + BOOST_TEST(deref_data(next(begin(bert))) == 99); + + BOOST_TEST(size(bert) == 2); + + return boost::report_errors(); +} diff --git a/libs/fusion/example/extension/triple.cpp b/libs/fusion/example/extension/triple.cpp new file mode 100644 index 000000000..862740d5d --- /dev/null +++ b/libs/fusion/example/extension/triple.cpp @@ -0,0 +1,377 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Nathan Ridge + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ + +/*============================================================================= + An implementation of a std::pair like triple<T0, T1, T2> + We use fusion::sequence_facade and fusion::iterator_facade + to make our triple a fully conforming Boost.Fusion random + traversal sequence. +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/sequence/sequence_facade.hpp> +#include <boost/fusion/iterator/iterator_facade.hpp> +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> + +#include <boost/mpl/int.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/assert.hpp> + +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/is_same.hpp> + +#include <string> + +namespace mpl = boost::mpl; +namespace fusion = boost::fusion; + +namespace demo +{ + template<typename Seq, int N> + struct triple_iterator + : fusion::iterator_facade<triple_iterator<Seq, N>, + fusion::random_access_traversal_tag> + { + typedef mpl::int_<N> index; + typedef Seq sequence_type; + + triple_iterator(Seq& seq) + : seq_(seq) {} + + Seq& seq_; + + template<typename T> + struct value_of; + + template<typename Sq> + struct value_of<triple_iterator<Sq, 0> > + : mpl::identity<typename Sq::t0_type> + {}; + + template<typename Sq> + struct value_of<triple_iterator<Sq, 1> > + : mpl::identity<typename Sq::t1_type> + {}; + + template<typename Sq> + struct value_of<triple_iterator<Sq, 2> > + : mpl::identity<typename Sq::t2_type> + {}; + + template<typename T> + struct deref; + + template <typename Sq> + struct deref<triple_iterator<Sq, 0> > + { + typedef typename Sq::t0_type& type; + + static type + call(triple_iterator<Sq, 0> const& iter) + { + return iter.seq_.t0; + } + }; + + template <typename Sq> + struct deref<triple_iterator<Sq, 0> const> + { + typedef typename Sq::t0_type const& type; + + static type + call(triple_iterator<Sq, 0> const& iter) + { + return iter.seq_.t0; + } + }; + + template <typename Sq> + struct deref<triple_iterator<Sq, 1> > + { + typedef typename Sq::t1_type& type; + + static type + call(triple_iterator<Sq, 1> const& iter) + { + return iter.seq_.t1; + } + }; + + template <typename Sq> + struct deref<triple_iterator<Sq, 1> const> + { + typedef typename Sq::t1_type const& type; + + static type + call(triple_iterator<Sq, 1> const& iter) + { + return iter.seq_.t1; + } + }; + + template <typename Sq> + struct deref<triple_iterator<Sq, 2> > + { + typedef typename Sq::t2_type& type; + + static type + call(triple_iterator<Sq, 2> const& iter) + { + return iter.seq_.t2; + } + }; + + template <typename Sq> + struct deref<triple_iterator<Sq, 2> const> + { + typedef typename Sq::t2_type const& type; + + static type + call(triple_iterator<Sq, 2> const& iter) + { + return iter.seq_.t2; + } + }; + + template<typename It> + struct next + { + typedef triple_iterator< + typename It::sequence_type, It::index::value + 1> + type; + + static type call(It const& it) + { + return type(it.seq_); + } + }; + + template<typename It> + struct prior + { + typedef triple_iterator< + typename It::sequence_type, It::index::value - 1> + type; + + static type call(It const& it) + { + return type(it.seq_); + } + }; + + template<typename It1, typename It2> + struct distance + { + typedef typename mpl::minus< + typename It2::index, typename It1::index>::type + type; + + static type call(It1 const& it1, It2 const& it2) + { + return type(); + } + }; + + template<typename It, typename M> + struct advance + { + typedef triple_iterator< + typename It::sequence_type, + It::index::value + M::value> + type; + + static type call(It const& it) + { + return type(it.seq_); + } + }; + }; + + template<typename T0, typename T1, typename T2> + struct triple + : fusion::sequence_facade<triple<T0, T1, T2>, + fusion::random_access_traversal_tag> + { + triple(T0 const& t0, T1 const& t1, T2 const& t2) + : t0(t0), t1(t1), t2(t2) + {} + + template<typename Sq> + struct begin + { + typedef demo::triple_iterator<Sq, 0> type; + + static type call(Sq& sq) + { + return type(sq); + } + }; + + template<typename Sq> + struct end + { + typedef demo::triple_iterator<Sq, 3> type; + + static type call(Sq& sq) + { + return type(sq); + } + }; + + template<typename Sq> + struct size + : mpl::int_<3> + {}; + + template<typename Sq, typename N> + struct value_at + : value_at<Sq, mpl::int_<N::value> > + {}; + + template<typename Sq> + struct value_at<Sq, mpl::int_<0> > + { + typedef typename Sq::t0_type type; + }; + + template<typename Sq> + struct value_at<Sq, mpl::int_<1> > + { + typedef typename Sq::t1_type type; + }; + + template<typename Sq> + struct value_at<Sq, mpl::int_<2> > + { + typedef typename Sq::t2_type type; + }; + + template<typename Sq, typename N> + struct at + : at<Sq, mpl::int_<N::value> > + {}; + + template<typename Sq> + struct at<Sq, mpl::int_<0> > + { + typedef typename + mpl::if_< + boost::is_const<Sq> + , typename Sq::t0_type const& + , typename Sq::t0_type& + >::type + type; + + static type call(Sq& sq) + { + return sq.t0; + } + }; + + template<typename Sq> + struct at<Sq, mpl::int_<1> > + { + typedef typename + mpl::if_< + boost::is_const<Sq> + , typename Sq::t1_type const& + , typename Sq::t1_type& + >::type + type; + + static type call(Sq& sq) + { + return sq.t1; + } + }; + + template<typename Sq> + struct at<Sq, mpl::int_<2> > + { + typedef typename + mpl::if_< + boost::is_const<Sq> + , typename Sq::t2_type const& + , typename Sq::t2_type& + >::type + type; + + static type call(Sq& sq) + { + return sq.t2; + } + }; + + typedef T0 t0_type; + typedef T1 t1_type; + typedef T2 t2_type; + + T0 t0; + T1 t1; + T2 t2; + }; +} + +struct modifying_fold_functor +{ + template <typename T> + struct result + { + typedef bool type; + }; + + template <typename T> + bool operator()(bool b, T&) + { + return b; + } +}; + +struct nonmodifying_fold_functor +{ + template <typename T> + struct result + { + typedef bool type; + }; + + template <typename T> + bool operator()(bool b, const T&) + { + return b; + } +}; + +int main() +{ + typedef demo::triple<int, char, std::string> my_triple; + my_triple t(101, 'a', "hello"); + BOOST_TEST(*fusion::begin(t) == 101); + BOOST_TEST(*fusion::next(fusion::begin(t)) == 'a'); + BOOST_TEST(*fusion::prior(fusion::end(t)) == "hello"); + BOOST_TEST(fusion::distance(fusion::begin(t), fusion::end(t)) == 3); + BOOST_TEST(fusion::size(t) == 3); + BOOST_MPL_ASSERT((boost::is_same< + int, fusion::result_of::value_at_c<my_triple, 0>::type>)); + BOOST_MPL_ASSERT((boost::is_same< + char, fusion::result_of::value_at_c<my_triple, 1>::type>)); + BOOST_MPL_ASSERT((boost::is_same< + std::string, fusion::result_of::value_at_c<my_triple, 2>::type>)); + BOOST_TEST(fusion::at_c<0>(t) == 101); + BOOST_TEST(fusion::at_c<1>(t) == 'a'); + BOOST_TEST(fusion::at_c<2>(t) == "hello"); + BOOST_TEST(fusion::fold(t, true, modifying_fold_functor()) == true); + BOOST_TEST(fusion::fold(t, true, nonmodifying_fold_functor()) == true); + return boost::report_errors(); +} diff --git a/libs/fusion/example/performance/Jamfile b/libs/fusion/example/performance/Jamfile new file mode 100644 index 000000000..3b8c8ffcc --- /dev/null +++ b/libs/fusion/example/performance/Jamfile @@ -0,0 +1,20 @@ +#============================================================================== +# Copyright (c) 2003-2006 Joel de Guzman +# Copyright (c) 2006 Dan Marsden +# +# Use, modification and distribution is 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) +#============================================================================== +project fusion-performance ; + +exe accumulate : accumulate.cpp ; + +exe inner_product : inner_product.cpp ; + +exe inner_product2 : inner_product2.cpp ; + +exe sequence_efficiency : sequence_efficiency.cpp ; + +exe functional : functional.cpp ; + diff --git a/libs/fusion/example/performance/accumulate.cpp b/libs/fusion/example/performance/accumulate.cpp new file mode 100644 index 000000000..176dc4586 --- /dev/null +++ b/libs/fusion/example/performance/accumulate.cpp @@ -0,0 +1,357 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/array.hpp> +#include <boost/timer.hpp> + +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/adapted/array.hpp> + +#include <boost/type_traits/remove_reference.hpp> + +#include <algorithm> +#include <numeric> +#include <functional> +#include <iostream> +#include <cmath> +#include <limits> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +int const REPEAT_COUNT = 10; + +double const duration = 0.5; + +namespace +{ + template<int N> + double time_for_std_accumulate(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr; + std::generate(arr.begin(), arr.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::accumulate(arr.begin(), arr.end(), 0); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::accumulate(arr.begin(), arr.end(), 0); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } + + struct poly_add + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_add(Lhs,Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + rhs; + } + }; + + struct poly_mult + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_mult(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs * rhs; + } + }; + + template<int N> + double time_for_fusion_accumulate(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr; + std::generate(arr.begin(), arr.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate(arr, 0, poly_add()); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + std::cout << iter << " iterations" << std::endl; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate(arr, 0, poly_add()); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + std::cout << "."; + std::cout.flush(); + } + std::cout << i << std::endl; + return result / iter; + } + +#if 0 + template<int N> + double time_for_std_inner_product(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } + + template<int N> + double time_for_fusion_inner_product(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add()); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add()); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } + + struct poly_combine + { + template<typename Lhs, typename Rhs> + struct result + { + typedef Lhs type; + }; + + template<typename Lhs, typename Rhs> + typename result<Lhs,Rhs>::type + operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + boost::fusion::at_c<0>(rhs) * boost::fusion::at_c<1>(rhs); + } + }; + + template<int N> + double time_for_fusion_inner_product2(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::zip(arr1, arr2), 0, poly_combine()); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + std::cout << iter << " iterations" << std::endl; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::zip(arr1, arr2), 0, poly_combine()); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } +#endif +} + +int main() +{ + int total = 0; + int res; + std::cout << "short accumulate std test " << time_for_std_accumulate<8>(res) << std::endl; + total += res; + std::cout << "short accumulate fusion test " << time_for_fusion_accumulate<8>(res) << std::endl; + total += res; + + std::cout << "medium accumulate std test " << time_for_std_accumulate<64>(res) << std::endl; + total += res; + std::cout << "medium accumulate fusion test " << time_for_fusion_accumulate<64>(res) << std::endl; + total += res; + + std::cout << "long accumulate std test " << time_for_std_accumulate<128>(res) << std::endl; + total += res; + std::cout << "long accumulate fusion test " << time_for_fusion_accumulate<128>(res) << std::endl; + total += res; + +#if 0 + std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl; + total += res; + std::cout << "short inner_product fusion test " << time_for_fusion_inner_product<8>(res) << std::endl; + total += res; + std::cout << "short inner_product fusion 2 test " << time_for_fusion_inner_product2<8>(res) << std::endl; + total += res; + + std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl; + total += res; + std::cout << "medium inner_product fusion test " << time_for_fusion_inner_product<64>(res) << std::endl; + total += res; + std::cout << "medium inner_product fusion 2 test " << time_for_fusion_inner_product2<64>(res) << std::endl; + total += res; + + + std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl; + total += res; + std::cout << "long inner_product fusion test " << time_for_fusion_inner_product<128>(res) << std::endl; + total += res; + std::cout << "long inner_product fusion 2 test " << time_for_fusion_inner_product2<128>(res) << std::endl; + total += res; +#endif + + return total; +} diff --git a/libs/fusion/example/performance/functional.cpp b/libs/fusion/example/performance/functional.cpp new file mode 100644 index 000000000..9207a90d7 --- /dev/null +++ b/libs/fusion/example/performance/functional.cpp @@ -0,0 +1,307 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/functional/adapter/unfused.hpp> +#include <boost/fusion/functional/adapter/fused_function_object.hpp> + +#include <boost/functional/forward_adapter.hpp> +#include <boost/functional/lightweight_forward_adapter.hpp> + +#include <boost/utility/result_of.hpp> +#include <boost/config.hpp> +#include <boost/timer.hpp> +#include <algorithm> +#include <iostream> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +int const REPEAT_COUNT = 3; + +double const duration = 0.125; + + +namespace +{ + struct fused_sum + { + template <typename Seq> + int operator()(Seq const & seq) const + { + int state = 0; + return boost::fusion::fold(seq, state, sum_op()); + } + + typedef int result_type; + + private: + + struct sum_op + { + template <typename T> + int operator()(T const & elem, int value) const + { + return value + sizeof(T) * elem; + } + + template <typename T> + int operator()(T & elem, int value) const + { + elem += sizeof(T); + return value; + } + + typedef int result_type; + }; + }; + + struct unfused_sum + { + inline int operator()() const + { + return 0; + } + template<typename T0> + inline int operator()(T0 const & a0) const + { + return a0; + } + template<typename T0, typename T1> + inline int operator()(T0 const & a0, T1 const & a1) const + { + return a0 + a1; + } + template<typename T0, typename T1, typename T2> + inline int operator()(T0 const & a0, T1 const & a1, T2 a2) const + { + return a0 + a1 + a2; + } + template<typename T0, typename T1, typename T2, typename T3> + inline int operator()(T0 const & a0, T1 const & a1, T2 const & a2, T3 const & a3) const + { + return a0 + a1 + a2 + a3; + } + + typedef int result_type; + }; + + template<typename F> + double call_unfused(F const & func, int & j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i += func(); + i += func(0); + i += func(0,1); + i += func(0,1,2); + i += func(0,1,2,3); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = func(); j += i; + i = func(0); j += i; + i = func(0,1); j += i; + i = func(0,1,2); j += i; + i = func(0,1,2,3); j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + return result / iter; + } + + template<typename F> + double call_fused_ra(F const & func, int & j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + do + { + boost::fusion::vector<> v0; + boost::fusion::vector<int> v1(0); + boost::fusion::vector<int,int> v2(0,1); + boost::fusion::vector<int,int,int> v3(0,1,2); + boost::fusion::vector<int,int,int,int> v4(0,1,2,3); + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i += func(v0); + i += func(v1); + i += func(v2); + i += func(v3); + i += func(v4); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + boost::fusion::vector<> v0; + boost::fusion::vector<int> v1(0); + boost::fusion::vector<int,int> v2(0,1); + boost::fusion::vector<int,int,int> v3(0,1,2); + boost::fusion::vector<int,int,int,int> v4(0,1,2,3); + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = func(v0); j += i; + i = func(v1); j += i; + i = func(v2); j += i; + i = func(v3); j += i; + i = func(v4); j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + return result / iter; + } + + template<typename F> + double call_fused(F const & func, int & j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + do + { + boost::fusion::list<> l0; + boost::fusion::list<int> l1(0); + boost::fusion::list<int,int> l2(0,1); + boost::fusion::list<int,int,int> l3(0,1,2); + boost::fusion::list<int,int,int,int> l4(0,1,2,3); + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i += func(l0); + i += func(l1); + i += func(l2); + i += func(l3); + i += func(l4); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + boost::fusion::list<> l0; + boost::fusion::list<int> l1(0); + boost::fusion::list<int,int> l2(0,1); + boost::fusion::list<int,int,int> l3(0,1,2); + boost::fusion::list<int,int,int,int> l4(0,1,2,3); + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = func(l0); j += i; + i = func(l1); j += i; + i = func(l2); j += i; + i = func(l3); j += i; + i = func(l4); j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + return result / iter; + } +} + +int main() +{ + int total = 0; + int res; + typedef fused_sum F; + typedef unfused_sum U; + + std::cout << "Compiler: " << BOOST_COMPILER << std::endl; + std::cout << std::endl << "Unfused adapters:" << std::endl; + { + F f; + std::cout << "F /* a fused function object */ " << call_fused_ra(f,res) << std::endl; + total += res; + } + { + F f; + std::cout << "without random access " << call_fused(f,res) << std::endl; + total += res; + } + { + boost::lightweight_forward_adapter< boost::fusion::unfused<F> > f; + std::cout << "lightweight_forward_adapter< unfused<F> > " << call_unfused(f,res) << std::endl; + total += res; + } + { + boost::forward_adapter< boost::fusion::unfused<F> > f; + std::cout << "forward_adapter< unfused<F> > " << call_unfused(f,res) << std::endl; + total += res; + } + std::cout << std::endl << "Fused adapters:" << std::endl; + { + unfused_sum f; + std::cout << "U /* an unfused function object */ " << call_unfused(f,res) << std::endl; + total += res; + } + { + boost::fusion::fused_function_object<U> f; + std::cout << "fused_function_object<U> " << call_fused_ra(f,res) << std::endl; + total += res; + } + { + boost::fusion::fused_function_object<U> f; + std::cout << "without random access " << call_fused(f,res) << std::endl; + total += res; + } + { + boost::lightweight_forward_adapter< boost::fusion::unfused< boost::fusion::fused_function_object<U> > > f; + std::cout << "lightweight_forward_adapter< unfused<fused_function_object<U> > >" << call_unfused(f,res) << std::endl; + total += res; + } + { + boost::forward_adapter< boost::fusion::unfused< boost::fusion::fused_function_object<U> > > f; + std::cout << "forward_adapter< unfused<fused_function_object<U> > > " << call_unfused(f,res) << std::endl; + total += res; + } + + return total; +} diff --git a/libs/fusion/example/performance/inner_product.cpp b/libs/fusion/example/performance/inner_product.cpp new file mode 100644 index 000000000..c9f22c7cd --- /dev/null +++ b/libs/fusion/example/performance/inner_product.cpp @@ -0,0 +1,184 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/array.hpp> +#include <boost/timer.hpp> + +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/adapted/array.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> + +#include <boost/type_traits/remove_reference.hpp> + +#include <algorithm> +#include <numeric> +#include <functional> +#include <iostream> +#include <cmath> +#include <limits> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +int const REPEAT_COUNT = 10; + +double const duration = 0.5; + +namespace +{ + struct poly_add + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_add(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + rhs; + } + }; + + struct poly_mult + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_mult(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs * rhs; + } + }; + + template<int N> + double time_for_std_inner_product(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } + + template<int N> + double time_for_fusion_inner_product(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add()); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add()); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } +} + +int main() +{ + int total = 0; + int res; + + std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl; + total += res; + std::cout << "short inner_product fusion test " << time_for_fusion_inner_product<8>(res) << std::endl; + total += res; + + std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl; + total += res; + std::cout << "medium inner_product fusion test " << time_for_fusion_inner_product<64>(res) << std::endl; + total += res; + + std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl; + total += res; + std::cout << "long inner_product fusion test " << time_for_fusion_inner_product<128>(res) << std::endl; + total += res; + + return total; +} diff --git a/libs/fusion/example/performance/inner_product2.cpp b/libs/fusion/example/performance/inner_product2.cpp new file mode 100644 index 000000000..f1d536afd --- /dev/null +++ b/libs/fusion/example/performance/inner_product2.cpp @@ -0,0 +1,206 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/array.hpp> +#include <boost/timer.hpp> + +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/adapted/array.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> + +#include <boost/type_traits/remove_reference.hpp> + +#include <algorithm> +#include <numeric> +#include <functional> +#include <iostream> +#include <cmath> +#include <limits> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +int const REPEAT_COUNT = 10; + +double const duration = 0.5; + +namespace +{ + struct poly_add + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_add(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + rhs; + } + }; + + struct poly_mult + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_mult(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs * rhs; + } + }; + + template<int N> + double time_for_std_inner_product(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } + + struct poly_combine + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_combine(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + typename result<poly_combine(Lhs,Rhs)>::type + operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + boost::fusion::at_c<0>(rhs) * boost::fusion::at_c<1>(rhs); + } + }; + + template<int N> + double time_for_fusion_inner_product2(int& j) + { + boost::timer tim; + int i = 0; + long long iter = 65536; + long long counter, repeats; + double result = (std::numeric_limits<double>::max)(); + double runtime = 0; + double run; + boost::array<int, N> arr1; + boost::array<int, N> arr2; + std::generate(arr1.begin(), arr1.end(), rand); + std::generate(arr2.begin(), arr2.end(), rand); + do + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::zip(arr1, arr2), 0, poly_combine()); + static_cast<void>(i); + } + runtime = tim.elapsed(); + iter *= 2; + } while(runtime < duration); + iter /= 2; + + std::cout << iter << " iterations" << std::endl; + + // repeat test and report least value for consistency: + for(repeats = 0; repeats < REPEAT_COUNT; ++repeats) + { + tim.restart(); + for(counter = 0; counter < iter; ++counter) + { + i = boost::fusion::accumulate( + boost::fusion::zip(arr1, arr2), 0, poly_combine()); + j += i; + } + run = tim.elapsed(); + result = (std::min)(run, result); + } + std::cout << i << std::endl; + return result / iter; + } +} + +int main() +{ + int total = 0; + int res; + + std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl; + total += res; + std::cout << "short inner_product fusion 2 test " << time_for_fusion_inner_product2<8>(res) << std::endl; + total += res; + + std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl; + total += res; + std::cout << "medium inner_product fusion 2 test " << time_for_fusion_inner_product2<64>(res) << std::endl; + total += res; + +#if 0 // Leads to ICE with MSVC 8.0 + std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl; + total += res; + std::cout << "long inner_product fusion 2 test " << time_for_fusion_inner_product2<128>(res) << std::endl; + total += res; +#endif + + return total; +} diff --git a/libs/fusion/example/performance/measure.hpp b/libs/fusion/example/performance/measure.hpp new file mode 100644 index 000000000..72cd71ba6 --- /dev/null +++ b/libs/fusion/example/performance/measure.hpp @@ -0,0 +1,85 @@ +// Copyright David Abrahams, Matthias Troyer, Michael Gauckler +// 2005. 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) + +#if !defined(LIVE_CODE_TYPE) +# define LIVE_CODE_TYPE int +#endif + +#include <boost/timer.hpp> + +namespace test +{ + // This value is required to ensure that a smart compiler's dead + // code elimination doesn't optimize away anything we're testing. + // We'll use it to compute the return code of the executable to make + // sure it's needed. + LIVE_CODE_TYPE live_code; + + // Call objects of the given Accumulator type repeatedly with x as + // an argument. + template <class Accumulator, class Arg> + void hammer(Arg const& x, long const repeats) + { + // Strategy: because the sum in an accumulator after each call + // depends on the previous value of the sum, the CPU's pipeline + // might be stalled while waiting for the previous addition to + // complete. Therefore, we allocate an array of accumulators, + // and update them in sequence, so that there's no dependency + // between adjacent addition operations. + // + // Additionally, if there were only one accumulator, the + // compiler or CPU might decide to update the value in a + // register rather that writing it back to memory. we want each + // operation to at least update the L1 cache. *** Note: This + // concern is specific to the particular application at which + // we're targeting the test. *** + + // This has to be at least as large as the number of + // simultaneous accumulations that can be executing in the + // compiler pipeline. A safe number here is larger than the + // machine's maximum pipeline depth. If you want to test the L2 + // or L3 cache, or main memory, you can increase the size of + // this array. 1024 is an upper limit on the pipeline depth of + // current vector machines. + const std::size_t number_of_accumulators = 1024; + live_code = 0; // reset to zero + + Accumulator a[number_of_accumulators]; + + for (long iteration = 0; iteration < repeats; ++iteration) + { + for (Accumulator* ap = a; ap < a + number_of_accumulators; ++ap) + { + (*ap)(x); + } + } + + // Accumulate all the partial sums to avoid dead code + // elimination. + for (Accumulator* ap = a; ap < a + number_of_accumulators; ++ap) + { + live_code += ap->sum; + } + } + + // Measure the time required to hammer accumulators of the given + // type with the argument x. + template <class Accumulator, class T> + double measure(T const& x, long const repeats) + { + // Hammer accumulators a couple of times to ensure the + // instruction cache is full of our test code, and that we don't + // measure the cost of a page fault for accessing the data page + // containing the memory where the accumulators will be + // allocated + hammer<Accumulator>(x, repeats); + hammer<Accumulator>(x, repeats); + + // Now start a timer + boost::timer time; + hammer<Accumulator>(x, repeats); // This time, we'll measure + return time.elapsed() / repeats; // return the time of one iteration + } +} diff --git a/libs/fusion/example/performance/sequence_efficiency.cpp b/libs/fusion/example/performance/sequence_efficiency.cpp new file mode 100644 index 000000000..307ecdf3f --- /dev/null +++ b/libs/fusion/example/performance/sequence_efficiency.cpp @@ -0,0 +1,248 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include "measure.hpp" + +#define FUSION_MAX_LIST_SIZE 30 +#define FUSION_MAX_VECTOR_SIZE 30 + +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> + +#include <boost/type_traits/remove_reference.hpp> + +#include <boost/lexical_cast.hpp> +#include <boost/preprocessor/stringize.hpp> +#include <boost/preprocessor/enum.hpp> + +#include <iostream> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +// About the tests: +// +// The tests below compare various fusion sequences to see how abstraction +// affects prformance. +// +// We have 3 sequence sizes for each fusion sequence we're going to test. +// +// small = 3 elements +// medium = 10 elements +// big = 30 elements +// +// The sequences are initialized with values 0..N-1 from numeric strings +// parsed by boost::lexical_cast to make sure that the compiler is not +// optimizing by replacing the computation with constant results computed +// at compile time. +// +// These sequences will be subjected to our accumulator which calls +// fusion::accumulate: +// +// this->sum += boost::fusion::accumulate(seq, 0, poly_add()); +// +// where poly_add simply sums the current value with the content of +// the sequence element. This accumulator will be called many times +// through the "hammer" test (see measure.hpp). +// +// The tests are compared against a base using a plain_accumulator +// which does a simple addition: +// +// this->sum += x; + +namespace +{ + struct poly_add + { + template<typename Sig> + struct result; + + template<typename Lhs, typename Rhs> + struct result<poly_add(Lhs, Rhs)> + : boost::remove_reference<Lhs> + {}; + + template<typename Lhs, typename Rhs> + Lhs operator()(const Lhs& lhs, const Rhs& rhs) const + { + return lhs + rhs; + } + }; + + // Our Accumulator function + template <typename T> + struct accumulator + { + accumulator() + : sum() + {} + + template <typename Sequence> + void operator()(Sequence const& seq) + { + this->sum += boost::fusion::accumulate(seq, 0, poly_add()); + } + + T sum; + }; + + // Plain Accumulator function + template <typename T> + struct plain_accumulator + { + plain_accumulator() + : sum() + {} + + template <typename X> + void operator()(X const& x) + { + this->sum += x; + } + + T sum; + }; + + template <typename T> + void check(T const& seq, char const* info) + { + test::measure<accumulator<int> >(seq, 1); + std::cout << info << test::live_code << std::endl; + } + + template <typename T> + void measure(T const& seq, char const* info, long const repeats, double base) + { + double t = test::measure<accumulator<int> >(seq, repeats); + std::cout + << info + << t + << " (" << int((t/base)*100) << "%)" + << std::endl; + } + + template <typename T> + void test_assembler(T const& seq) + { + test::live_code = boost::fusion::accumulate(seq, 0, poly_add()); + } +} + +// We'll initialize the sequences from numeric strings that +// pass through boost::lexical_cast to make sure that the +// compiler is not optimizing by replacing the computation +// with constant results computed at compile time. +#define INIT(z, n, text) boost::lexical_cast<int>(BOOST_PP_STRINGIZE(n)) + +int main() +{ + using namespace boost::fusion; + std::cout.setf(std::ios::scientific); + + vector< + int, int, int + > + vsmall(BOOST_PP_ENUM(3, INIT, _)); + + list< + int, int, int + > + lsmall(BOOST_PP_ENUM(3, INIT, _)); + + vector< + int, int, int, int, int, int, int, int, int, int + > + vmedium(BOOST_PP_ENUM(10, INIT, _)); + + list< + int, int, int, int, int, int, int, int, int, int + > + lmedium(BOOST_PP_ENUM(10, INIT, _)); + + vector< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + > + vbig(BOOST_PP_ENUM(30, INIT, _)); + + list< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + > + lbig(BOOST_PP_ENUM(30, INIT, _)); + + // first decide how many repetitions to measure + long repeats = 100; + double measured = 0; + while (measured < 2.0 && repeats <= 10000000) + { + repeats *= 10; + + boost::timer time; + + test::hammer<plain_accumulator<int> >(0, repeats); + test::hammer<accumulator<int> >(vsmall, repeats); + test::hammer<accumulator<int> >(lsmall, repeats); + test::hammer<accumulator<int> >(vmedium, repeats); + test::hammer<accumulator<int> >(lmedium, repeats); + test::hammer<accumulator<int> >(vbig, repeats); + test::hammer<accumulator<int> >(lbig, repeats); + + measured = time.elapsed(); + } + + test::measure<plain_accumulator<int> >(1, 1); + std::cout + << "base accumulated result: " + << test::live_code + << std::endl; + + double base_time = test::measure<plain_accumulator<int> >(1, repeats); + std::cout + << "base time: " + << base_time; + + std::cout + << std::endl + << "-------------------------------------------------------------------" + << std::endl; + + check(vsmall, "small vector accumulated result: "); + check(lsmall, "small list accumulated result: "); + check(vmedium, "medium vector accumulated result: "); + check(lmedium, "medium list accumulated result: "); + check(vbig, "big vector accumulated result: "); + check(lbig, "big list accumulated result: "); + + std::cout + << "-------------------------------------------------------------------" + << std::endl; + + measure(vsmall, "small vector time: ", repeats, base_time); + measure(lsmall, "small list time: ", repeats, base_time); + measure(vmedium, "medium vector time: ", repeats, base_time); + measure(lmedium, "medium list time: ", repeats, base_time); + measure(vbig, "big vector time: ", repeats, base_time); + measure(lbig, "big list time: ", repeats, base_time); + + std::cout + << "-------------------------------------------------------------------" + << std::endl; + + // Let's see how this looks in assembler + test_assembler(vmedium); + + // This is ultimately responsible for preventing all the test code + // from being optimized away. Change this to return 0 and you + // unplug the whole test's life support system. + return test::live_code != 0; +} diff --git a/libs/fusion/example/performance/timings.txt b/libs/fusion/example/performance/timings.txt new file mode 100644 index 000000000..355491708 --- /dev/null +++ b/libs/fusion/example/performance/timings.txt @@ -0,0 +1,57 @@ +=============================================================================== +Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + +Use, modification and distribution is 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) +=============================================================================== + +Timing result for sequence_efficiency.cpp comparing the speed of various +fusion sequences. The test involves accumulating the elements of the +sequence which is primed to have values 0..N (N=size of sequence). Small, +medium and big sequences are tested where: + + small = 3 elements + medium = 10 elements + big = 30 elements + +Tester: Joel de Guzman. WinXP, P4-3.0GHZ, 2GB RAM + +VC7.1 (flags = /MD /O2 /EHsc /GS) + + small vector time: 1.870000e-006 + small list time: 1.870000e-006 + medium vector time: 1.880000e-006 + medium list time: 3.600000e-006 + big vector time: 2.030000e-006 + big list time: 8.910000e-006 + +VC8.0 (flags = /MD /O2 /EHsc /GS) + + small vector time: 2.500000e-05 + small list time: 2.500000e-05 + medium vector time: 7.810000e-05 + medium list time: 7.810000e-05 + big vector time: 2.469000e-04 + big list time: 2.453000e-04 + +G++ 3.4 (flags = -ftemplate-depth-128 -funroll-loops -O3 -finline-functions -Wno-inline -Wall) + + small vector time: 2.500000e-05 + small list time: 2.500000e-05 + medium vector time: 7.970000e-05 + medium list time: 7.970000e-05 + big vector time: 2.516000e-04 + big list time: 2.485000e-04 + +Intel 9.1 (flags = /MD /O2 /EHsc /GS) + + small vector time: 1.125000e-006 + small list time: 1.125000e-006 + medium vector time: 1.125000e-006 + medium list time: 1.141000e-006 + big vector time: 1.140000e-006 + big list time: 1.141000e-006 + + + diff --git a/libs/fusion/example/performance/zip_efficiency.cpp b/libs/fusion/example/performance/zip_efficiency.cpp new file mode 100644 index 000000000..6d240f2ca --- /dev/null +++ b/libs/fusion/example/performance/zip_efficiency.cpp @@ -0,0 +1,155 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include "measure.hpp" + +//~ #define FUSION_MAX_VECTOR_SIZE 30 + +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <iostream> + +#ifdef _MSC_VER +// inline aggressively +# pragma inline_recursion(on) // turn on inline recursion +# pragma inline_depth(255) // max inline depth +#endif + +namespace +{ + struct zip_add + { + template<typename Lhs, typename Rhs> + struct result + { + typedef typename + boost::remove_reference< + typename boost::fusion::result_of::value_at_c<Lhs, 0>::type + >::type + type; + }; + + template<typename Lhs, typename Rhs> + typename result<Lhs, Rhs>::type + operator()(const Lhs& lhs, const Rhs& rhs) const + { + return boost::fusion::at_c<0>(lhs) + boost::fusion::at_c<1>(lhs) + rhs; + } + }; + + // Our Accumulator function + template <typename T> + struct zip_accumulator + { + zip_accumulator() + : sum() + {} + + template <typename Sequence> + void operator()(Sequence const& seq) + { + this->sum += boost::fusion::accumulate(seq, 0, zip_add()); + } + + T sum; + }; + + template <typename T> + void check(T const& seq, char const* info) + { + test::measure<zip_accumulator<int> >(seq, 1); + std::cout << info << test::live_code << std::endl; + } + + template <typename T> + void measure(T const& seq, char const* info, long const repeats) + { + std::cout + << info + << test::measure<zip_accumulator<int> >(seq, repeats) + << std::endl; + } +} + +int main() +{ + using namespace boost::fusion; + + std::cout.setf(std::ios::scientific); + + vector< + int, int, int + > + vsmall_1(BOOST_PP_ENUM_PARAMS(3,)); + + vector< + int, int, int + > + vsmall_2(BOOST_PP_ENUM_PARAMS(3,)); + + vector< + int, int, int, int, int, int, int, int, int, int + > + vmedium_1(BOOST_PP_ENUM_PARAMS(10,)); + + vector< + int, int, int, int, int, int, int, int, int, int + > + vmedium_2(BOOST_PP_ENUM_PARAMS(10,)); + + //~ vector< + //~ int, int, int, int, int, int, int, int, int, int + //~ , int, int, int, int, int, int, int, int, int, int + //~ , int, int, int, int, int, int, int, int, int, int + //~ > + //~ vbig_1(BOOST_PP_ENUM_PARAMS(30,)); + + //~ vector< + //~ int, int, int, int, int, int, int, int, int, int + //~ , int, int, int, int, int, int, int, int, int, int + //~ , int, int, int, int, int, int, int, int, int, int + //~ > + //~ vbig_2(BOOST_PP_ENUM_PARAMS(30,)); + + // first decide how many repetitions to measure + long repeats = 100; + double measured = 0; + while (measured < 2.0 && repeats <= 10000000) + { + repeats *= 10; + + boost::timer time; + + test::hammer<zip_accumulator<int> >(zip(vsmall_1, vsmall_2), repeats); + test::hammer<zip_accumulator<int> >(zip(vmedium_1, vmedium_2), repeats); + //~ test::hammer<zip_accumulator<int> >(zip(vbig_1, vbig_2), repeats); + + measured = time.elapsed(); + } + + check(zip(vsmall_1, vsmall_2), + "small zip accumulated result: "); + check(zip(vmedium_1, vmedium_2), + "medium zip accumulated result: "); + //~ check(zip(vbig_1, vbig_2), + //~ "big zip accumulated result: "); + + measure(zip(vsmall_1, vsmall_2), + "small zip time: ", repeats); + measure(zip(vmedium_1, vmedium_2), + "medium zip time: ", repeats); + //~ measure(zip(vbig_1, vbig_2), + //~ "big zip time: ", repeats); + + // This is ultimately responsible for preventing all the test code + // from being optimized away. Change this to return 0 and you + // unplug the whole test's life support system. + return test::live_code != 0; +} diff --git a/libs/fusion/index.html b/libs/fusion/index.html new file mode 100644 index 000000000..1eb81150a --- /dev/null +++ b/libs/fusion/index.html @@ -0,0 +1,15 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <meta http-equiv="refresh" content="0; URL=doc/html/index.html"> + </head> + <body> + Automatic redirection failed, click this + <a href="doc/html/index.html">link</a> <hr> + <p>© Copyright Beman Dawes, 2001</p> + <p>Distributed under the Boost Software License, Version 1.0. (See + accompanying file <a href="../../LICENSE_1_0.txt"> + LICENSE_1_0.txt</a> or copy at + <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p> + </body> +</html>
\ No newline at end of file diff --git a/libs/fusion/preprocess/preprocess.bat b/libs/fusion/preprocess/preprocess.bat new file mode 100644 index 000000000..f5c94977c --- /dev/null +++ b/libs/fusion/preprocess/preprocess.bat @@ -0,0 +1,7 @@ + + +wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=10 -DFUSION_MAX_LIST_SIZE=10 -DFUSION_MAX_ZIP_SEQUENCES=10 preprocess.cpp +wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=20 -DFUSION_MAX_LIST_SIZE=20 -DFUSION_MAX_ZIP_SEQUENCES=20 preprocess.cpp +wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=30 -DFUSION_MAX_LIST_SIZE=30 -DFUSION_MAX_ZIP_SEQUENCES=30 preprocess.cpp +wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=40 -DFUSION_MAX_LIST_SIZE=40 -DFUSION_MAX_ZIP_SEQUENCES=40 preprocess.cpp +wave @wave.cfg -DFUSION_MAX_VECTOR_SIZE=50 -DFUSION_MAX_LIST_SIZE=50 -DFUSION_MAX_ZIP_SEQUENCES=50 preprocess.cpp diff --git a/libs/fusion/preprocess/preprocess.cpp b/libs/fusion/preprocess/preprocess.cpp new file mode 100644 index 000000000..1cc59ef33 --- /dev/null +++ b/libs/fusion/preprocess/preprocess.cpp @@ -0,0 +1,10 @@ +/*============================================================================= + Copyright (c) 2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container.hpp> +#include <boost/fusion/algorithm.hpp> +#include <boost/fusion/tuple.hpp> + diff --git a/libs/fusion/preprocess/wave.cfg b/libs/fusion/preprocess/wave.cfg new file mode 100644 index 000000000..6d13cf637 --- /dev/null +++ b/libs/fusion/preprocess/wave.cfg @@ -0,0 +1,14 @@ +-DBOOST_FUSION_DONT_USE_PREPROCESSED_FILES +-DBOOST_FUSION_CREATE_PREPROCESSED_FILES +-SC:/dev/boost +-SC:/dev/tools/mingw/include +-SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include +-SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include/c++ +-SC:/dev/tools/mingw/lib/gcc/mingw32/4.5.2/include/c++/mingw32 +--variadics +-NBOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL +-NBOOST_PROTO_USE_GET_POINTER +-NBOOST_PROTO_GET_POINTER +--timer + + diff --git a/libs/fusion/test/Jamfile b/libs/fusion/test/Jamfile new file mode 100644 index 000000000..7e464575d --- /dev/null +++ b/libs/fusion/test/Jamfile @@ -0,0 +1,163 @@ +##============================================================================== +# Copyright (c) 2003-2006 Joel de Guzman +# +# Use, modification and distribution is 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) +#============================================================================== +# bring in rules for testing +import testing ; + +project + : requirements + ; + +{ + test-suite fusion : + + [ run algorithm/all.cpp : : : : ] + [ run algorithm/any.cpp : : : : ] + [ run algorithm/clear.cpp : : : : ] + [ run algorithm/copy.cpp : : : : ] + [ run algorithm/count.cpp : : : : ] + [ run algorithm/count_if.cpp : : : : ] + [ run algorithm/erase.cpp : : : : ] + [ run algorithm/erase_key.cpp : : : : ] + [ run algorithm/filter.cpp : : : : ] + [ run algorithm/filter_if.cpp : : : : ] + [ run algorithm/find.cpp : : : : ] + [ run algorithm/find_if.cpp : : : : ] + [ run algorithm/fold.cpp : : : : ] + [ run algorithm/fold2.cpp : : : : ] + [ run algorithm/for_each.cpp : : : : ] + [ run algorithm/insert.cpp : : : : ] + [ run algorithm/insert_range.cpp : : : : ] + [ run algorithm/iter_fold.cpp : : : : ] + [ run algorithm/none.cpp : : : : ] + [ run algorithm/pop_back.cpp : : : : ] + [ run algorithm/pop_front.cpp : : : : ] + [ run algorithm/push_back.cpp : : : : ] + [ run algorithm/push_front.cpp : : : : ] + [ run algorithm/remove.cpp : : : : ] + [ run algorithm/remove_if.cpp : : : : ] + [ run algorithm/replace.cpp : : : : ] + [ run algorithm/replace_if.cpp : : : : ] + [ run algorithm/reverse_fold.cpp : : : : ] + [ run algorithm/reverse_iter_fold.cpp : : : : ] + [ run algorithm/reverse.cpp : : : : ] + [ run algorithm/segmented_for_each.cpp : : : : ] + [ run algorithm/segmented_find.cpp : : : : ] + [ run algorithm/segmented_find_if.cpp : : : : ] + [ run algorithm/segmented_fold.cpp : : : : ] + [ run algorithm/transform.cpp : : : : ] + [ run algorithm/join.cpp : : : : ] + [ run algorithm/zip.cpp : : : : ] + [ run algorithm/zip2.cpp : : : : ] + [ run algorithm/zip_ignore.cpp : : : : ] + + [ run sequence/as_list.cpp : : : : ] + [ run sequence/as_map.cpp : : : : ] + [ run sequence/as_set.cpp : : : : ] + [ run sequence/as_vector.cpp : : : : ] + [ run sequence/boost_tuple.cpp : : : : ] + [ run sequence/cons.cpp : : : : ] + [ run sequence/filter_view.cpp : : : : ] + [ run sequence/io.cpp : : : : ] + [ run sequence/iterator_range.cpp : : : : ] + [ run sequence/joint_view.cpp : : : : ] + [ run sequence/list_comparison.cpp : : : : ] + [ run sequence/list_construction.cpp : : : : ] + [ run sequence/list_copy.cpp : : : : ] + [ run sequence/list_iterator.cpp : : : : ] + [ run sequence/list_make.cpp : : : : ] + [ run sequence/list_misc.cpp : : : : ] + [ run sequence/list_mutate.cpp : : : : ] + [ run sequence/list_tie.cpp : : : : ] + [ run sequence/list_value_at.cpp : : : : ] + [ run sequence/deque_comparison.cpp : : : : ] + [ run sequence/deque_construction.cpp : : : : ] + [ run sequence/deque_copy.cpp : : : : ] + [ run sequence/deque_iterator.cpp : : : : ] + [ run sequence/deque_make.cpp : : : : ] + [ run sequence/deque_misc.cpp : : : : ] + [ run sequence/deque_move.cpp : : : : ] + [ run sequence/deque_mutate.cpp : : : : ] + [ run sequence/deque_tie.cpp : : : : ] + [ run sequence/deque_value_at.cpp : : : : ] + [ run sequence/front_extended_deque.cpp : : : : ] + [ run sequence/back_extended_deque.cpp : : : : ] + [ run sequence/make_list.cpp : : : : ] + [ run sequence/make_vector.cpp : : : : ] + [ run sequence/map.cpp : : : : ] + [ run sequence/map_tie.cpp : : : : ] + [ run sequence/nview.cpp : : : : ] + [ run sequence/reverse_view.cpp : : : : ] + [ run sequence/segmented_iterator_range.cpp : : : : ] + [ run sequence/set.cpp : : : : ] + [ run sequence/single_view.cpp : : : : ] + [ run sequence/std_pair.cpp : : : : ] + [ run sequence/boost_array.cpp : : : : ] + [ run sequence/array.cpp : : : : ] + [ run sequence/tuple_comparison.cpp : : : : ] + [ run sequence/tuple_construction.cpp : : : : ] + [ run sequence/tuple_copy.cpp : : : : ] + [ run sequence/tuple_element.cpp : : : : ] + [ run sequence/tuple_make.cpp : : : : ] + [ run sequence/tuple_misc.cpp : : : : ] + [ run sequence/tuple_mutate.cpp : : : : ] + [ run sequence/tuple_tie.cpp : : : : ] + [ run sequence/tr1_tuple_auto_conv.cpp : : : : ] + [ run sequence/transform_view.cpp : : : : ] + [ run sequence/vector_comparison.cpp : : : : ] + [ run sequence/vector_construction.cpp : : : : ] + [ run sequence/vector_copy.cpp : : : : ] + [ run sequence/vector_iterator.cpp : : : : ] + [ run sequence/vector_make.cpp : : : : ] + [ run sequence/vector_misc.cpp : : : : ] + [ run sequence/vector_move.cpp : : : : ] + [ run sequence/vector_mutate.cpp : : : : ] + [ run sequence/vector_n.cpp : : : : ] + [ run sequence/vector_tie.cpp : : : : ] + [ run sequence/vector_value_at.cpp : : : : ] + [ run sequence/zip_view.cpp : : : : ] + [ run sequence/zip_view2.cpp : : : : ] + [ run sequence/zip_view_ignore.cpp : : : : ] + [ run sequence/repetitive_view.cpp : : : : ] + [ run sequence/deduce_sequence.cpp : : : : ] + [ run sequence/adapt_adt_named.cpp : : : : ] + [ run sequence/adapt_adt.cpp : : : : ] + [ run sequence/adapt_assoc_adt_named.cpp : : : : ] + [ run sequence/adapt_assoc_adt.cpp : : : : ] + [ run sequence/adapt_assoc_struct_named.cpp : : : : ] + [ run sequence/adapt_assoc_struct.cpp : : : : ] + [ run sequence/adapt_assoc_tpl_adt.cpp : : : : ] + [ run sequence/adapt_assoc_tpl_struct.cpp : : : : ] + [ run sequence/adapt_struct_named.cpp : : : : ] + [ run sequence/adapt_struct.cpp : : : : ] + [ run sequence/adapt_tpl_adt.cpp : : : : ] + [ run sequence/adapt_tpl_struct.cpp : : : : ] + [ run sequence/adt_attribute_proxy.cpp : : : : ] + [ run sequence/define_struct.cpp : : : : ] + [ run sequence/define_assoc_struct.cpp : : : : ] + [ run sequence/define_tpl_struct.cpp : : : : ] + [ run sequence/define_assoc_tpl_struct.cpp : : : : ] + [ run sequence/std_tuple_iterator.cpp : : : : ] + + [ run functional/fused.cpp : : : : ] + [ run functional/fused_function_object.cpp : : : : ] + [ run functional/fused_procedure.cpp : : : : ] + [ run functional/unfused.cpp : : : : ] + [ run functional/unfused_typed.cpp : : : : ] + [ run functional/make_fused.cpp : : : : ] + [ run functional/make_fused_function_object.cpp : : : : ] + [ run functional/make_fused_procedure.cpp : : : : ] + [ run functional/make_unfused.cpp : : : : ] + [ run functional/invoke.cpp : : : : ] + [ run functional/invoke_function_object.cpp : : : : ] + [ run functional/invoke_procedure.cpp : : : : ] + [ run sequence/swap.cpp : : : : ] + +# [ compile-fail xxx.cpp : : : : ] + + ; +} diff --git a/libs/fusion/test/algorithm/all.cpp b/libs/fusion/test/algorithm/all.cpp new file mode 100644 index 000000000..7b5550732 --- /dev/null +++ b/libs/fusion/test/algorithm/all.cpp @@ -0,0 +1,70 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/algorithm/query/all.hpp> +#include <boost/lambda/lambda.hpp> +#include <boost/mpl/vector_c.hpp> + +namespace +{ + struct search_for + { + explicit search_for(int in_search) + : search(in_search) + {} + + template<typename T> + bool operator()(T const& v) const + { + return v == search; + } + + int search; + }; +} + +int +main() +{ + { + boost::fusion::vector<> t; + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 < 4))); + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 > 0))); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 < 4))); + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 > 0))); + } + + { + boost::fusion::vector<int, short, double, long> t(1, 2, 3.3, 2); + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 < 4))); + BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 > 0))); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST((!boost::fusion::all(t, boost::lambda::_1 == 1))); + BOOST_TEST((!boost::fusion::all(t, boost::lambda::_1 < 3))); + } + + { + typedef boost::mpl::vector_c<int, 1> mpl_vec; + // We cannot use lambda here as mpl vec iterators return + // rvalues, and lambda needs lvalues. + BOOST_TEST(boost::fusion::all(mpl_vec(), search_for(1))); + BOOST_TEST(!boost::fusion::all(mpl_vec(), search_for(2))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/any.cpp b/libs/fusion/test/algorithm/any.cpp new file mode 100644 index 000000000..da0aa7933 --- /dev/null +++ b/libs/fusion/test/algorithm/any.cpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005 Eric Niebler + Copyright (c) Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/algorithm/query/any.hpp> +#include <boost/lambda/lambda.hpp> +#include <boost/mpl/vector_c.hpp> + +namespace +{ + struct search_for + { + explicit search_for(int in_search) + : search(in_search) + {} + + template<typename T> + bool operator()(T const& v) const + { + return v == search; + } + + int search; + }; +} + +int +main() +{ + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST(boost::fusion::any(t, boost::lambda::_1 == 2)); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST(!boost::fusion::any(t, boost::lambda::_1 == 3)); + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec; + // We cannot use lambda here as mpl vec iterators return + // rvalues, and lambda needs lvalues. + BOOST_TEST(boost::fusion::any(mpl_vec(), search_for(2))); + BOOST_TEST(!boost::fusion::any(mpl_vec(), search_for(4))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/clear.cpp b/libs/fusion/test/algorithm/clear.cpp new file mode 100644 index 000000000..f90f5c0a6 --- /dev/null +++ b/libs/fusion/test/algorithm/clear.cpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/clear.hpp> +#include <boost/mpl/vector_c.hpp> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing pop_back + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + + { + std::cout << clear(t1) << std::endl; + BOOST_TEST((clear(t1) == make_vector())); + } + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + std::cout << boost::fusion::clear(mpl_vec()) << std::endl; + BOOST_TEST((boost::fusion::clear(mpl_vec()) == make_vector())); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/copy.cpp b/libs/fusion/test/algorithm/copy.cpp new file mode 100644 index 000000000..330caca62 --- /dev/null +++ b/libs/fusion/test/algorithm/copy.cpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/sequence/comparison.hpp> +#include <boost/fusion/algorithm/auxiliary/copy.hpp> + +int +main() +{ + { + boost::fusion::vector<int, short, double> v(1, 2, 3); + boost::fusion::list<int, short, double> l; + + boost::fusion::copy(v, l); + BOOST_TEST(v == l); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/count.cpp b/libs/fusion/test/algorithm/count.cpp new file mode 100644 index 000000000..13aaad1a6 --- /dev/null +++ b/libs/fusion/test/algorithm/count.cpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/algorithm/query/count.hpp> +#include <boost/mpl/vector_c.hpp> +#include <string> + +int +main() +{ + { + boost::fusion::vector<int, short, double> t(1, 1, 1); + BOOST_TEST(boost::fusion::count(t, 1) == 3); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST(boost::fusion::count(t, 3) == 0); + } + + { + boost::fusion::vector<int, std::string, double> t(4, "hello", 4); + BOOST_TEST(boost::fusion::count(t, "hello") == 1); + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 2, 2, 3, 3> mpl_vec; + BOOST_TEST(boost::fusion::count(mpl_vec(), 2) == 3); + BOOST_TEST(boost::fusion::count(mpl_vec(), 3) == 2); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/count_if.cpp b/libs/fusion/test/algorithm/count_if.cpp new file mode 100644 index 000000000..d70628903 --- /dev/null +++ b/libs/fusion/test/algorithm/count_if.cpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/algorithm/query/count_if.hpp> +#include <boost/lambda/lambda.hpp> +#include <boost/mpl/vector_c.hpp> +#include <functional> + +int +main() +{ + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST(boost::fusion::count_if(t, boost::lambda::_1 == 2) == 1); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST(boost::fusion::count_if(t, boost::lambda::_1 == 3) == 0); + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec; + // Cannot use lambda here as mpl iterators return rvalues and lambda needs lvalues + BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::less_equal<int>(), 2)) == 2); + BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::greater<int>(), 2)) == 1); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/erase.cpp b/libs/fusion/test/algorithm/erase.cpp new file mode 100644 index 000000000..f376ba2a5 --- /dev/null +++ b/libs/fusion/test/algorithm/erase.cpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/vector/vector_iterator.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/erase.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/advance.hpp> +#include <boost/mpl/int.hpp> + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::vector_c; + using boost::mpl::begin; + using boost::mpl::advance; + using boost::mpl::int_; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing erase + + { + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, "Ruby"); + vector_iterator<vector_type, 2> pos(t1); + + std::cout << erase(t1, pos) << std::endl; + BOOST_TEST((erase(t1, pos) == make_vector(1, 'x', std::string("Ruby")))); + BOOST_TEST((erase(t1, end(t1)) == make_vector(1, 'x', 3.3, std::string("Ruby")))); + } + + { + typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + typedef boost::mpl::begin<mpl_vec>::type mpl_vec_begin; + typedef boost::mpl::advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3; + typedef boost::mpl::next<mpl_vec_begin>::type n1; + typedef boost::mpl::next<n1>::type n2; + typedef boost::mpl::next<n2>::type n3; + + BOOST_STATIC_ASSERT((boost::is_same<mpl_vec_at3, n3>::value)); + + + std::cout << erase(mpl_vec(), mpl_vec_at3()) << std::endl; + BOOST_TEST((erase(mpl_vec(), mpl_vec_at3()) + == make_vector(1, 2, 3, 5))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/erase_key.cpp b/libs/fusion/test/algorithm/erase_key.cpp new file mode 100644 index 000000000..34f69248c --- /dev/null +++ b/libs/fusion/test/algorithm/erase_key.cpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/set/set.hpp> +#include <boost/fusion/container/generation/make_set.hpp> +#include <boost/fusion/container/map/map.hpp> +#include <boost/fusion/container/generation/make_map.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/container/set/convert.hpp> +#include <boost/fusion/container/map/convert.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/algorithm/transformation/erase_key.hpp> +#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/support/pair.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +template <typename Set> +void test_set(Set const& set) +{ + using namespace boost::fusion; + std::cout << set << std::endl; + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<Set>::value == 3); + BOOST_TEST((*find<int>(set) == 1)); + BOOST_TEST((*find<double>(set) == 1.5)); + BOOST_TEST((*find<std::string>(set) == "hello")); +} + +typedef boost::mpl::int_<1> _1; +typedef boost::mpl::int_<2> _2; +typedef boost::mpl::int_<3> _3; +typedef boost::mpl::int_<4> _4; + +template <typename Map> +void test_map(Map const& map) +{ + using namespace boost::fusion; + std::cout << map << std::endl; + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<Map>::value == 3); + BOOST_TEST(((*find<_1>(map)).second == 1)); + BOOST_TEST(((*find<_3>(map)).second == 1.5)); + BOOST_TEST(((*find<_4>(map)).second == std::string("hello"))); +} + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + using namespace std; + using boost::fusion::pair; + using boost::fusion::make_pair; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + test_set(erase_key<char>(make_set(1, 'x', 1.5, std::string("hello")))); + test_map(erase_key<_2>(make_map<_1, _2, _3, _4>(1, 'x', 1.5, "hello"))); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/filter.cpp b/libs/fusion/test/algorithm/filter.cpp new file mode 100644 index 000000000..e762e4322 --- /dev/null +++ b/libs/fusion/test/algorithm/filter.cpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/filter.hpp> +#include <boost/mpl/vector.hpp> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + typedef boost::fusion::vector<char,double,char> vector_type; + vector_type t('a', 6.6, 'b'); + + { + std::cout << filter<char>(t) << std::endl; + BOOST_TEST((filter<char>(t) + == make_vector('a', 'b'))); + } + + { + typedef boost::mpl::vector<char,double,char> mpl_vec; + BOOST_TEST((filter<char>(mpl_vec()) + == make_vector('\0', '\0'))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/filter_if.cpp b/libs/fusion/test/algorithm/filter_if.cpp new file mode 100644 index 000000000..830813de6 --- /dev/null +++ b/libs/fusion/test/algorithm/filter_if.cpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/filter_if.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/not.hpp> + +struct X +{ + operator char const*() const + { + return "<X-object>"; + } +}; + +struct Y +{ + operator char const*() const + { + return "<Y-object>"; + } +}; + +int +main() +{ + using namespace boost::fusion; + + using boost::mpl::_; + using boost::mpl::not_; + using boost::is_class; + using boost::is_same; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing filter_if + + X x; Y y; + typedef boost::fusion::vector<Y, char, long, X, bool, double> vector_type; + vector_type t(y, '@', 987654, x, true, 6.6); + + { + std::cout << filter_if<not_<is_class<_> > >(t) << std::endl; + BOOST_TEST((filter_if<not_<is_class<_> > >(t) + == make_vector('@', 987654, true, 6.6))); + } + + { + std::cout << filter_if<is_class<_> >(t) << std::endl; + BOOST_TEST((filter_if<is_class<_> >(t) + == make_vector(y, x))); + } + + { + typedef boost::mpl::vector<Y, char, long, X, bool> mpl_vec; + BOOST_TEST((filter_if<not_<is_class<_> > >(mpl_vec()) + == make_vector(char(), long(), bool()))); + BOOST_TEST((filter_if<is_class<_> >(mpl_vec()) + == make_vector(y, x))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/find.cpp b/libs/fusion/test/algorithm/find.cpp new file mode 100644 index 000000000..83a86f1d9 --- /dev/null +++ b/libs/fusion/test/algorithm/find.cpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/set/set.hpp> +#include <boost/fusion/container/map/map.hpp> +#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/mpl/vector.hpp> +#include <string> + +struct X +{ + operator int() const + { + return 12345; + } +}; +int +main() +{ + using namespace boost::fusion; + using boost::mpl::identity; + + { + typedef vector<int, char, int, double> seq_type; + seq_type seq(12345, 'x', 678910, 3.36); + + std::cout << *boost::fusion::find<char>(seq) << std::endl; + BOOST_TEST(*boost::fusion::find<char>(seq) == 'x'); + + std::cout << *boost::fusion::find<int>(seq) << std::endl; + BOOST_TEST(*boost::fusion::find<int>(seq) == 12345); + + std::cout << *boost::fusion::find<double>(seq) << std::endl; + BOOST_TEST(*boost::fusion::find<double>(seq) == 3.36); + + BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq)); + } + + { + typedef set<int, char, double> seq_type; + seq_type seq(12345, 'x', 3.36); + std::cout << *boost::fusion::find<char>(seq) << std::endl; + BOOST_TEST(*boost::fusion::find<char>(seq) == 'x'); + BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq)); + } + + { + typedef map< + pair<int, char> + , pair<double, std::string> > + map_type; + + map_type seq( + make_pair<int>('X') + , make_pair<double>("Men")); + + std::cout << *boost::fusion::find<int>(seq) << std::endl; + std::cout << *boost::fusion::find<double>(seq) << std::endl; + BOOST_TEST((*boost::fusion::find<int>(seq)).second == 'X'); + BOOST_TEST((*boost::fusion::find<double>(seq)).second == "Men"); + BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq)); + } + + { + typedef boost::mpl::vector<int, char, X, double> mpl_vec; + BOOST_TEST((*boost::fusion::find<X>(mpl_vec()) == 12345)); + BOOST_TEST(boost::fusion::find<bool>(mpl_vec()) == boost::fusion::end(mpl_vec())); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/find_if.cpp b/libs/fusion/test/algorithm/find_if.cpp new file mode 100644 index 000000000..c4dfafa28 --- /dev/null +++ b/libs/fusion/test/algorithm/find_if.cpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/algorithm/query/find_if.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/less.hpp> +#include <boost/type_traits/is_same.hpp> + +struct X +{ + operator int() const + { + return 12345; + } +}; + +int +main() +{ + using namespace boost::fusion; + + { + using boost::is_same; + using boost::mpl::_; + + typedef vector<int, char, int, double> vector_type; + vector_type v(12345, 'x', 678910, 3.36); + + std::cout << *find_if<is_same<_, char> >(v) << std::endl; + BOOST_TEST((*find_if<is_same<_, char> >(v) == 'x')); + + std::cout << *find_if<is_same<_, int> >(v) << std::endl; + BOOST_TEST((*find_if<is_same<_, int> >(v) == 12345)); + + std::cout << *find_if<is_same<_, double> >(v) << std::endl; + BOOST_TEST((*find_if<is_same<_, double> >(v) == 3.36)); + } + + { + using boost::mpl::vector; + using boost::is_same; + using boost::mpl::_; + + typedef vector<int, char, X, double> mpl_vec; + BOOST_TEST((*find_if<is_same<_, X> >(mpl_vec()) == 12345)); + } + + { + using boost::mpl::vector_c; + using boost::mpl::less; + using boost::mpl::int_; + using boost::is_same; + using boost::mpl::_; + + typedef vector_c<int, 1, 2, 3, 4> mpl_vec; + BOOST_TEST((*find_if<less<_, int_<3> > >(mpl_vec()) == 1)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/fold.cpp b/libs/fusion/test/algorithm/fold.cpp new file mode 100644 index 000000000..1db081815 --- /dev/null +++ b/libs/fusion/test/algorithm/fold.cpp @@ -0,0 +1,222 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/vector.hpp> + +#include <boost/type_traits/remove_const.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_reference.hpp> + +#include <string> + +using boost::mpl::if_; +using boost::mpl::int_; +using boost::is_same; + +struct add_ints_only +{ + template<typename T> + struct result; + + template <typename State, typename T> + struct result<add_ints_only(State, T)> + { + typedef typename boost::remove_const< + typename boost::remove_reference<State>::type>::type type; + }; + + template <typename State, typename T> + State + operator()(State const& state, T const& /*x*/) const + { + return state; + } + + int + operator()(int state, int x) const + { + return x + state; + } +}; + +struct count_ints +{ + template<typename T> + struct result; + + template <typename CountT, typename T> + struct result<count_ints(CountT, T)> + { + typedef typename boost::remove_const< + typename boost::remove_reference<CountT>::type>::type state; + typedef typename boost::remove_const< + typename boost::remove_reference<T>::type>::type elem; + + typedef typename + if_< + is_same<elem, int> + , typename boost::mpl::next<state>::type + , state + >::type + type; + }; + + template <typename CountT, typename T> + typename result<count_ints(CountT, T)>::type + operator()(CountT const&, T const&) const + { + typedef typename result<count_ints(CountT, T)>::type result_; + return result_(); + } +}; + +struct appender +{ + typedef std::string result_type; + + std::string operator()(std::string const& str, char c) const + { + return str + c; + } +}; + +struct lvalue_adder +{ + template<typename Sig> + struct result; + + template<typename T0, typename T1> + struct result<lvalue_adder(T0, T1&)> + { + // Second argument still needs to support rvalues - see definition of fusion::fold + typedef T1 type; + }; + + template<typename T0, typename T1> + T1 operator()(T0 const& lhs, T1& rhs) const + { + return lhs + rhs; + } +}; + +int add(int lhs, int rhs) +{ + return lhs + rhs; +} + +int +main() +{ + using namespace boost::fusion; + namespace fusion = boost::fusion; + + { + typedef vector<int, char, int, double> vector_type; + vector_type v(12345, 'x', 678910, 3.36); + int result = fold(v, 0, add_ints_only()); + std::cout << result << std::endl; + BOOST_TEST(result == 12345+678910); + } + + { + typedef vector<int> vector_type; + vector_type v(12345); + + int n = fusion::fold(v, int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 1); + } + + { + typedef vector<int, char, int, double, int> vector_type; + vector_type v(12345, 'x', 678910, 3.36, 8756); + + int n = fusion::fold(v, int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 3); + } + + { + typedef boost::mpl::vector<int, char, int, double, int> mpl_vec; + int n = fusion::fold(mpl_vec(), int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 3); + } + + { + BOOST_TEST(fusion::fold(fusion::make_vector('a','b','c','d','e'), std::string(""), appender()) + == "abcde"); + } + + { + vector<int, int> vec(1,2); + BOOST_TEST(fusion::fold(vec, 0, lvalue_adder()) == 3); + } + + { + vector<int, int> vec(1,2); + BOOST_TEST(fusion::fold(vec, 0, add) == 3); + } + + { + typedef vector<int, char, int, double> vector_type; + vector_type v(12345, 'x', 678910, 3.36); + int result = accumulate(v, 0, add_ints_only()); + std::cout << result << std::endl; + BOOST_TEST(result == 12345+678910); + } + + { + typedef vector<int> vector_type; + vector_type v(12345); + + int n = fusion::accumulate(v, int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 1); + } + + { + typedef vector<int, char, int, double, int> vector_type; + vector_type v(12345, 'x', 678910, 3.36, 8756); + + int n = fusion::accumulate(v, int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 3); + } + + { + typedef boost::mpl::vector<int, char, int, double, int> mpl_vec; + int n = fusion::accumulate(mpl_vec(), int_<0>(), count_ints()); + std::cout << n << std::endl; + BOOST_TEST(n == 3); + } + + { + BOOST_TEST(fusion::accumulate(fusion::make_vector('a','b','c','d','e'), std::string(""), appender()) + == "abcde"); + } + + { + vector<int, int> vec(1,2); + BOOST_TEST(fusion::accumulate(vec, 0, add) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/fold.hpp b/libs/fusion/test/algorithm/fold.hpp new file mode 100644 index 000000000..87a81a7c1 --- /dev/null +++ b/libs/fusion/test/algorithm/fold.hpp @@ -0,0 +1,212 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/config.hpp> +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/fusion/algorithm/transformation/reverse.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/algorithm/iteration/reverse_fold.hpp> +#include <boost/fusion/algorithm/iteration/iter_fold.hpp> +#include <boost/fusion/algorithm/iteration/reverse_iter_fold.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/support/pair.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/mpl/transform.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/back.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/for_each.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/back_inserter.hpp> +#include <boost/mpl/always.hpp> +#include <boost/mpl/copy.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <iostream> + +namespace mpl=boost::mpl; +namespace fusion=boost::fusion; + +#ifdef BOOST_FUSION_TEST_REVERSE_FOLD +# ifdef BOOST_FUSION_TEST_ITER_FOLD +# define BOOST_FUSION_TEST_FOLD_NAME reverse_iter_fold +# else +# define BOOST_FUSION_TEST_FOLD_NAME reverse_fold +# endif +#else +# ifdef BOOST_FUSION_TEST_ITER_FOLD +# define BOOST_FUSION_TEST_FOLD_NAME iter_fold +# else +# define BOOST_FUSION_TEST_FOLD_NAME fold +# endif +#endif + +struct sum +{ + template<typename Sig> + struct result; + + template<typename Self, typename State, typename T> + struct result<Self(State,T)> + : boost::fusion::result_of::make_pair< + mpl::int_< + boost::remove_reference< + State + >::type::first_type::value+1 + > + , int + > + { + BOOST_MPL_ASSERT((typename boost::is_reference<State>::type)); + BOOST_MPL_ASSERT((typename boost::is_reference<T>::type)); + }; + +#ifdef BOOST_FUSION_TEST_ITER_FOLD + template<typename State, typename It> + typename result<sum const&(State const&,It const&)>::type + operator()(State const& state, It const& it)const + { + static const int n=State::first_type::value; + return fusion::make_pair<mpl::int_<n+1> >( + state.second+fusion::deref(it)*n); + } +#else + template<typename State> + typename result<sum const&(State const&, int const&)>::type + operator()(State const& state, int const& e)const + { + static const int n=State::first_type::value; + return fusion::make_pair<mpl::int_<n+1> >(state.second+e*n); + } +#endif +}; + +struct meta_sum +{ + template<typename Sig> + struct result; + + template<typename Self, typename State, typename T> + struct result<Self(State,T)> + { + BOOST_MPL_ASSERT((typename boost::is_reference<State>::type)); + BOOST_MPL_ASSERT((typename boost::is_reference<T>::type)); + + typedef typename boost::remove_reference<State>::type state; + static const int n=mpl::front<state>::type::value; + +#ifdef BOOST_FUSION_TEST_ITER_FOLD + typedef typename + boost::fusion::result_of::value_of< + typename boost::remove_reference<T>::type + >::type + t; +#else + typedef typename boost::remove_reference<T>::type t; +#endif + + typedef + mpl::vector< + mpl::int_<n+1> + , mpl::int_< + mpl::back<state>::type::value+t::value*n + > + > + type; + }; + + template<typename State, typename T> + typename result<meta_sum const&(State const&,T const&)>::type + operator()(State const&, T const&)const; +}; + +struct fold_test_n +{ + template<typename I> + void + operator()(I)const + { + static const int n=I::value; + typedef mpl::range_c<int, 0, n> range; + + static const int squares_sum=n*(n+1)*(2*n+1)/6; + + { + mpl::range_c<int, 1, n+1> init_range; + typename boost::fusion::result_of::as_vector< + typename mpl::transform< + range + , mpl::always<int> + , mpl::back_inserter<mpl::vector<> > + >::type + >::type vec( +#ifdef BOOST_FUSION_TEST_REVERSE_FOLD + fusion::reverse(init_range) +#else + init_range +#endif + ); + + int result=BOOST_FUSION_TEST_FOLD_NAME( + vec, + fusion::make_pair<mpl::int_<1> >(0), + sum()).second; + std::cout << n << ": " << result << std::endl; + BOOST_TEST(result==squares_sum); + } + + { + typedef typename +#ifdef BOOST_FUSION_TEST_REVERSE_FOLD + boost::fusion::result_of::as_vector< + typename mpl::copy< + mpl::range_c<int, 1, n+1> + , mpl::front_inserter<fusion::vector<> > + >::type + >::type +#else + boost::fusion::result_of::as_vector<mpl::range_c<int, 1, n+1> >::type +#endif + vec; + + typedef + boost::is_same< + typename boost::fusion::result_of::BOOST_FUSION_TEST_FOLD_NAME< + vec + , mpl::vector<mpl::int_<1>, mpl::int_<0> > + , meta_sum + >::type + , typename mpl::if_c< + !n + , mpl::vector<mpl::int_<1>, mpl::int_<0> > const& + , mpl::vector<mpl::int_<n+1>, mpl::int_<squares_sum> > + >::type + > + result_test; + + BOOST_MPL_ASSERT((result_test)); + } + } +}; + +int +main() +{ + mpl::for_each<mpl::range_c<int, 0, 10> >(fold_test_n()); + + return boost::report_errors(); +} + +#undef BOOST_FUSION_TEST_FOLD_NAME + diff --git a/libs/fusion/test/algorithm/fold2.cpp b/libs/fusion/test/algorithm/fold2.cpp new file mode 100644 index 000000000..51ef975db --- /dev/null +++ b/libs/fusion/test/algorithm/fold2.cpp @@ -0,0 +1,8 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include "fold.hpp" diff --git a/libs/fusion/test/algorithm/for_each.cpp b/libs/fusion/test/algorithm/for_each.cpp new file mode 100644 index 000000000..c0bc441c5 --- /dev/null +++ b/libs/fusion/test/algorithm/for_each.cpp @@ -0,0 +1,61 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/mpl/vector_c.hpp> + +struct print +{ + template <typename T> + void operator()(T const& v) const + { + std::cout << "[ " << v << " ] "; + } +}; + +struct increment +{ + template <typename T> + void operator()(T& v) const + { + ++v; + } +}; + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::vector_c; + namespace fusion = boost::fusion; + + { + typedef vector<int, char, double, char const*> vector_type; + vector_type v(1, 'x', 3.3, "Ruby"); + for_each(v, print()); + std::cout << std::endl; + } + + { + typedef vector<int, char, double, char const*> vector_type; + vector_type v(1, 'x', 3.3, "Ruby"); + for_each(v, increment()); + std::cout << v << std::endl; + } + + { + typedef vector_c<int, 2, 3, 4, 5, 6> mpl_vec; + fusion::for_each(mpl_vec(), print()); + std::cout << std::endl; + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/insert.cpp b/libs/fusion/test/algorithm/insert.cpp new file mode 100644 index 000000000..a4239a8de --- /dev/null +++ b/libs/fusion/test/algorithm/insert.cpp @@ -0,0 +1,67 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/insert.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/advance.hpp> +#include <boost/mpl/int.hpp> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::vector_c; + using boost::mpl::advance; + using boost::mpl::int_; + namespace fusion = boost::fusion; + namespace mpl = boost::mpl; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing insert + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + vector_iterator<vector_type, 2> pos(t1); + + std::cout << insert(t1, pos, 123456) << std::endl; + BOOST_TEST((insert(t1, pos, 123456) + == make_vector(1, 'x', 123456, 3.3, s))); + + std::cout << insert(t1, end(t1), 123456) << std::endl; + BOOST_TEST((insert(t1, end(t1), 123456) + == make_vector(1, 'x', 3.3, s, 123456))); + + std::cout << insert(t1, begin(t1), "glad") << std::endl; + BOOST_TEST((insert(t1, begin(t1), "glad") + == make_vector(std::string("glad"), 1, 'x', 3.3, s))); + } + + { + typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + typedef mpl::begin<mpl_vec>::type mpl_vec_begin; + typedef advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3; + + std::cout << fusion::insert(mpl_vec(), mpl_vec_at3(), int_<66>()) << std::endl; + BOOST_TEST((fusion::insert(mpl_vec(), mpl_vec_at3(), int_<66>()) + == make_vector(1, 2, 3, 66, 4, 5))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/insert_range.cpp b/libs/fusion/test/algorithm/insert_range.cpp new file mode 100644 index 000000000..28a02219b --- /dev/null +++ b/libs/fusion/test/algorithm/insert_range.cpp @@ -0,0 +1,71 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/insert_range.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/advance.hpp> +#include <boost/mpl/int.hpp> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::vector_c; + using boost::mpl::advance; + using boost::mpl::int_; + namespace fusion = boost::fusion; + namespace mpl = boost::mpl; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing insert_range + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + vector_iterator<vector_type, 2> pos(t1); + + typedef vector<int, char> vector_type2; + vector_type2 t2(999, 'z'); + + std::cout << insert_range(t1, pos, t2) << std::endl; + BOOST_TEST((insert_range(t1, pos, t2) + == make_vector(1, 'x', 999, 'z', 3.3, s))); + + std::cout << insert_range(t1, end(t1), t2) << std::endl; + BOOST_TEST((insert_range(t1, end(t1), t2) + == make_vector(1, 'x', 3.3, s, 999, 'z'))); + + std::cout << insert_range(t1, begin(t1), t2) << std::endl; + BOOST_TEST((insert_range(t1, begin(t1), t2) + == make_vector(999, 'z', 1, 'x', 3.3, s))); + } + + { + typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + typedef mpl::begin<mpl_vec>::type mpl_vec_begin; + typedef advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3; + typedef vector_c<int, -1, -2> mpl_vec2; + + std::cout << fusion::insert_range(mpl_vec(), mpl_vec_at3(), mpl_vec2()) << std::endl; + BOOST_TEST((fusion::insert_range(mpl_vec(), mpl_vec_at3(), mpl_vec2()) + == make_vector(1, 2, 3, -1, -2, 4, 5))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/iter_fold.cpp b/libs/fusion/test/algorithm/iter_fold.cpp new file mode 100644 index 000000000..b37f90db5 --- /dev/null +++ b/libs/fusion/test/algorithm/iter_fold.cpp @@ -0,0 +1,10 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#define BOOST_FUSION_TEST_ITER_FOLD +#include "fold.hpp" +#undef BOOST_FUSION_TEST_ITER_FOLD diff --git a/libs/fusion/test/algorithm/join.cpp b/libs/fusion/test/algorithm/join.cpp new file mode 100644 index 000000000..c0de1896a --- /dev/null +++ b/libs/fusion/test/algorithm/join.cpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/mpl/vector/vector10_c.hpp> + +int main() +{ + using namespace boost::fusion; + { + BOOST_TEST(join(make_vector(1,2), make_vector('a','b')) == make_vector(1,2,'a','b')); + } + { + typedef boost::mpl::vector2_c<int,1,2> vec1; + typedef boost::mpl::vector2_c<int,3,4> vec2; + BOOST_TEST(join(vec1(), vec2()) == make_vector(1,2,3,4)); + + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/algorithm/none.cpp b/libs/fusion/test/algorithm/none.cpp new file mode 100644 index 000000000..83dfa7528 --- /dev/null +++ b/libs/fusion/test/algorithm/none.cpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/algorithm/query/none.hpp> +#include <boost/lambda/lambda.hpp> +#include <boost/mpl/vector_c.hpp> + +namespace +{ + struct search_for + { + explicit search_for(int in_search) + : search(in_search) + {} + + template<typename T> + bool operator()(T const& v) const + { + return v == search; + } + + int search; + }; +} + +int +main() +{ + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST((boost::fusion::none(t, boost::lambda::_1 > 4))); + BOOST_TEST((boost::fusion::none(t, boost::lambda::_1 < 0))); + } + + { + boost::fusion::vector<int, short, double> t(1, 2, 3.3); + BOOST_TEST((!boost::fusion::none(t, boost::lambda::_1 == 1))); + BOOST_TEST((!boost::fusion::none(t, boost::lambda::_1 < 3))); + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec; + // We cannot use lambda here as mpl vec iterators return + // rvalues, and lambda needs lvalues. + BOOST_TEST(boost::fusion::none(mpl_vec(), search_for(4))); + BOOST_TEST(!boost::fusion::none(mpl_vec(), search_for(3))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/pop_back.cpp b/libs/fusion/test/algorithm/pop_back.cpp new file mode 100644 index 000000000..de7cc646a --- /dev/null +++ b/libs/fusion/test/algorithm/pop_back.cpp @@ -0,0 +1,104 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/algorithm/transformation/pop_back.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/include/back.hpp> +#include <boost/fusion/include/array.hpp> +#include <boost/array.hpp> +#include <boost/mpl/vector_c.hpp> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing pop_back + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + + { + std::cout << pop_back(t1) << std::endl; + BOOST_TEST((pop_back(t1) == make_vector(1, 'x', 3.3))); + } + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + std::cout << boost::fusion::pop_back(mpl_vec()) << std::endl; + BOOST_TEST((boost::fusion::pop_back(mpl_vec()) == make_vector(1, 2, 3, 4))); + } + + { + list<int, int> l(1, 2); + std::cout << pop_back(l) << std::endl; + BOOST_TEST((pop_back(l) == make_list(1))); + } + + { // make sure empty sequences are OK + list<int> l(1); + std::cout << pop_back(l) << std::endl; + BOOST_TEST((pop_back(l) == make_list())); + } + + { + single_view<int> sv(1); + std::cout << pop_back(sv) << std::endl; + + // Compile check only + begin(pop_back(sv)) == end(sv); + end(pop_back(sv)) == begin(sv); + } + + // $$$ JDG: TODO add compile fail facility $$$ + //~ { // compile fail check (Disabled for now) + //~ list<> l; + //~ std::cout << pop_back(l) << std::endl; + //~ } + +#ifndef BOOST_NO_AUTO_DECLARATIONS + { + auto vec = make_vector(1, 3.14, "hello"); + + // Compile check only + auto popv = pop_back(vec); + std::cout << popv << std::endl; + + auto push = push_back(vec, 42); + auto pop = pop_back(vec); + auto i1 = find<int>(popv); + auto i2 = find<double>(pop); + + BOOST_TEST(i1 != end(pop)); + BOOST_TEST(i2 != end(pop)); + BOOST_TEST(i1 != i2); + } +#endif + + { + boost::array<std::size_t, 2> a = { 10, 50 }; + BOOST_TEST(back(pop_back(a)) == 10); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/pop_front.cpp b/libs/fusion/test/algorithm/pop_front.cpp new file mode 100644 index 000000000..df95b38c1 --- /dev/null +++ b/libs/fusion/test/algorithm/pop_front.cpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/pop_front.hpp> +#include <boost/mpl/vector_c.hpp> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing pop_front + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + + { + std::cout << pop_front(t1) << std::endl; + BOOST_TEST((pop_front(t1) == make_vector('x', 3.3, s))); + } + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + std::cout << boost::fusion::pop_front(mpl_vec()) << std::endl; + BOOST_TEST((boost::fusion::pop_front(mpl_vec()) == make_vector(2, 3, 4, 5))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/push_back.cpp b/libs/fusion/test/algorithm/push_back.cpp new file mode 100644 index 000000000..b53007fcf --- /dev/null +++ b/libs/fusion/test/algorithm/push_back.cpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/mpl/vector_c.hpp> +#include <string> + +struct plus_one +{ + template <typename T> + void operator()(T& v) const + { + v += 1; + } +}; + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing push_back + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + + { + std::cout << push_back(t1, 123456) << std::endl; + BOOST_TEST((push_back(t1, 123456) + == make_vector(1, 'x', 3.3, s, 123456))); + } + + { + std::cout << push_back(t1, "funny") << std::endl; + BOOST_TEST((push_back(t1, "funny") + == make_vector(1, 'x', 3.3, s, std::string("funny")))); + } + + { + std::cout << push_back(t1, t1) << std::endl; + BOOST_TEST((push_back(t1, t1) + == make_vector(1, 'x', 3.3, s, t1))); + } + } + + { + typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec; + std::cout << boost::fusion::push_back(mpl_vec(), boost::mpl::int_<6>()) << std::endl; + BOOST_TEST((boost::fusion::push_back(mpl_vec(), boost::mpl::int_<6>()) + == make_vector(1, 2, 3, 4, 5, 6))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/push_front.cpp b/libs/fusion/test/algorithm/push_front.cpp new file mode 100644 index 000000000..8c63c5c3c --- /dev/null +++ b/libs/fusion/test/algorithm/push_front.cpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/push_front.hpp> +#include <boost/mpl/vector_c.hpp> +#include <string> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing push_front + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t1(1, 'x', 3.3, s); + + { + std::cout << push_front(t1, 123456) << std::endl; + BOOST_TEST((push_front(t1, 123456) + == make_vector(123456, 1, 'x', 3.3, s))); + } + + { + std::cout << push_front(t1, "lively") << std::endl; + BOOST_TEST((push_front(t1, "lively") + == make_vector(std::string("lively"), 1, 'x', 3.3, s))); + } + } + + { + typedef boost::mpl::vector_c<int, 2, 3, 4, 5, 6> mpl_vec; + std::cout << boost::fusion::push_front(mpl_vec(), boost::mpl::int_<1>()) << std::endl; + BOOST_TEST((boost::fusion::push_front(mpl_vec(), boost::mpl::int_<1>()) + == make_vector(1, 2, 3, 4, 5, 6))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/remove.cpp b/libs/fusion/test/algorithm/remove.cpp new file mode 100644 index 000000000..76e0c737c --- /dev/null +++ b/libs/fusion/test/algorithm/remove.cpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/remove.hpp> +#include <boost/mpl/vector.hpp> + +struct X +{ + operator char const*() const + { + return "<X-object>"; + } +}; + +struct Y +{ + operator char const*() const + { + return "<Y-object>"; + } +}; + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::identity; + using boost::mpl::vector; + namespace fusion = boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing remove + + X x; Y y; + typedef fusion::vector<Y, char, long, X, bool, double> vector_type; + vector_type t(y, '@', 987654, x, true, 6.6); + + { + std::cout << fusion::remove<X>(t) << std::endl; + BOOST_TEST((fusion::remove<X>(t) + == make_vector(y, '@', 987654, true, 6.6))); + } + + { + std::cout << fusion::remove<Y>(t) << std::endl; + BOOST_TEST((fusion::remove<Y>(t) + == make_vector('@', 987654, x, true, 6.6))); + } + + { + std::cout << fusion::remove<long>(t) << std::endl; + BOOST_TEST((fusion::remove<long>(t) + == make_vector(y, '@', x, true, 6.6))); + } + + { + typedef vector<Y, char, long, X, bool> mpl_vec; + BOOST_TEST((fusion::remove<X>(mpl_vec()) + == vector<Y, char, long, bool>())); + BOOST_TEST((fusion::remove<Y>(mpl_vec()) + == vector<char, long, X, bool>())); + BOOST_TEST((fusion::remove<long>(mpl_vec()) + == vector<Y, char, X, bool>())); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/remove_if.cpp b/libs/fusion/test/algorithm/remove_if.cpp new file mode 100644 index 000000000..62313d3a5 --- /dev/null +++ b/libs/fusion/test/algorithm/remove_if.cpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/remove_if.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/vector.hpp> + +struct X +{ + operator char const*() const + { + return "<X-object>"; + } +}; + +struct Y +{ + operator char const*() const + { + return "<Y-object>"; + } +}; + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::vector; + using boost::mpl::_; + using boost::mpl::not_; + using boost::is_class; + using boost::is_same; + namespace fusion = boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing remove_if + + X x; Y y; + typedef fusion::vector<Y, char, long, X, bool, double> vector_type; + vector_type t(y, '@', 987654, x, true, 6.6); + + { + std::cout << remove_if<not_<is_class<_> > >(t) << std::endl; + BOOST_TEST((remove_if<not_<is_class<_> > >(t) + == make_vector(y, x))); + } + + { + std::cout << remove_if<is_class<_> >(t) << std::endl; + BOOST_TEST((remove_if<is_class<_> >(t) + == make_vector('@', 987654, true, 6.6))); + } + + { + typedef vector<Y, char, long, X, bool> mpl_vec; + BOOST_TEST((remove_if<not_<is_class<_> > >(mpl_vec()) + == vector<Y, X>())); + BOOST_TEST((remove_if<is_class<_> >(mpl_vec()) + == vector<char, long, bool>())); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/replace.cpp b/libs/fusion/test/algorithm/replace.cpp new file mode 100644 index 000000000..ddd651301 --- /dev/null +++ b/libs/fusion/test/algorithm/replace.cpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/replace.hpp> +#include <string> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing replace + + { + char const* s = "Ruby"; + typedef vector<int, char, long, char const*> vector_type; + vector_type t1(1, 'x', 3, s); + + { + std::cout << replace(t1, 'x', 'y') << std::endl; + BOOST_TEST((replace(t1, 'x', 'y') + == make_vector(1, 'y', 3, s))); + } + + { + char const* s2 = "funny"; + std::cout << replace(t1, s, s2) << std::endl; + BOOST_TEST((replace(t1, s, s2) + == make_vector(1, 'x', 3, s2))); + } + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/replace_if.cpp b/libs/fusion/test/algorithm/replace_if.cpp new file mode 100644 index 000000000..7327632fe --- /dev/null +++ b/libs/fusion/test/algorithm/replace_if.cpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/algorithm/transformation/replace_if.hpp> +#include <string> + +struct gt3 +{ + template <typename T> + bool operator()(T x) const + { + return x > 3; + } +}; + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing replace + + { + char const* s = "Ruby"; + typedef vector<int, short, double, long, char const*, float> vector_type; + vector_type t1(1, 2, 3.3, 4, s, 5.5); + + { + std::cout << replace_if(t1, gt3(), -456) << std::endl; + BOOST_TEST((replace_if(t1, gt3(), -456) + == make_vector(1, 2, -456, -456, s, -456))); + } + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/reverse.cpp b/libs/fusion/test/algorithm/reverse.cpp new file mode 100644 index 000000000..718d5b248 --- /dev/null +++ b/libs/fusion/test/algorithm/reverse.cpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/reverse.hpp> +#include <boost/mpl/range_c.hpp> + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing the reverse_view + + { + typedef boost::mpl::range_c<int, 5, 9> mpl_list1; + mpl_list1 sequence; + + std::cout << reverse(sequence) << std::endl; + BOOST_TEST((reverse(sequence) == make_vector(8, 7, 6, 5))); + } + + { + char const* s = "Hi Kim"; + typedef vector<int, char, double, char const*> vector_type; + vector_type t(123, 'x', 3.36, s); + + std::cout << reverse(t) << std::endl; + BOOST_TEST((reverse(t) == make_vector(s, 3.36, 'x', 123))); + std::cout << reverse(reverse(t)) << std::endl; + BOOST_TEST((reverse(reverse(t)) == t)); + } + + return boost::report_errors(); +} + + diff --git a/libs/fusion/test/algorithm/reverse_fold.cpp b/libs/fusion/test/algorithm/reverse_fold.cpp new file mode 100644 index 000000000..7742bca84 --- /dev/null +++ b/libs/fusion/test/algorithm/reverse_fold.cpp @@ -0,0 +1,10 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#define BOOST_FUSION_TEST_REVERSE_FOLD +#include "fold.hpp" +#undef BOOST_FUSION_TEST_REVERSE_FOLD diff --git a/libs/fusion/test/algorithm/reverse_iter_fold.cpp b/libs/fusion/test/algorithm/reverse_iter_fold.cpp new file mode 100644 index 000000000..31e4cf265 --- /dev/null +++ b/libs/fusion/test/algorithm/reverse_iter_fold.cpp @@ -0,0 +1,12 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#define BOOST_FUSION_TEST_REVERSE_FOLD +#define BOOST_FUSION_TEST_ITER_FOLD +#include "fold.hpp" +#undef BOOST_FUSION_TEST_ITER_FOLD +#undef BOOST_FUSION_TEST_REVERSE_FOLD diff --git a/libs/fusion/test/algorithm/segmented_find.cpp b/libs/fusion/test/algorithm/segmented_find.cpp new file mode 100644 index 000000000..8ce0b6d55 --- /dev/null +++ b/libs/fusion/test/algorithm/segmented_find.cpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include "../sequence/tree.hpp" + +struct not_there {}; + +template<typename Tree> +void +process_tree(Tree const &tree) +{ + using namespace boost; + + typedef typename boost::fusion::result_of::find<Tree const, short>::type short_iter; + typedef typename boost::fusion::result_of::find<Tree const, float>::type float_iter; + typedef typename boost::fusion::result_of::find<Tree const, not_there>::type not_there_iter; + + // find_if_s of a segmented data structure returns generic + // segmented iterators + short_iter si = fusion::find<short>(tree); + float_iter fi = fusion::find<float>(tree); + + // they behave like ordinary Fusion iterators ... + BOOST_TEST((*si == short('d'))); + BOOST_TEST((*fi == float(1))); + + // Searching for something that's not there should return the end iterator. + not_there_iter nti = fusion::find<not_there>(tree); + BOOST_TEST((nti == fusion::end(tree))); +} + +int +main() +{ + using namespace boost::fusion; + process_tree( + make_tree( + make_vector(double(0),'B') + , make_tree( + make_vector(1,2,long(3)) + , make_tree(make_vector('a','b','c')) + , make_tree(make_vector(short('d'),'e','f')) + ) + , make_tree( + make_vector(4,5,6) + , make_tree(make_vector(float(1),'h','i')) + , make_tree(make_vector('j','k','l')) + ) + ) + ); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/segmented_find_if.cpp b/libs/fusion/test/algorithm/segmented_find_if.cpp new file mode 100644 index 000000000..98d963cff --- /dev/null +++ b/libs/fusion/test/algorithm/segmented_find_if.cpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/algorithm/query/find_if.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/mpl/placeholders.hpp> +#include <boost/type_traits/is_same.hpp> +#include "../sequence/tree.hpp" + +struct not_there {}; + +template<typename Tree> +void +process_tree(Tree const &tree) +{ + using namespace boost; + using mpl::_; + + typedef typename boost::fusion::result_of::find_if<Tree const, is_same<_,short> >::type short_iter; + typedef typename boost::fusion::result_of::find_if<Tree const, is_same<_,float> >::type float_iter; + typedef typename boost::fusion::result_of::find_if<Tree const, is_same<_,not_there> >::type not_there_iter; + + // find_if of a segmented data structure returns generic + // segmented iterators + short_iter si = fusion::find_if<is_same<_,short> >(tree); + float_iter fi = fusion::find_if<is_same<_,float> >(tree); + + // they behave like ordinary Fusion iterators ... + BOOST_TEST((*si == short('d'))); + BOOST_TEST((*fi == float(1))); + + // Searching for something that's not there should return the end iterator. + not_there_iter nti = fusion::find_if<is_same<_,not_there> >(tree); + BOOST_TEST((nti == fusion::end(tree))); +} + +int +main() +{ + using namespace boost::fusion; + process_tree( + make_tree( + make_vector(double(0),'B') + , make_tree( + make_vector(1,2,long(3)) + , make_tree(make_vector('a','b','c')) + , make_tree(make_vector(short('d'),'e','f')) + ) + , make_tree( + make_vector(4,5,6) + , make_tree(make_vector(float(1),'h','i')) + , make_tree(make_vector('j','k','l')) + ) + ) + ); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/segmented_fold.cpp b/libs/fusion/test/algorithm/segmented_fold.cpp new file mode 100644 index 000000000..af51ca89f --- /dev/null +++ b/libs/fusion/test/algorithm/segmented_fold.cpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <string> +#include <sstream> +#include <iostream> +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include "../sequence/tree.hpp" + +struct write_string +{ + typedef std::ostream* result_type; + + template<typename T> + std::ostream* operator()(std::ostream* sout, T const& t) const + { + return &(*sout << t << " "); + } +}; + +template<typename Tree> +void +process_tree(Tree const &tree) +{ + using namespace boost; + + std::stringstream str; + fusion::fold(tree, &str, write_string()); + std::string res = str.str(); + + BOOST_TEST_EQ(res, "a b c 1 2 3 100 e f 0 B 1 h i 4 5 6 j k l "); +} + +int +main() +{ + using namespace boost::fusion; + process_tree( + make_tree( + make_vector(double(0),'B') + , make_tree( + make_vector(1,2,long(3)) + , make_tree(make_vector('a','b','c')) + , make_tree(make_vector(short('d'),'e','f')) + ) + , make_tree( + make_vector(4,5,6) + , make_tree(make_vector(float(1),'h','i')) + , make_tree(make_vector('j','k','l')) + ) + ) + ); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/segmented_for_each.cpp b/libs/fusion/test/algorithm/segmented_for_each.cpp new file mode 100644 index 000000000..84260a68b --- /dev/null +++ b/libs/fusion/test/algorithm/segmented_for_each.cpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include "../sequence/tree.hpp" + +struct print +{ + template <typename T> + void operator()(T const& v) const + { + std::cout << "[ " << v << " ] "; + } +}; + +int +main() +{ + using namespace boost::fusion; + + { + for_each( + make_tree( + make_vector(double(0),'B') + , make_tree( + make_vector(1,2,long(3)) + , make_tree(make_vector('a','b','c')) + , make_tree(make_vector(short('d'),'e','f')) + ) + , make_tree( + make_vector(4,5,6) + , make_tree(make_vector(float(1),'h','i')) + , make_tree(make_vector('j','k','l')) + ) + ) + , print() + ); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/transform.cpp b/libs/fusion/test/algorithm/transform.cpp new file mode 100644 index 000000000..8609f61cd --- /dev/null +++ b/libs/fusion/test/algorithm/transform.cpp @@ -0,0 +1,157 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/type_traits/is_reference.hpp> + +struct square +{ + template<typename Sig> + struct result; + + template <typename T> + struct result<square(T)> + { + typedef int type; + }; + + template <typename T> + int operator()(T x) const + { + return x * x; + } +}; + +struct add +{ + template<typename Sig> + struct result; + + template <typename A, typename B> + struct result<add(A, B)> + { + typedef int type; + }; + + template <typename A, typename B> + int operator()(A a, B b) const + { + return a + b; + } +}; + +struct unary_lvalue_transform +{ + template<typename Sig> + struct result; + + template<typename T> + struct result<unary_lvalue_transform(T&)> + { + typedef T* type; + }; + + template<typename T> + T* operator()(T& t) const + { + return &t; + } +}; + +int twice(int v) +{ + return v*2; +} + +struct binary_lvalue_transform +{ + template<typename Sig> + struct result; + + template<typename T0, typename T1> + struct result<binary_lvalue_transform(T0&,T1&)> + { + typedef T0* type; + }; + + template<typename T0, typename T1> + T0* operator()(T0& t0, T1&) const + { + return &t0; + } +}; + +int +main() +{ + using namespace boost::fusion; + using boost::mpl::range_c; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing the transform + + { + typedef range_c<int, 5, 9> sequence_type; + sequence_type sequence; + std::cout << boost::fusion::transform(sequence, square()) << std::endl; + BOOST_TEST((boost::fusion::transform(sequence, square()) == make_vector(25, 36, 49, 64))); + } + + { + typedef range_c<int, 5, 9> mpl_list1; + std::cout << boost::fusion::transform(mpl_list1(), square()) << std::endl; + BOOST_TEST((boost::fusion::transform(mpl_list1(), square()) == make_vector(25, 36, 49, 64))); + } + + { + vector<int, int, int> tup(1, 2, 3); + std::cout << boost::fusion::transform(tup, square()) << std::endl; + BOOST_TEST((boost::fusion::transform(tup, square()) == make_vector(1, 4, 9))); + } + + { + vector<int, int, int> tup1(1, 2, 3); + vector<int, int, int> tup2(4, 5, 6); + std::cout << boost::fusion::transform(tup1, tup2, add()) << std::endl; + BOOST_TEST((boost::fusion::transform(tup1, tup2, add()) == make_vector(5, 7, 9))); + } + + { + // Unary transform that requires lvalues, just check compilation + vector<int, int, int> tup1(1, 2, 3); + BOOST_TEST(at_c<0>(boost::fusion::transform(tup1, unary_lvalue_transform())) == &at_c<0>(tup1)); + BOOST_TEST(*begin(boost::fusion::transform(tup1, unary_lvalue_transform())) == &at_c<0>(tup1)); + } + + { + vector<int, int, int> tup1(1, 2, 3); + vector<int, int, int> tup2(4, 5, 6); + BOOST_TEST(at_c<0>(boost::fusion::transform(tup1, tup2, binary_lvalue_transform())) == &at_c<0>(tup1)); + BOOST_TEST(*begin(boost::fusion::transform(tup1, tup2, binary_lvalue_transform())) == &at_c<0>(tup1)); + } + + { + vector<int, int, int> tup1(1, 2, 3); + BOOST_TEST(boost::fusion::transform(tup1, twice) == make_vector(2,4,6)); + } + + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/algorithm/zip.cpp b/libs/fusion/test/algorithm/zip.cpp new file mode 100644 index 000000000..b6a4f097e --- /dev/null +++ b/libs/fusion/test/algorithm/zip.cpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/mpl/vector.hpp> + +int main() +{ + using namespace boost::fusion; + { + BOOST_TEST(zip(make_vector(1,2), make_vector('a','b')) == make_vector(make_vector(1,'a'), make_vector(2,'b'))); + BOOST_TEST( + zip( + make_vector(1,2), + make_vector('a','b'), + make_vector(-1,-2)) + == make_vector( + make_vector(1,'a',-1), + make_vector(2,'b',-2))); // Zip more than 2 sequences + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/algorithm/zip2.cpp b/libs/fusion/test/algorithm/zip2.cpp new file mode 100644 index 000000000..f35e4d5d8 --- /dev/null +++ b/libs/fusion/test/algorithm/zip2.cpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/mpl/vector.hpp> + +int main() +{ + using namespace boost::fusion; + { + const vector2<int,int> shorter(1,2); + const vector3<char,char,char> longer('a', 'b', 'c'); + const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b')); + BOOST_TEST(zip(shorter, longer) == result); + } + { + const vector3<int,int,int> longer(1,2,3); + const vector2<char,char> shorter('a', 'b'); + const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b')); + BOOST_TEST(zip(longer, shorter) == result); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/algorithm/zip_ignore.cpp b/libs/fusion/test/algorithm/zip_ignore.cpp new file mode 100644 index 000000000..a12b58201 --- /dev/null +++ b/libs/fusion/test/algorithm/zip_ignore.cpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/support/unused.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/fusion/sequence/intrinsic.hpp> + +int main() +{ + using namespace boost::fusion; + { + vector<int, int> iv(1,2); + vector<char, char> cv('a', 'b'); + BOOST_TEST(at_c<0>(at_c<0>(zip(iv, unused, cv))) == 1); + BOOST_TEST(at_c<2>(at_c<0>(zip(iv, unused, cv))) == 'a'); + + BOOST_TEST(at_c<0>(at_c<1>(zip(iv, unused, cv))) == 2); + BOOST_TEST(at_c<2>(at_c<1>(zip(iv, unused, cv))) == 'b'); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/compile_time/Makefile b/libs/fusion/test/compile_time/Makefile new file mode 100644 index 000000000..4887cf248 --- /dev/null +++ b/libs/fusion/test/compile_time/Makefile @@ -0,0 +1,29 @@ +#============================================================================= +# Copyright (c) 2008 Dan Marsden +# +# Use modification and distribution are 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). +#============================================================================== + +CXX=g++ +CXXFLAGS=-I$(BOOST_ROOT) + +TEST_SRCS=\ + vector_construction.cpp\ + vector_iteration.cpp\ + vector_intrinsic.cpp\ + fold.cpp\ + transform.cpp + +TEST_OBJS=$(TEST_SRCS:.cpp=.o) + +TEST_TARGETS=$(TEST_SRCS:.cpp=.test) + +all: $(TEST_TARGETS) + +%.test : %.cpp + time $(CXX) $(CXXFLAGS) $< -o $@ + +clean: + rm -f $(TEST_TARGETS) $(TEST_OBJS) diff --git a/libs/fusion/test/compile_time/driver.hpp b/libs/fusion/test/compile_time/driver.hpp new file mode 100644 index 000000000..8d06e6deb --- /dev/null +++ b/libs/fusion/test/compile_time/driver.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#if !defined(BOOST_FUSION_COMPILE_TIME_DRIVER) +#define BOOST_FUSION_COMPILE_TIME_DRIVER + +int main() +{ + test<0>(); + test<1>(); + test<2>(); + test<3>(); + test<4>(); + + test<5>(); + test<6>(); + test<7>(); + test<8>(); + test<9>(); + + test<10>(); + test<11>(); + test<12>(); + test<13>(); + test<14>(); + + test<15>(); + test<16>(); + test<17>(); + test<18>(); + test<19>(); + + test<20>(); + test<21>(); + test<22>(); + test<23>(); + test<24>(); + + test<25>(); + test<26>(); + test<27>(); + test<28>(); + test<29>(); + + test<30>(); + test<31>(); + test<32>(); + test<33>(); + test<34>(); + + test<35>(); + test<36>(); + test<37>(); + test<38>(); + test<39>(); + + test<40>(); + test<41>(); + test<42>(); + test<43>(); + test<44>(); + + test<45>(); + test<46>(); + test<47>(); + test<48>(); + test<49>(); +} + +#endif diff --git a/libs/fusion/test/compile_time/fold.cpp b/libs/fusion/test/compile_time/fold.cpp new file mode 100644 index 000000000..5fb618dd4 --- /dev/null +++ b/libs/fusion/test/compile_time/fold.cpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/include/fold.hpp> +#include <boost/fusion/include/vector.hpp> + +namespace fusion = boost::fusion; + +namespace +{ + template<int n, int batch> + struct distinct + {}; + + struct f + { + typedef int result_type; + + template<int n, int batch> + int operator()(int state, distinct<n, batch> const& d) const + { + return state + n; + } + }; + + template<int batch> + void test() + { + fusion::vector< + distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, + distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v; + + fusion::fold(v, 0, f()); + } +} + +#include "./driver.hpp" diff --git a/libs/fusion/test/compile_time/transform.cpp b/libs/fusion/test/compile_time/transform.cpp new file mode 100644 index 000000000..04ad8ab24 --- /dev/null +++ b/libs/fusion/test/compile_time/transform.cpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/for_each.hpp> +#include <boost/fusion/include/vector.hpp> + +namespace fusion = boost::fusion; + +namespace +{ + template<int n, int batch> + struct distinct + { + static const int value = n; + }; + + struct f + { + typedef int result_type; + + template<typename T> + result_type operator()(T const& t) const + { + return T::value; + } + }; + + struct touch + { + template<typename T> + void operator()(T const&) const + {} + }; + + template<int batch> + void test() + { + fusion::vector< + distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, + distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v; + + // We're testing transform really + // for_each call is to force iteration through the lazy + // transform, otherwise very little will happen. + fusion::for_each(fusion::transform(v, f()), touch()); + } +} + +#include "./driver.hpp" diff --git a/libs/fusion/test/compile_time/vector_construction.cpp b/libs/fusion/test/compile_time/vector_construction.cpp new file mode 100644 index 000000000..18f9f16b4 --- /dev/null +++ b/libs/fusion/test/compile_time/vector_construction.cpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/include/vector.hpp> + +namespace fusion = boost::fusion; + +namespace +{ + template<int n, int batch> + struct distinct + {}; + + template<int batch> + void test() + { + fusion::vector< + distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, + distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v; + } +} + +#include "./driver.hpp" diff --git a/libs/fusion/test/compile_time/vector_intrinsic.cpp b/libs/fusion/test/compile_time/vector_intrinsic.cpp new file mode 100644 index 000000000..3690a496b --- /dev/null +++ b/libs/fusion/test/compile_time/vector_intrinsic.cpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/intrinsic.hpp> + +namespace fusion = boost::fusion; + +namespace +{ + template<int n, int batch> + struct distinct + {}; + + template<int batch> + void test() + { + typedef fusion::vector< + distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, + distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v_type; + + v_type v; + + fusion::at_c<0>(v); + fusion::at_c<1>(v); + fusion::at_c<2>(v); + fusion::at_c<3>(v); + fusion::at_c<4>(v); + + fusion::at_c<5>(v); + fusion::at_c<6>(v); + fusion::at_c<7>(v); + fusion::at_c<8>(v); + fusion::at_c<9>(v); + + typedef typename boost::fusion::result_of::value_at_c<v_type, 0>::type va0; + typedef typename boost::fusion::result_of::value_at_c<v_type, 1>::type va1; + typedef typename boost::fusion::result_of::value_at_c<v_type, 2>::type va2; + typedef typename boost::fusion::result_of::value_at_c<v_type, 3>::type va3; + typedef typename boost::fusion::result_of::value_at_c<v_type, 4>::type va4; + + typedef typename boost::fusion::result_of::value_at_c<v_type, 5>::type va5; + typedef typename boost::fusion::result_of::value_at_c<v_type, 6>::type va6; + typedef typename boost::fusion::result_of::value_at_c<v_type, 7>::type va7; + typedef typename boost::fusion::result_of::value_at_c<v_type, 8>::type va8; + typedef typename boost::fusion::result_of::value_at_c<v_type, 9>::type va9; + + fusion::begin(v); + fusion::end(v); + fusion::size(v); + } +} + +#include "./driver.hpp" diff --git a/libs/fusion/test/compile_time/vector_iteration.cpp b/libs/fusion/test/compile_time/vector_iteration.cpp new file mode 100644 index 000000000..ee63bee5a --- /dev/null +++ b/libs/fusion/test/compile_time/vector_iteration.cpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2008 Dan Marsden + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/for_each.hpp> + +namespace fusion = boost::fusion; + +namespace +{ + template<int n, int batch> + struct distinct + {}; + + struct null_op + { + template<typename T> + void operator()(T const& t) const + {} + }; + + template<int batch> + void test() + { + fusion::vector< + distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, + distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v; + + fusion::for_each(v, null_op()); + } +} + +#include "./driver.hpp" diff --git a/libs/fusion/test/functional/fused.cpp b/libs/fusion/test/functional/fused.cpp new file mode 100644 index 000000000..e2c893956 --- /dev/null +++ b/libs/fusion/test/functional/fused.cpp @@ -0,0 +1,97 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/adapter/fused.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/assert.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; + +template <class Base = boost::blank> +struct test_func + : Base +{ + typedef int result_type; + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return 4+x-y; + } +}; + +int main() +{ + test_func<noncopyable> f; + + typedef fusion::fused< test_func<> > ff; + ff fused_func; + + typedef fusion::fused< test_func<noncopyable> & > ffr; + ffr fused_func_ref(f); + + typedef fusion::fused< test_func<> const > ffc; + ffc fused_func_c; + + typedef fusion::fused< test_func<> > const ffc2; + ffc2 fused_func_c2; + + typedef fusion::fused< test_func<noncopyable> const & > ffcr; + ffcr fused_func_c_ref(f); + + typedef fusion::vector<int,char> vec; + vec lv_vec(1,'\004'); + + BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ff(vec)>::type, int>)); + BOOST_TEST(fused_func(lv_vec) == 1); + BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffr(vec)>::type, int>)); + BOOST_TEST(fused_func_c(lv_vec) == 0); + BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffc(vec)>::type, int>)); + BOOST_TEST(fused_func_c2(lv_vec) == 0); + BOOST_TEST(fused_func_ref(lv_vec) == 1); + BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffcr(vec)>::type, int>)); + BOOST_TEST(fused_func_c_ref(lv_vec) == 0); + + BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fused_func_c(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fused_func_c2(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fused_func_ref(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fused_func_c_ref(fusion::make_vector(2,'\003')) == 0); + + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/functional/fused_function_object.cpp b/libs/fusion/test/functional/fused_function_object.cpp new file mode 100644 index 000000000..c8d4c590d --- /dev/null +++ b/libs/fusion/test/functional/fused_function_object.cpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/adapter/fused_function_object.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; + +template <class Base = boost::blank> +struct test_func + : Base +{ + template<typename T> + struct result; + + template<class Self, typename T0, typename T1> + struct result< Self(T0, T1) > + { + typedef int type; + }; + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return 4+x-y; + } +}; + +int main() +{ + test_func<noncopyable> f; + fusion::fused_function_object< test_func<> > fused_func; + fusion::fused_function_object< test_func<noncopyable> & > fused_func_ref(f); + fusion::fused_function_object< test_func<> const > fused_func_c; + fusion::fused_function_object< test_func<> > const fused_func_c2; + fusion::fused_function_object< test_func<noncopyable> const & > fused_func_c_ref(f); + + fusion::vector<int,char> lv_vec(1,'\004'); + BOOST_TEST(fused_func(lv_vec) == 1); + BOOST_TEST(fused_func_c(lv_vec) == 0); + BOOST_TEST(fused_func_c2(lv_vec) == 0); + BOOST_TEST(fused_func_ref(lv_vec) == 1); + BOOST_TEST(fused_func_c_ref(lv_vec) == 0); + + BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fused_func_c(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fused_func_c2(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fused_func_ref(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fused_func_c_ref(fusion::make_vector(2,'\003')) == 0); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/fused_procedure.cpp b/libs/fusion/test/functional/fused_procedure.cpp new file mode 100644 index 000000000..57443c208 --- /dev/null +++ b/libs/fusion/test/functional/fused_procedure.cpp @@ -0,0 +1,82 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/adapter/fused_procedure.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; + +int effect; + +#define CHECK_EFFECT(t,e) \ + { \ + effect = 1234567; t; \ + BOOST_TEST(effect == e); \ + } + +template <class Base = boost::blank> +struct test_func + : Base +{ + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return effect = 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return effect = 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return effect = 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return effect = 4+x-y; + } +}; + +int main() +{ + test_func<noncopyable> f; + fusion::fused_procedure< test_func<> > fused_proc; + fusion::fused_procedure< test_func<noncopyable> & > fused_proc_ref(f); + fusion::fused_procedure< test_func<> const > fused_proc_c; + fusion::fused_procedure< test_func<> > const fused_proc_c2; + fusion::fused_procedure< test_func<noncopyable> const & > fused_proc_c_ref(f); + + fusion::vector<int,char> lv_vec(1,'\004'); + CHECK_EFFECT(fused_proc(lv_vec), 1); + CHECK_EFFECT(fused_proc_c(lv_vec), 0); + CHECK_EFFECT(fused_proc_c2(lv_vec), 0); + CHECK_EFFECT(fused_proc_ref(lv_vec), 1); + CHECK_EFFECT(fused_proc_c_ref(lv_vec), 0); + + CHECK_EFFECT(fused_proc(fusion::make_vector(2,'\003')), 1); + CHECK_EFFECT(fused_proc_c(fusion::make_vector(2,'\003')), 0); + CHECK_EFFECT(fused_proc_c2(fusion::make_vector(2,'\003')), 0); + CHECK_EFFECT(fused_proc_ref(fusion::make_vector(2,'\003')), 1); + CHECK_EFFECT(fused_proc_c_ref(fusion::make_vector(2,'\003')), 0); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/invoke.cpp b/libs/fusion/test/functional/invoke.cpp new file mode 100644 index 000000000..52740eecf --- /dev/null +++ b/libs/fusion/test/functional/invoke.cpp @@ -0,0 +1,394 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/invocation/invoke.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <memory> +#include <boost/noncopyable.hpp> + +#include <boost/type_traits/is_same.hpp> + +#include <boost/mpl/int.hpp> + +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/view/single_view.hpp> +#include <boost/fusion/view/iterator_range.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> + +namespace mpl = boost::mpl; +namespace fusion = boost::fusion; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +struct object {}; +struct object_nc : boost::noncopyable {}; + +struct fobj +{ + // Handle nullary separately to exercise result_of support + template <typename Sig> + struct result; + + template <class Self, typename T0> + struct result< Self(T0) > + { + typedef int type; + }; + + template <class Self, typename T0, typename T1> + struct result< Self(T0, T1) > + { + typedef int type; + }; + + template <class Self, typename T0, typename T1, typename T2> + struct result< Self(T0, T1, T2) > + { + typedef int type; + }; + + int operator()(int i) { return 2 + i; } + int operator()(int i) const { return 3 + i; } + + int operator()(int i, object &) { return 4 + i; } + int operator()(int i, object &) const { return 5 + i; } + int operator()(int i, object const &) { return 6 + i; } + int operator()(int i, object const &) const { return 7 + i; } + + int operator()(int i, object &, object_nc &) { return 10 + i; } + int operator()(int i, object &, object_nc &) const { return 11 + i; } +}; + +struct nullary_fobj +{ + typedef int result_type; + + int operator()() { return 0; } + int operator()() const { return 1; } +}; + +struct fobj_nc + : boost::noncopyable +{ + // Handle nullary separately to exercise result_of support + template <typename Sig> + struct result; + + template <class Self, typename T0> + struct result< Self(T0)> + { + typedef int type; + }; + + int operator()(int i) { return 14 + i; } + int operator()(int i) const { return 15 + i; } +}; + +struct nullary_fobj_nc + : boost::noncopyable +{ + typedef int result_type; + + int operator()() { return 12; } + int operator()() const { return 13; } +}; + +int nullary() { return 16; } +int unary(int i) { return 17 + i; } +int binary1(int i, object &) { return 18 + i; } +int binary2(int i, object const &) { return 19 + i; } + +typedef int (* func_ptr)(int); +typedef int (* const c_func_ptr)(int); +typedef int (* volatile v_func_ptr)(int); +typedef int (* const volatile cv_func_ptr)(int); + + func_ptr func_ptr1 = &unary; + c_func_ptr func_ptr2 = &unary; + v_func_ptr func_ptr3 = &unary; +cv_func_ptr func_ptr4 = &unary; + +class members +{ + public: + int data; + + members() + : data(20) + { } + + int nullary() { return data + 1; } + int nullary_c() const { return data + 2; } + int unary(int i) { return data + 3 + i; } + int unary_c(int i) const { return data + 4 + i; } + int binary(int i, object) { return data + 5 + i; } + int binary_c(int i, object) const { return data + 6 + i; } +}; + +struct derived + : members +{ +}; + +typedef int element1_type; +typedef object element2_type; +typedef object_nc & element3_type; + +int element1 = 100; +object element2 = object(); +object_nc element3; + +members that; + +std::auto_ptr<members> spt_that(new members); +std::auto_ptr<members const> spt_that_c(new members); + +fusion::single_view<members > sv_obj_ctx( that); +fusion::single_view<members &> sv_ref_ctx( that); +fusion::single_view<members *> sv_ptr_ctx(& that); +fusion::single_view<members const > sv_obj_c_ctx( that); +fusion::single_view<members const &> sv_ref_c_ctx( that); +fusion::single_view<members const *> sv_ptr_c_ctx(& that); +fusion::single_view<std::auto_ptr<members> const &> sv_spt_ctx(spt_that); +fusion::single_view< std::auto_ptr<members const> const &> sv_spt_c_ctx(spt_that_c); + +derived derived_that; + +std::auto_ptr<derived> spt_derived_that(new derived); +std::auto_ptr<derived const> spt_derived_that_c(new derived); + +fusion::single_view<derived > sv_obj_d_ctx( derived_that); +fusion::single_view<derived &> sv_ref_d_ctx( derived_that); +fusion::single_view<derived *> sv_ptr_d_ctx(& derived_that); +fusion::single_view<derived const > sv_obj_c_d_ctx( derived_that); +fusion::single_view<derived const &> sv_ref_c_d_ctx( derived_that); +fusion::single_view<derived const *> sv_ptr_c_d_ctx(& derived_that); +fusion::single_view<std::auto_ptr<derived> const &> sv_spt_d_ctx(spt_derived_that); +fusion::single_view< std::auto_ptr<derived const> const &> sv_spt_c_d_ctx(spt_derived_that_c); + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<0>) +{ + // Function Objects + + nullary_fobj f; + + BOOST_TEST(f () == fusion::invoke(f , seq )); + BOOST_TEST(f () == fusion::invoke(f , const_(seq))); + + // Note: The function object is taken by value, so we request the copy + // to be const with an explicit template argument. We can also request + // the function object to be pased by reference... + BOOST_TEST(const_(f)() == fusion::invoke<nullary_fobj const >(const_(f), seq )); + BOOST_TEST(const_(f)() == fusion::invoke<nullary_fobj const &>(const_(f), const_(seq))); + + nullary_fobj_nc nc_f; + // ...and we further ensure there is no copying in this case, using a + // noncopyable function object. + BOOST_TEST(nc_f () == fusion::invoke<nullary_fobj_nc &>(nc_f , seq )); + BOOST_TEST(nc_f () == fusion::invoke<nullary_fobj_nc &>(nc_f , const_(seq))); + BOOST_TEST(const_(nc_f)() == fusion::invoke<nullary_fobj_nc const &>(const_(nc_f), seq )); + BOOST_TEST(const_(nc_f)() == fusion::invoke<nullary_fobj_nc const &>(const_(nc_f), const_(seq))); + + // Builtin Functions + + // Call through ref/ptr to function + BOOST_TEST(nullary() == fusion::invoke<int (&)()>(nullary, seq)); + BOOST_TEST(nullary() == fusion::invoke(& nullary, seq)); + + // Call through ptr to member function + // Note: The non-const function members::nullary can't be invoked with + // fusion::join(sv_obj_ctx,seq)), which is const and so is its first element + BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_obj_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_obj_c_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ref_c_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ptr_c_ctx,seq))); + BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_spt_c_ctx,seq))); + + // Pointer to data member + + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_ctx,seq)) = that.data)); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_ctx,seq))); + + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_d_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_d_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_d_ctx,seq)) = that.data)); + BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_d_ctx,seq)) = that.data)); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_d_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_d_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_d_ctx,seq))); + BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_d_ctx,seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<1>) +{ + fobj f; + BOOST_TEST(f(element1) == fusion::invoke(f , seq )); + BOOST_TEST(f(element1) == fusion::invoke(f , const_(seq))); + BOOST_TEST(const_(f)(element1) == fusion::invoke<fobj const >(const_(f), seq )); + BOOST_TEST(const_(f)(element1) == fusion::invoke<fobj const &>(const_(f), const_(seq))); + + fobj_nc nc_f; + BOOST_TEST(nc_f(element1) == fusion::invoke<fobj_nc &>(nc_f, seq )); + BOOST_TEST(nc_f(element1) == fusion::invoke<fobj_nc &>(nc_f, const_(seq))); + BOOST_TEST(const_(nc_f)(element1) == fusion::invoke<fobj_nc const &>(const_(nc_f), seq )); + BOOST_TEST(const_(nc_f)(element1) == fusion::invoke<fobj_nc const &>(const_(nc_f), const_(seq))); + + BOOST_TEST(unary(element1) == fusion::invoke<int (&)(int)>(unary, seq)); + BOOST_TEST(func_ptr1(element1) == fusion::invoke(func_ptr1, seq)); + BOOST_TEST(func_ptr2(element1) == fusion::invoke(func_ptr2, seq)); + BOOST_TEST(func_ptr3(element1) == fusion::invoke(func_ptr3, seq)); + BOOST_TEST(func_ptr4(element1) == fusion::invoke(func_ptr4, seq)); + + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_c_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_c_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_c_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_c_ctx,seq))); + + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ref_d_ctx,seq))); + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ptr_d_ctx,seq))); + BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_spt_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_c_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_c_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_c_d_ctx,seq))); + BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_c_d_ctx,seq))); + +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<2>) +{ + fobj f; + BOOST_TEST(f (element1, element2) == fusion::invoke(f , seq)); + BOOST_TEST(f (element1, const_(element2)) == fusion::invoke(f , const_(seq))); + BOOST_TEST(const_(f)(element1, element2) == fusion::invoke<fobj const>(const_(f), seq)); + BOOST_TEST(const_(f)(element1, const_(element2)) == fusion::invoke<fobj const>(const_(f), const_(seq))); + + BOOST_TEST(binary1(element1, element2) == fusion::invoke(binary1, seq)); + BOOST_TEST(binary2(element1, element2) == fusion::invoke(binary2, seq)); + + BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_obj_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ref_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ptr_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_spt_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_obj_c_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ref_c_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ptr_c_ctx,seq))); + BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_spt_c_ctx,seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<3>) +{ + fobj f; + + BOOST_TEST(f(element1, element2, element3) == fusion::invoke(f, seq)); + BOOST_TEST(const_(f)(element1, element2, element3) == fusion::invoke<fobj const>(const_(f), seq)); +} + +template <class Sequence> +void test_sequence(Sequence & seq) +{ + test_sequence_n(seq, mpl::int_<boost::fusion::result_of::size<Sequence>::value>()); +} + + +void result_type_tests() +{ + using boost::is_same; + + BOOST_TEST(( is_same< + boost::fusion::result_of::invoke<int (*)(), fusion::vector0<> >::type, int + >::value )); +// disabled until boost::result_of supports it +// BOOST_TEST(( is_same< +// boost::fusion::result_of::invoke<int (*)(...), fusion::vector1<int> >::type, int +// >::value )); + BOOST_TEST(( is_same< + boost::fusion::result_of::invoke<int (members::*)(), fusion::vector1<members*> >::type, int + >::value )); +// disabled until boost::result_of supports it +// BOOST_TEST(( is_same< +// boost::fusion::result_of::invoke<int (members::*)(...), fusion::vector2<members*,int> >::type, int +// >::value )); +} + +int main() +{ + result_type_tests(); + + typedef fusion::vector<> vector0; + typedef fusion::vector<element1_type> vector1; + typedef fusion::vector<element1_type, element2_type> vector2; + typedef fusion::vector<element1_type, element2_type, element3_type> vector3; + + vector0 v0; + vector1 v1(element1); + vector2 v2(element1, element2); + vector3 v3(element1, element2, element3); + + test_sequence(v0); + test_sequence(v1); + test_sequence(v2); + test_sequence(v3); + + typedef fusion::list<> list0; + typedef fusion::list<element1_type> list1; + typedef fusion::list<element1_type, element2_type> list2; + typedef fusion::list<element1_type, element2_type, element3_type> list3; + + list0 l0; + list1 l1(element1); + list2 l2(element1, element2); + list3 l3(element1, element2, element3); + + test_sequence(l0); + test_sequence(l1); + test_sequence(l2); + test_sequence(l3); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/invoke_function_object.cpp b/libs/fusion/test/functional/invoke_function_object.cpp new file mode 100644 index 000000000..31357aa8c --- /dev/null +++ b/libs/fusion/test/functional/invoke_function_object.cpp @@ -0,0 +1,234 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/invocation/invoke_function_object.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/type_traits/is_same.hpp> + +#include <memory> +#include <boost/noncopyable.hpp> + +#include <boost/mpl/int.hpp> + +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/view/single_view.hpp> +#include <boost/fusion/view/iterator_range.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> + +namespace mpl = boost::mpl; +namespace fusion = boost::fusion; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +struct object {}; +struct object_nc : boost::noncopyable {}; + +struct fobj +{ + // Handle nullary separately to exercise result_of support + template <typename Sig> + struct result; + + template <class Self, typename T0> + struct result< Self(T0) > + { + typedef int type; + }; + + template <class Self, typename T0, typename T1> + struct result< Self(T0, T1) > + { + typedef int type; + }; + + template <class Self, typename T0, typename T1, typename T2> + struct result< Self(T0, T1, T2) > + { + typedef int type; + }; + + int operator()() { return 0; } + int operator()() const { return 1; } + + int operator()(int i) { return 2 + i; } + int operator()(int i) const { return 3 + i; } + + int operator()(int i, object &) { return 4 + i; } + int operator()(int i, object &) const { return 5 + i; } + int operator()(int i, object const &) { return 6 + i; } + int operator()(int i, object const &) const { return 7 + i; } + + int operator()(int i, object &, object_nc &) { return 10 + i; } + int operator()(int i, object &, object_nc &) const { return 11 + i; } +}; + +struct nullary_fobj +{ + typedef int result_type; + + int operator()() { return 0; } + int operator()() const { return 1; } +}; + +struct fobj_nc + : boost::noncopyable +{ + // Handle nullary separately to exercise result_of support + template <typename T> + struct result; + + template <class Self, typename T0> + struct result< Self(T0) > + { + typedef int type; + }; + + int operator()(int i) { return 14 + i; } + int operator()(int i) const { return 15 + i; } +}; + +struct nullary_fobj_nc + : boost::noncopyable +{ + typedef int result_type; + + int operator()() { return 12; } + int operator()() const { return 13; } +}; + + +typedef int element1_type; +typedef object element2_type; +typedef object_nc & element3_type; + +int element1 = 100; +object element2 = object(); +object_nc element3; + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<0>) +{ + // Function Objects + + nullary_fobj f; + BOOST_TEST(f () == fusion::invoke_function_object(f , seq )); + BOOST_TEST(f () == fusion::invoke_function_object(f , const_(seq))); + + // Note: The function object is taken by value, so we request the copy + // to be const with an explicit template argument. We can also request + // the function object to be pased by reference... + BOOST_TEST(const_(f)() == fusion::invoke_function_object<nullary_fobj const >(const_(f), seq )); + BOOST_TEST(const_(f)() == fusion::invoke_function_object<nullary_fobj const &>(const_(f), const_(seq))); + + nullary_fobj_nc nc_f; + // ...and we further ensure there is no copying in this case, using a + // noncopyable function object. + BOOST_TEST(nc_f () == fusion::invoke_function_object<nullary_fobj_nc &>(nc_f , seq )); + BOOST_TEST(nc_f () == fusion::invoke_function_object<nullary_fobj_nc &>(nc_f , const_(seq))); + BOOST_TEST(const_(nc_f)() == fusion::invoke_function_object<nullary_fobj_nc const &>(const_(nc_f), seq )); + BOOST_TEST(const_(nc_f)() == fusion::invoke_function_object<nullary_fobj_nc const &>(const_(nc_f), const_(seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<1>) +{ + fobj f; + BOOST_TEST(f(element1) == fusion::invoke_function_object(f , seq )); + BOOST_TEST(f(element1) == fusion::invoke_function_object(f , const_(seq))); + BOOST_TEST(const_(f)(element1) == fusion::invoke_function_object<fobj const >(const_(f), seq )); + BOOST_TEST(const_(f)(element1) == fusion::invoke_function_object<fobj const &>(const_(f), const_(seq))); + + fobj_nc nc_f; + BOOST_TEST(nc_f(element1) == fusion::invoke_function_object<fobj_nc &>(nc_f, seq )); + BOOST_TEST(nc_f(element1) == fusion::invoke_function_object<fobj_nc &>(nc_f, const_(seq))); + BOOST_TEST(const_(nc_f)(element1) == fusion::invoke_function_object<fobj_nc const &>(const_(nc_f), seq )); + BOOST_TEST(const_(nc_f)(element1) == fusion::invoke_function_object<fobj_nc const &>(const_(nc_f), const_(seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<2>) +{ + fobj f; + BOOST_TEST(f (element1, element2) == fusion::invoke_function_object(f , seq)); + BOOST_TEST(f (element1, const_(element2)) == fusion::invoke_function_object(f , const_(seq))); + BOOST_TEST(const_(f)(element1, element2) == fusion::invoke_function_object<fobj const>(const_(f), seq)); + BOOST_TEST(const_(f)(element1, const_(element2)) == fusion::invoke_function_object<fobj const>(const_(f), const_(seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<3>) +{ + fobj f; + + BOOST_TEST(f(element1, element2, element3) == fusion::invoke_function_object(f, seq)); + BOOST_TEST(const_(f)(element1, element2, element3) == fusion::invoke_function_object<fobj const>(const_(f), seq)); +} + +template <class Sequence> +void test_sequence(Sequence & seq) +{ + test_sequence_n(seq, mpl::int_<boost::fusion::result_of::size<Sequence>::value>()); +} + +void result_type_tests() +{ + using boost::is_same; + + BOOST_TEST(( is_same< boost::fusion::result_of::invoke_function_object< nullary_fobj, fusion::vector<> >::type, int >::value )); + BOOST_TEST(( is_same< boost::fusion::result_of::invoke_function_object< fobj, fusion::vector<element1_type> >::type, int >::value )); + BOOST_TEST(( is_same< boost::fusion::result_of::invoke_function_object< fobj, fusion::vector<element1_type,element2_type> >::type, int >::value )); +} + + +int main() +{ + result_type_tests(); + + typedef fusion::vector<> vector0; + typedef fusion::vector<element1_type> vector1; + typedef fusion::vector<element1_type, element2_type> vector2; + typedef fusion::vector<element1_type, element2_type, element3_type> vector3; + + vector0 v0; + vector1 v1(element1); + vector2 v2(element1, element2); + vector3 v3(element1, element2, element3); + + test_sequence(v0); + test_sequence(v1); + test_sequence(v2); + test_sequence(v3); + + typedef fusion::list<> list0; + typedef fusion::list<element1_type> list1; + typedef fusion::list<element1_type, element2_type> list2; + typedef fusion::list<element1_type, element2_type, element3_type> list3; + + list0 l0; + list1 l1(element1); + list2 l2(element1, element2); + list3 l3(element1, element2, element3); + + test_sequence(l0); + test_sequence(l1); + test_sequence(l2); + test_sequence(l3); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/invoke_procedure.cpp b/libs/fusion/test/functional/invoke_procedure.cpp new file mode 100644 index 000000000..f8db06cc9 --- /dev/null +++ b/libs/fusion/test/functional/invoke_procedure.cpp @@ -0,0 +1,284 @@ +/*============================================================================= + Copyright (c) 2005-2006 Joao Abecasis + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/invocation/invoke_procedure.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <memory> +#include <boost/noncopyable.hpp> + +#include <boost/mpl/int.hpp> + +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/view/single_view.hpp> +#include <boost/fusion/view/iterator_range.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> + +namespace mpl = boost::mpl; +namespace fusion = boost::fusion; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +struct object {}; +struct object_nc : boost::noncopyable {}; + +typedef int element1_type; +typedef object element2_type; +typedef object_nc & element3_type; + +int element1 = 100; +object element2 = object(); +object_nc element3; + +class members +{ + public: + int data; + + members() + : data(20) + { } + + int nullary() { return element1 = data + 1; } + int nullary_c() const { return element1 = data + 2; } + int unary(int & i) { return i = data + 3; } + int unary_c(int & i) const { return i = data + 4; } + int binary(int & i, object) { return i = data + 5; } + int binary_c(int & i, object) const { return i = data + 6; } +}; + +members that; +std::auto_ptr<members> spt_that(new members); +std::auto_ptr<members const> spt_that_c(new members); + +fusion::single_view<members > sv_obj_ctx( that); +fusion::single_view<members &> sv_ref_ctx( that); +fusion::single_view<members *> sv_ptr_ctx(& that); +fusion::single_view<members const > sv_obj_c_ctx( that); +fusion::single_view<members const &> sv_ref_c_ctx( that); +fusion::single_view<members const *> sv_ptr_c_ctx(& that); +fusion::single_view<std::auto_ptr<members> const &> sv_spt_ctx(spt_that); +fusion::single_view< std::auto_ptr<members const> const &> sv_spt_c_ctx(spt_that_c); + +struct fobj +{ + int operator()() { return element1 = 0; } + int operator()() const { return element1 = 1; } + + int operator()(int & i) { return i = 2 ; } + int operator()(int & i) const { return i = 3; } + + int operator()(int & i, object &) { return i = 4; } + int operator()(int & i, object &) const { return i = 5; } + int operator()(int & i, object const &) { return i = 6; } + int operator()(int & i, object const &) const { return i = 7; } + + int operator()(int & i, object &, object_nc &) { return i = 10; } + int operator()(int & i, object &, object_nc &) const { return i = 11; } +}; + +struct fobj_nc + : boost::noncopyable +{ + int operator()() { return element1 = 12; } + int operator()() const { return element1 = 13; } + + int operator()(int & i) { return i = 14; } + int operator()(int & i) const { return i = 15; } +}; + +int nullary() { return element1 = 16; } +int unary(int & i) { return i = 17; } +int binary1(int & i, object &) { return i = 18; } +int binary2(int & i, object const &) { return i = 19; } + +typedef int (* func_ptr)(int &); +typedef int (* const c_func_ptr)(int &); +typedef int (* volatile v_func_ptr)(int &); +typedef int (* const volatile cv_func_ptr)(int &); + + func_ptr func_ptr1 = &unary; + c_func_ptr func_ptr2 = &unary; + v_func_ptr func_ptr3 = &unary; +cv_func_ptr func_ptr4 = &unary; + + + +#define COMPARE_EFFECT(e,t) \ + { \ + element1 = 1234567; e; \ + int expected = element1; \ + element1 = 1234567; t; \ + BOOST_TEST(expected == element1 ); \ + } + + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<0>) +{ + // Function Objects + + fobj f; + + COMPARE_EFFECT(f (), fusion::invoke_procedure(f , seq )); + COMPARE_EFFECT(f (), fusion::invoke_procedure(f , const_(seq))); + + // Note: The function object is taken by value, so we request the copy + // to be const with an explicit template argument. We can also request + // the function object to be pased by reference... + COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const >(const_(f), seq )); + COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const &>(const_(f), const_(seq))); + + fobj_nc nc_f; + // ...and we further ensure there is no copying in this case, using a + // noncopyable function object. + COMPARE_EFFECT(nc_f (), fusion::invoke_procedure<fobj_nc &>(nc_f , seq )); + COMPARE_EFFECT(nc_f (), fusion::invoke_procedure<fobj_nc &>(nc_f , const_(seq))); + COMPARE_EFFECT(const_(nc_f)(), fusion::invoke_procedure<fobj_nc const &>(const_(nc_f), seq )); + COMPARE_EFFECT(const_(nc_f)(), fusion::invoke_procedure<fobj_nc const &>(const_(nc_f), const_(seq))); + + // Builtin Functions + + // Call through ref/ptr to function + COMPARE_EFFECT(nullary(), fusion::invoke_procedure<int (&)()>(nullary, seq)); + COMPARE_EFFECT(nullary(), fusion::invoke_procedure(& nullary, seq)); + + // Call through ptr to member function + // Note: The non-const function members::nullary can't be invoked with + // fusion::join(sv_obj_ctx,seq)), which is const and so is its first element + COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_obj_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_obj_c_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ref_c_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ptr_c_ctx,seq))); + COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_spt_c_ctx,seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<1>) +{ + fobj f; + COMPARE_EFFECT(f(element1), fusion::invoke_procedure(f , seq )); + COMPARE_EFFECT(f(element1), fusion::invoke_procedure(f , const_(seq))); + COMPARE_EFFECT(const_(f)(element1), fusion::invoke_procedure<fobj const >(const_(f), seq )); + COMPARE_EFFECT(const_(f)(element1), fusion::invoke_procedure<fobj const &>(const_(f), const_(seq))); + + fobj_nc nc_f; + COMPARE_EFFECT(nc_f(element1), fusion::invoke_procedure<fobj_nc &>(nc_f, seq )); + COMPARE_EFFECT(nc_f(element1), fusion::invoke_procedure<fobj_nc &>(nc_f, const_(seq))); + COMPARE_EFFECT(const_(nc_f)(element1), fusion::invoke_procedure<fobj_nc const &>(const_(nc_f), seq )); + COMPARE_EFFECT(const_(nc_f)(element1), fusion::invoke_procedure<fobj_nc const &>(const_(nc_f), const_(seq))); + + COMPARE_EFFECT(unary(element1), fusion::invoke_procedure<int (&)(int &)>(unary, seq)); + COMPARE_EFFECT(func_ptr1(element1), fusion::invoke_procedure(func_ptr1, seq)); + COMPARE_EFFECT(func_ptr2(element1), fusion::invoke_procedure(func_ptr2, seq)); + COMPARE_EFFECT(func_ptr3(element1), fusion::invoke_procedure(func_ptr3, seq)); + COMPARE_EFFECT(func_ptr4(element1), fusion::invoke_procedure(func_ptr4, seq)); + + COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_obj_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_obj_c_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ref_c_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ptr_c_ctx,seq))); + COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_spt_c_ctx,seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<2>) +{ + fobj f; + COMPARE_EFFECT(f (element1, element2), fusion::invoke_procedure(f , seq)); + COMPARE_EFFECT(f (element1, const_(element2)), fusion::invoke_procedure(f , const_(seq))); + COMPARE_EFFECT(const_(f)(element1, element2), fusion::invoke_procedure<fobj const>(const_(f), seq)); + COMPARE_EFFECT(const_(f)(element1, const_(element2)), fusion::invoke_procedure<fobj const>(const_(f), const_(seq))); + + COMPARE_EFFECT(binary1(element1, element2), fusion::invoke_procedure(binary1, seq)); + COMPARE_EFFECT(binary2(element1, element2), fusion::invoke_procedure(binary2, seq)); + + COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_obj_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ref_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ptr_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_spt_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_obj_c_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ref_c_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ptr_c_ctx,seq))); + COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_spt_c_ctx,seq))); +} + +template <class Sequence> +void test_sequence_n(Sequence & seq, mpl::int_<3>) +{ + fobj f; + + COMPARE_EFFECT(f(element1, element2, element3), fusion::invoke_procedure(f, seq)); + COMPARE_EFFECT(const_(f)(element1, element2, element3), fusion::invoke_procedure<fobj const>(const_(f), seq)); +} + +template <class Sequence> +void test_sequence(Sequence & seq) +{ + test_sequence_n(seq, mpl::int_<boost::fusion::result_of::size<Sequence>::value>()); +} + +int main() +{ + typedef fusion::vector<> vector0; + typedef fusion::vector<element1_type &> vector1; + typedef fusion::vector<element1_type &, element2_type> vector2; + typedef fusion::vector<element1_type &, element2_type, element3_type> vector3; + + vector0 v0; + vector1 v1(element1); + vector2 v2(element1, element2); + vector3 v3(element1, element2, element3); + + test_sequence(v0); + test_sequence(v1); + test_sequence(v2); + test_sequence(v3); + + typedef fusion::list<> list0; + typedef fusion::list<element1_type &> list1; + typedef fusion::list<element1_type &, element2_type> list2; + typedef fusion::list<element1_type &, element2_type, element3_type> list3; + + list0 l0; + list1 l1(element1); + list2 l2(element1, element2); + list3 l3(element1, element2, element3); + + test_sequence(l0); + test_sequence(l1); + test_sequence(l2); + test_sequence(l3); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/make_fused.cpp b/libs/fusion/test/functional/make_fused.cpp new file mode 100644 index 000000000..a207359c7 --- /dev/null +++ b/libs/fusion/test/functional/make_fused.cpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/generation/make_fused.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; +using boost::cref; +using boost::ref; + +template <class Base = boost::blank> +struct test_func + : Base +{ + typedef int result_type; + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return 4+x-y; + } +}; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +int main() +{ + fusion::vector<int,char> lv_vec(1,'\004'); + test_func<> f; + test_func<noncopyable> f_nc; + + boost::fusion::result_of::make_fused< test_func<> >::type fused_func + = fusion::make_fused(f); + + BOOST_TEST(fused_func(lv_vec) == 1); + BOOST_TEST(const_(fused_func)(lv_vec) == 0); + BOOST_TEST(fusion::make_fused(const_(f))(lv_vec) == 1); + BOOST_TEST(fusion::make_fused(ref(f_nc))(lv_vec) == 1); + BOOST_TEST(fusion::make_fused(cref(f_nc))(lv_vec) == 0); + + BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(const_(fused_func)(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fusion::make_fused(const_(f))(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fusion::make_fused(ref(f_nc))(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fusion::make_fused(cref(f_nc))(fusion::make_vector(2,'\003')) == 0); + + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/functional/make_fused_function_object.cpp b/libs/fusion/test/functional/make_fused_function_object.cpp new file mode 100644 index 000000000..87ee8e233 --- /dev/null +++ b/libs/fusion/test/functional/make_fused_function_object.cpp @@ -0,0 +1,95 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/generation/make_fused_function_object.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; +using boost::cref; +using boost::ref; + +template <class Base = boost::blank> +struct test_func + : Base +{ + template<typename T> + struct result + { + }; + + + template<class Self, typename T0, typename T1> + struct result< Self(T0, T1) > + { + typedef int type; + }; + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return 4+x-y; + } +}; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +int main() +{ + fusion::vector<int,char> lv_vec(1,'\004'); + test_func<> f; + test_func<noncopyable> f_nc; + + boost::fusion::result_of::make_fused_function_object< test_func<> >::type fused_func + = fusion::make_fused_function_object(f); + + BOOST_TEST(fused_func(lv_vec) == 1); + BOOST_TEST(const_(fused_func)(lv_vec) == 0); + BOOST_TEST(fusion::make_fused_function_object(const_(f))(lv_vec) == 1); + BOOST_TEST(fusion::make_fused_function_object(ref(f_nc))(lv_vec) == 1); + BOOST_TEST(fusion::make_fused_function_object(cref(f_nc))(lv_vec) == 0); + + BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(const_(fused_func)(fusion::make_vector(2,'\003')) == 0); + BOOST_TEST(fusion::make_fused_function_object(const_(f))(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fusion::make_fused_function_object(ref(f_nc))(fusion::make_vector(2,'\003')) == 1); + BOOST_TEST(fusion::make_fused_function_object(cref(f_nc))(fusion::make_vector(2,'\003')) == 0); + + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/functional/make_fused_procedure.cpp b/libs/fusion/test/functional/make_fused_procedure.cpp new file mode 100644 index 000000000..ce7e267c8 --- /dev/null +++ b/libs/fusion/test/functional/make_fused_procedure.cpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/generation/make_fused_procedure.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector.hpp> + +namespace fusion = boost::fusion; +using boost::noncopyable; +using boost::cref; +using boost::ref; + +int effect; + +#define CHECK_EFFECT(t,e) \ + { \ + effect = 1234567; t; \ + BOOST_TEST(effect == e); \ + } + +template <class Base = boost::blank> +struct test_func + : Base +{ + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) const + { + return effect = 1+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 const & x, T1 const & y) + { + return effect = 2+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) const + { + return effect = 3+x-y; + } + + template <typename T0, typename T1> + int operator()(T0 & x, T1 & y) + { + return effect = 4+x-y; + } +}; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +int main() +{ + fusion::vector<int,char> lv_vec(1,'\004'); + test_func<> f; + test_func<noncopyable> f_nc; + + boost::fusion::result_of::make_fused_procedure< test_func<> >::type fused_func + = fusion::make_fused_procedure(f); + + CHECK_EFFECT(fused_func(lv_vec), 1); + CHECK_EFFECT(const_(fused_func)(lv_vec), 0); + CHECK_EFFECT(fusion::make_fused_procedure(const_(f))(lv_vec), 1); + CHECK_EFFECT(fusion::make_fused_procedure(ref(f_nc))(lv_vec), 1); + CHECK_EFFECT(fusion::make_fused_procedure(cref(f_nc))(lv_vec), 0); + + CHECK_EFFECT(fused_func(fusion::make_vector(2,'\003')), 1); + CHECK_EFFECT(const_(fused_func)(fusion::make_vector(2,'\003')), 0); + CHECK_EFFECT(fusion::make_fused_procedure(const_(f))(fusion::make_vector(2,'\003')), 1); + CHECK_EFFECT(fusion::make_fused_procedure(ref(f_nc))(fusion::make_vector(2,'\003')), 1); + CHECK_EFFECT(fusion::make_fused_procedure(cref(f_nc))(fusion::make_vector(2,'\003')), 0); + + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/functional/make_unfused.cpp b/libs/fusion/test/functional/make_unfused.cpp new file mode 100644 index 000000000..1e2869183 --- /dev/null +++ b/libs/fusion/test/functional/make_unfused.cpp @@ -0,0 +1,126 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/generation/make_unfused.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/mpl/if.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/identity.hpp> + +#include <boost/utility/result_of.hpp> + +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> + +#include <boost/ref.hpp> + +namespace fusion = boost::fusion; +namespace mpl = boost::mpl; + +using boost::noncopyable; +typedef mpl::true_ no_nullary_call; + +using boost::ref; +using boost::cref; + +template <class Base = boost::blank, class RemoveNullary = mpl::false_> +struct test_func + : Base +{ + template <typename Sig> + struct result; + + template <class Self, class Seq> + struct result< Self(Seq &) > + : mpl::if_< mpl::and_< boost::fusion::result_of::empty<Seq>, RemoveNullary >, + boost::blank, mpl::identity<long> >::type + { }; + + template <typename Seq> + long operator()(Seq const & seq) const + { + long state = 0; + return fusion::fold(seq, state, fold_op()); + } + + template < typename Seq > + long operator()(Seq const & seq) + { + long state = 100; + return fusion::fold(seq, state, fold_op()); + } + + private: + + struct fold_op + { + typedef long result_type; + + template <typename T> + long operator()(long value, T & elem) const + { + elem += sizeof(T); + return value + elem; + } + }; +}; + +template <typename T> +inline T const & const_(T const & t) +{ + return t; +} + +int main() +{ + test_func<> f; + test_func<noncopyable> f_nc; + + boost::fusion::result_of::make_unfused< test_func<> >::type unfused_func = + fusion::make_unfused(f); + + boost::fusion::result_of::make_unfused< boost::reference_wrapper< + test_func<noncopyable> > >::type unfused_func_ref = + fusion::make_unfused(ref(f_nc)); + + boost::fusion::result_of::make_unfused< boost::reference_wrapper< + test_func<noncopyable> const> >::type unfused_func_c_ref = + fusion::make_unfused(cref(f_nc)); + + BOOST_TEST(unfused_func() == 100); + BOOST_TEST(const_(unfused_func)() == 0); + BOOST_TEST(unfused_func_ref() == 100); + BOOST_TEST(unfused_func_c_ref() == 0); + + long lv1 = 2; int lv2 = 3l; char lv3 = '\007'; + long expected; + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func(lv1,lv2,lv3) == 100 + expected); + BOOST_TEST(lv1 == 2+1*sizeof(lv1) && lv2 == 3+1*sizeof(lv2) && lv3 == 7+1*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(const_(unfused_func)(lv1,lv2,lv3) == 0 + expected); + BOOST_TEST(lv1 == 2+2*sizeof(lv1) && lv2 == 3+2*sizeof(lv2) && lv3 == 7+2*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_ref(lv1,lv2,lv3) == 100 + expected); + BOOST_TEST(lv1 == 2+3*sizeof(lv1) && lv2 == 3+3*sizeof(lv2) && lv3 == 7+3*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_c_ref(lv1,lv2,lv3) == 0 + expected); + BOOST_TEST(lv1 == 2+4*sizeof(lv1) && lv2 == 3+4*sizeof(lv2) && lv3 == 7+4*sizeof(lv3)); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/unfused.cpp b/libs/fusion/test/functional/unfused.cpp new file mode 100644 index 000000000..27a242a60 --- /dev/null +++ b/libs/fusion/test/functional/unfused.cpp @@ -0,0 +1,119 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/adapter/unfused.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/noncopyable.hpp> +#include <boost/blank.hpp> + +#include <boost/mpl/identity.hpp> + +#include <boost/utility/result_of.hpp> + +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> + +namespace fusion = boost::fusion; +namespace mpl = boost::mpl; + +using boost::noncopyable; + +template <class Base = boost::blank> +struct test_func + : Base +{ + template <typename Sig> + struct result; + + template <class Self, class Seq> + struct result< Self(Seq) > + : mpl::identity<long> + { }; + + template <typename Seq> + long operator()(Seq const & seq) const + { + long state = 0; + return fusion::fold(seq, state, fold_op()); + } + + template <typename Seq> + long operator()(Seq const & seq) + { + long state = 100; + return fusion::fold(seq, state, fold_op()); + } + + private: + + struct fold_op + { + typedef long result_type; + + template <typename T> + long operator()(long value, T & elem) const + { + elem += sizeof(T); + return value + elem; + } + }; +}; + +void result_type_tests() +{ + using boost::is_same; + + typedef fusion::unfused< test_func<> > t; + BOOST_TEST(( is_same< boost::result_of< t () >::type, long >::value )); + BOOST_TEST(( is_same< boost::result_of< t (int) >::type, long >::value )); +} + +int main() +{ + result_type_tests(); + + test_func<noncopyable> f; + fusion::unfused< test_func<> > unfused_func; + fusion::unfused< test_func<noncopyable> & > unfused_func_ref(f); + fusion::unfused< test_func<> const > unfused_func_c; + fusion::unfused< test_func<> > const unfused_func_c2; + fusion::unfused< test_func<noncopyable> const & > unfused_func_c_ref(f); + + BOOST_TEST(unfused_func() == 100); + BOOST_TEST(unfused_func_ref() == 100); + BOOST_TEST(unfused_func_c() == 0); + BOOST_TEST(unfused_func_c2() == 0); + BOOST_TEST(unfused_func_c_ref() == 0); + + long lv1 = 2; int lv2 = 3l; char lv3 = '\007'; + long expected; + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func(lv1,lv2,lv3) == 100 + expected); + BOOST_TEST(lv1 == 2+1*sizeof(lv1) && lv2 == 3+1*sizeof(lv2) && lv3 == 7+1*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_ref(lv1,lv2,lv3) == 100 + expected); + BOOST_TEST(lv1 == 2+2*sizeof(lv1) && lv2 == 3+2*sizeof(lv2) && lv3 == 7+2*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_c(lv1,lv2,lv3) == 0 + expected); + BOOST_TEST(lv1 == 2+3*sizeof(lv1) && lv2 == 3+3*sizeof(lv2) && lv3 == 7+3*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_c2(lv1,lv2,lv3) == 0 + expected); + BOOST_TEST(lv1 == 2+4*sizeof(lv1) && lv2 == 3+4*sizeof(lv2) && lv3 == 7+4*sizeof(lv3)); + + expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3); + BOOST_TEST(unfused_func_c_ref(lv1,lv2,lv3) == 0 + expected); + BOOST_TEST(lv1 == 2+5*sizeof(lv1) && lv2 == 3+5*sizeof(lv2) && lv3 == 7+5*sizeof(lv3)); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/functional/unfused_typed.cpp b/libs/fusion/test/functional/unfused_typed.cpp new file mode 100644 index 000000000..85783c866 --- /dev/null +++ b/libs/fusion/test/functional/unfused_typed.cpp @@ -0,0 +1,167 @@ +/*============================================================================= + Copyright (c) 2006-2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/functional/adapter/unfused_typed.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/blank.hpp> +#include <boost/noncopyable.hpp> + +#include <boost/utility/result_of.hpp> + +#include <boost/mpl/identity.hpp> +#include <boost/mpl/placeholders.hpp> + +#include <boost/utility/result_of.hpp> + +#include <boost/fusion/algorithm/iteration/fold.hpp> + +namespace fusion = boost::fusion; +namespace mpl = boost::mpl; +using mpl::placeholders::_; + +using boost::noncopyable; + +typedef fusion::vector<> types0; +typedef fusion::vector<long &> types1; +typedef fusion::vector<long &,int,char> types3; + +template <class Base = boost::blank> +struct test_func + : Base +{ + template<typename T> + struct result; + + template <class Self, class Seq> + struct result< Self(Seq) > + : mpl::identity<long> + { }; + + template <typename Seq> + long operator()(Seq const & seq) const + { + long state = 0; + return fusion::fold(seq, state, fold_op()); + } + + template < typename Seq > + long operator()(Seq const & seq) + { + long state = 100; + return fusion::fold(seq, state, fold_op()); + } + + private: + + struct fold_op + { + typedef long result_type; + + template <typename T> + long operator()(long value, T const & elem) const + { + return value + sizeof(T) * elem; + } + + template <typename T> + long operator()(long value, T & elem) const + { + elem += sizeof(T); + return value; + } + }; +}; + +void result_type_tests() +{ + using boost::is_same; + + typedef fusion::unfused_typed< test_func<>, types0 > t0; + BOOST_TEST(( is_same< boost::result_of< t0 () >::type, long >::value )); + typedef fusion::unfused_typed< test_func<>, types1 > t1; + BOOST_TEST(( is_same< boost::result_of< t1 (int) >::type, long >::value )); +} + +#if defined(BOOST_MSVC) && BOOST_MSVC < 1400 +# define BOOST_TEST_NO_VC71(cond) (void)((cond)?0:1) +#else +# define BOOST_TEST_NO_VC71(cond) BOOST_TEST(cond) +#endif + +void nullary_tests() +{ + test_func<noncopyable> f; + fusion::unfused_typed< test_func<>, types0 > unfused_func; + fusion::unfused_typed< test_func<noncopyable> &, types0 > unfused_func_ref(f); + fusion::unfused_typed< test_func<> const, types0 > unfused_func_c; + fusion::unfused_typed< test_func<>, types0 > const unfused_func_c2; + fusion::unfused_typed< test_func<noncopyable> const &, types0 > unfused_func_c_ref(f); + + BOOST_TEST(unfused_func() == 100); + BOOST_TEST(unfused_func_ref() == 100); + BOOST_TEST(unfused_func_c() == 0); + BOOST_TEST(unfused_func_c2() == 0); + BOOST_TEST(unfused_func_c_ref() == 0); +} + +void unary_tests() +{ + test_func<noncopyable> f; + fusion::unfused_typed< test_func<>, types1 > unfused_func; + fusion::unfused_typed< test_func<noncopyable> &, types1 > unfused_func_ref(f); + fusion::unfused_typed< test_func<> const, types1 > unfused_func_c; + fusion::unfused_typed< test_func<>, types1 > const unfused_func_c2; + fusion::unfused_typed< test_func<noncopyable> const &, types1 > unfused_func_c_ref(f); + + long lvalue = 1; + BOOST_TEST_NO_VC71(unfused_func(lvalue) == 100); + BOOST_TEST(lvalue == 1 + 1*sizeof(lvalue)); + BOOST_TEST(unfused_func_ref(lvalue) == 100); + BOOST_TEST(lvalue == 1 + 2*sizeof(lvalue)); + BOOST_TEST(unfused_func_c(lvalue) == 0); + BOOST_TEST(lvalue == 1 + 3*sizeof(lvalue)); + BOOST_TEST(unfused_func_c2(lvalue) == 0); + BOOST_TEST(lvalue == 1 + 4*sizeof(lvalue)); + BOOST_TEST(unfused_func_c_ref(lvalue) == 0); + BOOST_TEST(lvalue == 1 + 5*sizeof(lvalue)); +} + +void ternary_tests() +{ + test_func<noncopyable> f; + fusion::unfused_typed< test_func<>, types3 > unfused_func; + fusion::unfused_typed< test_func<noncopyable> &, types3 > unfused_func_ref(f); + fusion::unfused_typed< test_func<> const, types3 > unfused_func_c; + fusion::unfused_typed< test_func<>, types3 > const unfused_func_c2; + fusion::unfused_typed< test_func<noncopyable> const &, types3 > unfused_func_c_ref(f); + + long lvalue = 1; + static const long expected = 2*sizeof(int) + 7*sizeof(char); + BOOST_TEST_NO_VC71(unfused_func(lvalue,2,'\007') == 100 + expected); + BOOST_TEST(lvalue == 1 + 1*sizeof(lvalue)); + BOOST_TEST(unfused_func_ref(lvalue,2,'\007') == 100 + expected); + BOOST_TEST(lvalue == 1 + 2*sizeof(lvalue)); + BOOST_TEST(unfused_func_c(lvalue,2,'\007') == 0 + expected); + BOOST_TEST(lvalue == 1 + 3*sizeof(lvalue)); + BOOST_TEST(unfused_func_c2(lvalue,2,'\007') == 0 + expected); + BOOST_TEST(lvalue == 1 + 4*sizeof(lvalue)); + BOOST_TEST(unfused_func_c_ref(lvalue,2,'\007') == 0 + expected); + BOOST_TEST(lvalue == 1 + 5*sizeof(lvalue)); +} + +int main() +{ + result_type_tests(); + nullary_tests(); + unary_tests(); + ternary_tests(); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_adt.cpp b/libs/fusion/test/sequence/adapt_adt.cpp new file mode 100644 index 000000000..f8762b038 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_adt.cpp @@ -0,0 +1,240 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/adt/adapt_adt.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + class point + { + public: + + point() : x(0), y(0) {} + point(int in_x, int in_y) : x(in_x), y(in_y) {} + + int get_x() const { return x; } + int get_y() const { return y; } + void set_x(int x_) { x = x_; } + void set_y(int y_) { y = y_; } + + private: + + int x; + int y; + }; + +#if !BOOST_WORKAROUND(__GNUC__,<4) + class point_with_private_members + { + friend struct boost::fusion::extension::access; + + public: + point_with_private_members() : x(0), y(0) {} + point_with_private_members(int x, int y) : x(x), y(y) {} + + private: + int get_x() const { return x; } + int get_y() const { return y; } + void set_x(int x_) { x = x_; } + void set_y(int y_) { y = y_; } + + int x; + int y; + }; +#endif + + // A sequence that has data members defined in an unrelated namespace + // (std, in this case). This allows testing ADL issues. + class name + { + public: + name() {} + name(const std::string& last, const std::string& first) + : last(last), first(first) {} + + const std::string& get_last() const { return last; } + const std::string& get_first() const { return first; } + void set_last(const std::string& last_) { last = last_; } + void set_first(const std::string& first_) { first = first_; } + private: + std::string last; + std::string first; + }; +} + +BOOST_FUSION_ADAPT_ADT( + ns::point, + (int, int, obj.get_x(), obj.set_x(val)) + (int, int, obj.get_y(), obj.set_y(val)) +) + +#if !BOOST_WORKAROUND(__GNUC__,<4) +BOOST_FUSION_ADAPT_ADT( + ns::point_with_private_members, + (int, int, obj.get_x(), obj.set_x(val)) + (int, int, obj.get_y(), obj.set_y(val)) +) +#endif + +BOOST_FUSION_ADAPT_ADT( + ns::name, + (const std::string&, const std::string&, obj.get_last(), obj.set_last(val)) + (const std::string&, const std::string&, obj.get_first(), obj.set_first(val)) +) + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + fusion::vector<int, float> v1(4, 2); + ns::point v2(5, 3); + fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + fusion::vector<std::string, std::string> v1("Lincoln", "Abraham"); + ns::name v2("Roosevelt", "Franklin"); + ns::name v3("Roosevelt", "Theodore"); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p(5, 3); + fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p(5, 3); + fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((mpl::is_sequence<ns::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<ns::point,0>::type + , mpl::front<ns::point>::type>)); + } + +#if !BOOST_WORKAROUND(__GNUC__,<4) + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point_with_private_members>)); + ns::point_with_private_members p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point_with_private_members>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point_with_private_members>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } +#endif + + { + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::front<ns::point>::type, + boost::fusion::extension::adt_attribute_proxy<ns::point,0,false> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::front<ns::point>::type::type, + int + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::front<ns::point const>::type, + boost::fusion::extension::adt_attribute_proxy<ns::point,0,true> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::front<ns::point const>::type::type, + int + >)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_adt_named.cpp b/libs/fusion/test/sequence/adapt_adt_named.cpp new file mode 100644 index 000000000..384156337 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_adt_named.cpp @@ -0,0 +1,136 @@ +/*============================================================================= + Copyright (c) 2001-2009 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/adt/adapt_adt_named.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + class point + { + public: + + point() : x(0), y(0) {} + point(int in_x, int in_y) : x(in_x), y(in_y) {} + + int get_x() const { return x; } + int get_y() const { return y; } + void set_x(int x_) { x = x_; } + void set_y(int y_) { y = y_; } + + private: + + int x; + int y; + }; +} + +// this creates a fusion view: boost::fusion::adapted::point +BOOST_FUSION_ADAPT_ADT_NAMED( + ns::point, point, + (int, int, obj.obj.get_x(), obj.obj.set_x(val)) + (int, int, obj.obj.get_y(), obj.obj.set_y(val)) +) + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT((traits::is_view<adapted::point>)); + ns::point basep(123, 456); + adapted::point p(basep); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<adapted::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<adapted::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + fusion::vector<int, float> v1(4, 2); + ns::point basep(5, 3); + adapted::point v2(basep); + + fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point basep(5, 3); + adapted::point p(basep); + + fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point basep(5, 3); + adapted::point p(basep); + + fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((mpl::is_sequence<adapted::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<adapted::point,0>::type + , mpl::front<adapted::point>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_adt.cpp b/libs/fusion/test/sequence/adapt_assoc_adt.cpp new file mode 100644 index 000000000..c97e84b0a --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_adt.cpp @@ -0,0 +1,135 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + class point + { + public: + + point() : x(0), y(0) {} + point(int in_x, int in_y) : x(in_x), y(in_y) {} + + int get_x() const { return x; } + int get_y() const { return y; } + void set_x(int x_) { x = x_; } + void set_y(int y_) { y = y_; } + + private: + + int x; + int y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_ADT( + ns::point, + (int, int, obj.get_x(), obj.set_x(val), ns::x_member) + (int, int, obj.get_y(), obj.set_y(val), ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + boost::fusion::vector<int, float> v1(4, 2); + ns::point v2(5, 3); + boost::fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p(5, 3); + boost::fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p(5, 3); + boost::fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((boost::mpl::is_sequence<ns::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<ns::point,0>::type + , boost::mpl::front<ns::point>::type>)); + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<ns::point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int>)); + + ns::point p(5, 3); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp b/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp new file mode 100644 index 000000000..d68d99040 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp @@ -0,0 +1,141 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + class point + { + public: + + point() : x(0), y(0) {} + point(int in_x, int in_y) : x(in_x), y(in_y) {} + + int get_x() const { return x; } + int get_y() const { return y; } + void set_x(int x_) { x = x_; } + void set_y(int y_) { y = y_; } + + private: + + int x; + int y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( + ns::point, + point, + (int, int, obj.obj.get_x(), obj.obj.set_x(val), ns::x_member) + (int, int, obj.obj.get_y(), obj.obj.set_y(val), ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT((traits::is_view<adapted::point>)); + ns::point basep(123, 456); + adapted::point p(basep); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<adapted::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<adapted::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + boost::fusion::vector<int, float> v1(4, 2); + ns::point basev2(5, 3); + adapted::point v2(basev2); + boost::fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from adapted::point to vector + ns::point basep(5, 3); + adapted::point p(basep); + boost::fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from adated::point to list + ns::point basep(5, 3); + adapted::point p(basep); + boost::fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((boost::mpl::is_sequence<adapted::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<adapted::point,0>::type + , boost::mpl::front<adapted::point>::type>)); + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<adapted::point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<adapted::point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<adapted::point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<adapted::point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<adapted::point, ns::y_member>::type, int>)); + + ns::point basep(5, 3); + adapted::point p(basep); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_struct.cpp b/libs/fusion/test/sequence/adapt_assoc_struct.cpp new file mode 100644 index 000000000..62574a7ec --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_struct.cpp @@ -0,0 +1,141 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2005-2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at_key.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/type_traits/is_same.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + struct point + { + int x; + int y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_STRUCT( + ns::point, + (int, x, ns::x_member) + (int, y, ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p = {123, 456}; + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + fusion::vector<int, float> v1(4, 2); + ns::point v2 = {5, 3}; + fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p = {5, 3}; + fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p = {5, 3}; + fusion::list<int, long> l(p); + l = p; + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::y_member>)); + BOOST_MPL_ASSERT((mpl::not_<boost::fusion::result_of::has_key<ns::point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int>)); + + ns::point p = {5, 3}; + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + { + BOOST_MPL_ASSERT((mpl::is_sequence<ns::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<ns::point,0>::type + , mpl::front<ns::point>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_struct_named.cpp b/libs/fusion/test/sequence/adapt_assoc_struct_named.cpp new file mode 100644 index 000000000..f24dadd95 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_struct_named.cpp @@ -0,0 +1,121 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + struct point + { + int x; + int y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( + ns::point, + point, + (int, x, ns::x_member) + (int, y, ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT((traits::is_view<adapted::point>)); + ns::point basep = {123, 456}; + adapted::point p(basep); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<adapted::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<adapted::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + ns::point basev2 = {5, 3}; + adapted::point v2(basev2); + + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from adapted::point to vector + ns::point basep = {5, 3}; + adapted::point p(basep); + vector<int, long> v(p); + v = p; + } + + { + // conversion from adapted::point to list + ns::point basep = {5, 3}; + adapted::point p(basep); + list<int, long> l(p); + l = p; + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<adapted::point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<adapted::point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<adapted::point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<adapted::point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<adapted::point, ns::y_member>::type, int>)); + + ns::point basep = {5, 3}; + adapted::point p(basep); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp b/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp new file mode 100644 index 000000000..15e2124cb --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp @@ -0,0 +1,139 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + template<typename X, typename Y> + class point + { + public: + + point() : x(0), y(0) {} + point(X in_x, Y in_y) : x(in_x), y(in_y) {} + + X get_x() const { return x; } + Y get_y() const { return y; } + void set_x(X x_) { x = x_; } + void set_y(Y y_) { y = y_; } + + private: + + X x; + Y y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( + (X)(Y), + (ns::point)(X)(Y), + (X, X, obj.get_x(), obj.set_x(val), ns::x_member) + (Y, Y, obj.get_y(), obj.set_y(val), ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int,int> point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + boost::fusion::vector<int, float> v1(4, 2); + point v2(5, 3); + boost::fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p(5, 3); + boost::fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p(5, 3); + boost::fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<point,0>::type + , boost::mpl::front<point>::type>)); + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::y_member>::type, int>)); + + point p(5, 3); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_assoc_tpl_struct.cpp b/libs/fusion/test/sequence/adapt_assoc_tpl_struct.cpp new file mode 100644 index 000000000..a327f9e87 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_assoc_tpl_struct.cpp @@ -0,0 +1,133 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/intrinsic/value_at_key.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/not.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; + + template<typename X, typename Y> + struct point + { + X x; + Y y; + }; +} + +BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( + (X)(Y), + (ns::point)(X)(Y), + (int, x, ns::x_member) + (int, y, ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int,int> point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p = {123, 456}; + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + point v2 = {5, 3}; + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p = {5, 3}; + vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p = {5, 3}; + list<int, long> l(p); + l = p; + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::y_member>::type, int>)); + + point p = {5, 3}; + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_struct.cpp b/libs/fusion/test/sequence/adapt_struct.cpp new file mode 100644 index 000000000..68240463c --- /dev/null +++ b/libs/fusion/test/sequence/adapt_struct.cpp @@ -0,0 +1,164 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/struct/adapt_struct.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct point + { + int x; + int y; + }; + +#if !BOOST_WORKAROUND(__GNUC__,<4) + struct point_with_private_attributes + { + friend struct boost::fusion::extension::access; + + private: + int x; + int y; + + public: + point_with_private_attributes(int x, int y):x(x),y(y) + {} + }; +#endif +} + +BOOST_FUSION_ADAPT_STRUCT( + ns::point, + (int, x) + (int, y) +) + +#if !BOOST_WORKAROUND(__GNUC__,<4) +BOOST_FUSION_ADAPT_STRUCT( + ns::point_with_private_attributes, + (int, x) + (int, y) +) +#endif + +struct s { int m; }; +BOOST_FUSION_ADAPT_STRUCT(s, (int, m)) + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p = {123, 456}; + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + fusion::vector<int, float> v1(4, 2); + ns::point v2 = {5, 3}; + fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p = {5, 3}; + fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p = {5, 3}; + fusion::list<int, long> l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + using boost::is_same; + + typedef boost::fusion::result_of::begin<s>::type b; + typedef boost::fusion::result_of::end<s>::type e; + // this fails + BOOST_MPL_ASSERT((is_same<boost::fusion::result_of::next<b>::type, e>)); + } + + { + BOOST_MPL_ASSERT((mpl::is_sequence<ns::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<ns::point,0>::type + , mpl::front<ns::point>::type>)); + } + +#if !BOOST_WORKAROUND(__GNUC__,<4) + { + ns::point_with_private_attributes p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + } +#endif + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_struct_named.cpp b/libs/fusion/test/sequence/adapt_struct_named.cpp new file mode 100644 index 000000000..ef859655b --- /dev/null +++ b/libs/fusion/test/sequence/adapt_struct_named.cpp @@ -0,0 +1,137 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/struct/adapt_struct_named.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct point + { + int x; + int y; + }; +} + +// this creates a fusion view: boost::fusion::adapted::point +BOOST_FUSION_ADAPT_STRUCT_NAMED( + ns::point, point, + (int, x) + (int, y) +) + +// this creates a fusion view: ns1::s1 +struct s { int m; }; +BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(s, (ns1), s1, (int, m)) + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT((traits::is_view<adapted::point>)); + ns::point basep = {123, 456}; + adapted::point p(basep); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<adapted::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<adapted::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + fusion::vector<int, float> v1(4, 2); + ns::point p = {5, 3}; + adapted::point v2(p); + + fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from adapted::point to vector + ns::point basep = {5, 3}; + adapted::point p(basep); + fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from adapted::point to list + ns::point basep = {5, 3}; + adapted::point p(basep); + fusion::list<int, long> l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + using boost::is_same; + + typedef boost::fusion::result_of::begin<ns1::s1>::type b; + typedef boost::fusion::result_of::end<ns1::s1>::type e; + // this fails + BOOST_MPL_ASSERT((is_same<boost::fusion::result_of::next<b>::type, e>)); + } + + + { + BOOST_MPL_ASSERT((mpl::is_sequence<adapted::point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<adapted::point,0>::type + , mpl::front<adapted::point>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_tpl_adt.cpp b/libs/fusion/test/sequence/adapt_tpl_adt.cpp new file mode 100644 index 000000000..aeb0f7215 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_tpl_adt.cpp @@ -0,0 +1,147 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/adt/adapt_adt.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + template<typename X, typename Y> + class point + { + public: + + point() : x(0), y(0) {} + point(X x_, Y y_) : x(x_), y(y_) {} + + X get_x() const { return x; } + Y get_y() const { return y; } + void set_x(X x_) { x = x_; } + void set_y(Y y_) { y = y_; } + + private: + + X x; + Y y; + }; +} + +BOOST_FUSION_ADAPT_TPL_ADT( + (X)(Y), + (ns::point)(X)(Y), + (X, X, obj.get_x(), obj.set_x(val)) + (Y, Y, obj.get_y(), obj.set_y(val)) +) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int, int> point; + typedef ns::point<std::string, std::string> name; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + boost::fusion::vector<int, float> v1(4, 2); + point v2(5, 3); + boost::fusion::vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + boost::fusion::vector<std::string, std::string> v1("Lincoln", "Abraham"); + name v2("Roosevelt", "Franklin"); + name v3("Roosevelt", "Theodore"); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p(5, 3); + boost::fusion::vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p(5, 3); + boost::fusion::list<int, long> l(p); + l = p; + } + + { + BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_at_c<point,0>::type + , boost::mpl::front<point>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adapt_tpl_struct.cpp b/libs/fusion/test/sequence/adapt_tpl_struct.cpp new file mode 100644 index 000000000..352cf9957 --- /dev/null +++ b/libs/fusion/test/sequence/adapt_tpl_struct.cpp @@ -0,0 +1,122 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/struct/adapt_struct.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + template<typename X, typename Y> + struct point + { + X x; + Y y; + }; +} + +BOOST_FUSION_ADAPT_TPL_STRUCT( + (X)(Y), + (ns::point)(X)(Y), + (X, x) + (Y, y) +) + +template<typename M> +struct s { M m; }; +BOOST_FUSION_ADAPT_TPL_STRUCT((M), (s)(M), (M, m)) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int, int> point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p = {123, 456}; + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + point v2 = {5, 3}; + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p = {5, 3}; + vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p = {5, 3}; + list<int, long> l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + + typedef boost::fusion::result_of::begin<s<int> >::type b; + typedef boost::fusion::result_of::end<s<int> >::type e; + // this fails + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::next<b>::type, e>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/adt_attribute_proxy.cpp b/libs/fusion/test/sequence/adt_attribute_proxy.cpp new file mode 100644 index 000000000..d5a947afb --- /dev/null +++ b/libs/fusion/test/sequence/adt_attribute_proxy.cpp @@ -0,0 +1,188 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> +#include <iostream> +#include <string> + +namespace fusion=boost::fusion; + +template<typename Name, typename Age> +struct employee +{ +private: + Name name; + Age age; + +public: + template<typename OtherName> + void + set_name(OtherName const& n) + { + name=n; + } + + template<typename OtherAge> + void + set_age(OtherAge const& a) + { + age=a; + } + + Name& get_name() + { + return name; + } + + Name const& get_name()const + { + return name; + } + + Age& get_age() + { + return age; + } + + Age const& get_age()const + { + return age; + } +}; + +namespace keys +{ + struct name; + struct age; +} + +BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( + (Name)(Age), + (employee) (Name)(Age), + (Name&, Name const&, obj.get_name(), obj.template set_name<Val>(val), keys::name) + (Age&, Age const&, obj.get_age(), obj.template set_age<Val>(val), keys::age)) + +int main() +{ + typedef employee<std::string, int> et; + typedef et const etc; + et e; + etc& ec=e; + + fusion::at_key<keys::name>(e)="marshall mathers"; + fusion::at_key<keys::age>(e)=37; + + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::value_at_key<et, keys::name>::type, + std::string + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::value_at_key<et, keys::name>::type, + boost::fusion::result_of::value_at_c<et, 0>::type + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::value_at_key<et, keys::age>::type, + int + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::value_at_key<et, keys::age>::type, + boost::fusion::result_of::value_at_c<et, 1>::type + >)); + + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<et, keys::name>::type, + fusion::extension::adt_attribute_proxy<et, 0, false> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<et, keys::age>::type, + fusion::extension::adt_attribute_proxy<et, 1, false> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<et, keys::name>::type, + boost::fusion::result_of::front<et>::type + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<et, keys::age>::type, + boost::fusion::result_of::back<et>::type + >)); + + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<etc, keys::name>::type, + fusion::extension::adt_attribute_proxy<et, 0, true> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<etc, keys::age>::type, + fusion::extension::adt_attribute_proxy<et, 1, true> + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<etc, keys::name>::type, + boost::fusion::result_of::front<etc>::type + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + boost::fusion::result_of::at_key<etc, keys::age>::type, + boost::fusion::result_of::back<etc>::type + >)); + + BOOST_MPL_ASSERT(( + boost::is_same< + fusion::extension::adt_attribute_proxy<et, 0, false>::type, + std::string& + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + fusion::extension::adt_attribute_proxy<et, 0, true>::type, + std::string const& + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + fusion::extension::adt_attribute_proxy<et, 1, false>::type, + int& + >)); + BOOST_MPL_ASSERT(( + boost::is_same< + fusion::extension::adt_attribute_proxy<et, 1, true>::type, + int const& + >)); + + { + std::string& name=fusion::at_key<keys::name>(e); + int& age=fusion::at_key<keys::age>(e); + BOOST_TEST(name=="marshall mathers"); + BOOST_TEST(age==37); + BOOST_TEST(fusion::at_key<keys::name>(e).get()=="marshall mathers"); + BOOST_TEST(fusion::at_key<keys::age>(e).get()==37); + BOOST_TEST(fusion::front(e).get()=="marshall mathers"); + BOOST_TEST(fusion::back(e).get()==37); + } + + { + std::string const& name=fusion::at_key<keys::name>(ec); + int const& age=fusion::at_key<keys::age>(ec); + BOOST_TEST(name=="marshall mathers"); + BOOST_TEST(age==37); + BOOST_TEST(fusion::at_key<keys::name>(ec).get()=="marshall mathers"); + BOOST_TEST(fusion::at_key<keys::age>(ec).get()==37); + BOOST_TEST(fusion::front(ec).get()=="marshall mathers"); + BOOST_TEST(fusion::back(ec).get()==37); + } +} diff --git a/libs/fusion/test/sequence/array.cpp b/libs/fusion/test/sequence/array.cpp new file mode 100644 index 000000000..15b4ed89e --- /dev/null +++ b/libs/fusion/test/sequence/array.cpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/adapted/array.hpp> +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/is_view.hpp> + +#include <boost/mpl/assert.hpp> + +int main() +{ + using namespace boost::fusion; + typedef int array_type[3]; + + BOOST_MPL_ASSERT((traits::is_sequence<array_type>)); + BOOST_MPL_ASSERT_NOT((traits::is_view<array_type>)); + + array_type arr = {1,2,3}; + + BOOST_TEST(*begin(arr) == 1); + BOOST_TEST(*next(begin(arr)) == 2); + BOOST_TEST(*advance_c<2>(begin(arr)) == 3); + BOOST_TEST(prior(next(begin(arr))) == begin(arr)); + BOOST_TEST(*prior(end(arr)) == 3); + BOOST_TEST(at_c<2>(arr) == 3); + BOOST_TEST(size(arr) == 3); + BOOST_TEST(distance(begin(arr), end(arr)) == 3); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/as_list.cpp b/libs/fusion/test/sequence/as_list.cpp new file mode 100644 index 000000000..8ee8bf128 --- /dev/null +++ b/libs/fusion/test/sequence/as_list.cpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/list/convert.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/mpl/vector_c.hpp> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + vector0<> empty; + std::cout << as_list(make_vector(1, 1.23, "harru")) << std::endl; + std::cout << as_list(push_back(empty, 999)) << std::endl; + + BOOST_TEST(as_list(make_vector(1, 1.23, "harru")) == make_vector(1, 1.23, std::string("harru"))); + BOOST_TEST(as_list(push_back(empty, 999)) == push_back(empty, 999)); + } + + { + std::cout << as_list(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl; + BOOST_TEST((as_list(mpl::vector_c<int, 1, 2, 3, 4, 5>()) + == mpl::vector_c<int, 1, 2, 3, 4, 5>())); + } + + { + // test conversion + list<int, std::string> l(make_vector(123, "harru")); + BOOST_TEST(l == make_vector(123, "harru")); + l = (make_vector(235, "hola")); // test assign + BOOST_TEST(l == make_vector(235, "hola")); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/as_map.cpp b/libs/fusion/test/sequence/as_map.cpp new file mode 100644 index 000000000..d2a89cc6c --- /dev/null +++ b/libs/fusion/test/sequence/as_map.cpp @@ -0,0 +1,61 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/map/convert.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/support/pair.hpp> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + vector0<> empty; + std::cout << as_map(make_list(make_pair<int>('X'), make_pair<double>("Men"))) << std::endl; + std::cout << as_map(push_back(empty, make_pair<int>(999))) << std::endl; + } + + { + typedef pair<int, char> p1; + typedef pair<double, std::string> p2; + boost::fusion::result_of::as_map<list<p1, p2> >::type map(make_pair<int>('X'), make_pair<double>("Men")); + std::cout << at_key<int>(map) << std::endl; + std::cout << at_key<double>(map) << std::endl; + BOOST_TEST(at_key<int>(map) == 'X'); + BOOST_TEST(at_key<double>(map) == "Men"); + } + + { + // test conversion + typedef map< + pair<int, char> + , pair<double, std::string> > + map_type; + + map_type m(make_vector(make_pair<int>('X'), make_pair<double>("Men"))); + BOOST_TEST(as_vector(m) == make_vector(make_pair<int>('X'), make_pair<double>("Men"))); + m = (make_vector(make_pair<int>('X'), make_pair<double>("Men"))); // test assign + BOOST_TEST(as_vector(m) == make_vector(make_pair<int>('X'), make_pair<double>("Men"))); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/as_set.cpp b/libs/fusion/test/sequence/as_set.cpp new file mode 100644 index 000000000..97dd89e87 --- /dev/null +++ b/libs/fusion/test/sequence/as_set.cpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/set/convert.hpp> +#include <boost/fusion/container/list/convert.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/mpl/vector_c.hpp> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + vector0<> empty; + std::cout << as_set(make_list(1, 1.23, "harru")) << std::endl; + std::cout << as_set(push_back(empty, 999)) << std::endl; + + BOOST_TEST(as_list(as_set(make_list(1, 1.23, "harru"))) + == make_list(1, 1.23, std::string("harru"))); + BOOST_TEST(as_list(as_set(push_back(empty, 999))) + == push_back(empty, 999)); + } + + { + boost::fusion::result_of::as_set<list<int, double, std::string> >::type set(1, 1.23, "harru"); + std::cout << at_key<int>(set) << std::endl; + BOOST_TEST(at_key<int>(set) == 1); + } + + { + std::cout << as_set(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl; + BOOST_TEST((as_list(as_set(mpl::vector_c<int, 1, 2, 3, 4, 5>())) + == mpl::vector_c<int, 1, 2, 3, 4, 5>())); + } + + { + // test conversion + set<int, std::string> s(make_vector(123, "harru")); + BOOST_TEST(as_vector(s) == make_vector(123, "harru")); + s = (make_vector(235, "hola")); // test assign + BOOST_TEST(as_vector(s) == make_vector(235, "hola")); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/as_vector.cpp b/libs/fusion/test/sequence/as_vector.cpp new file mode 100644 index 000000000..af1aaffb8 --- /dev/null +++ b/libs/fusion/test/sequence/as_vector.cpp @@ -0,0 +1,54 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/mpl/vector_c.hpp> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + vector0<> empty; + std::cout << as_vector(make_list(1, 1.23, "harru")) << std::endl; + std::cout << as_vector(push_back(empty, 999)) << std::endl; + + BOOST_TEST(as_vector(make_list(1, 1.23, "harru")) == make_list(1, 1.23, std::string("harru"))); + BOOST_TEST(as_vector(push_back(empty, 999)) == push_back(empty, 999)); + } + + { + std::cout << as_vector(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl; + BOOST_TEST((as_vector(mpl::vector_c<int, 1, 2, 3, 4, 5>()) + == mpl::vector_c<int, 1, 2, 3, 4, 5>())); + } + + { + // test conversion + vector<int, std::string> v(make_list(123, "harru")); + BOOST_TEST(v == make_list(123, "harru")); + v = (make_list(235, "hola")); // test assign + BOOST_TEST(v == make_list(235, "hola")); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/back_extended_deque.cpp b/libs/fusion/test/sequence/back_extended_deque.cpp new file mode 100644 index 000000000..edae9276c --- /dev/null +++ b/libs/fusion/test/sequence/back_extended_deque.cpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/deque/back_extended_deque.hpp> +#include <boost/fusion/sequence/comparison.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/mpl.hpp> + +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/iterator.hpp> + +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> + +int main() +{ + using namespace boost::fusion; + { + typedef deque<int, char> initial_deque_type; + initial_deque_type initial_deque(1, 'a'); + typedef back_extended_deque<initial_deque_type, long> extended_type; + extended_type extended(initial_deque, 101L); + + BOOST_TEST(size(extended) == 3); + BOOST_TEST(extended == make_vector(1, 'a', 101L)); + BOOST_TEST(*begin(extended) == 1); + BOOST_TEST(*next(begin(extended)) == 'a'); + BOOST_TEST(*prior(end(extended)) == 101L); + BOOST_TEST(distance(begin(extended), end(extended)) == 3); + BOOST_TEST(*advance_c<2>(begin(extended)) == 101L); + } + { + namespace mpl = boost::mpl; + typedef deque<int, char> initial_deque_type; + typedef back_extended_deque<initial_deque_type, long> extended_type; + + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 0>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 1>::type, char>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 2>::type, long>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::deref<mpl::begin<extended_type>::type>::type, int>)); + BOOST_MPL_ASSERT((mpl::equal_to<mpl::size<extended_type>::type, mpl::int_<3> >)); + } + { + char ch('a'); + long l(101L); + int i(1); + typedef deque<int&, char&> initial_deque_type; + initial_deque_type initial_deque(i, ch); + typedef back_extended_deque<initial_deque_type, long&> extended_type; + extended_type extended(initial_deque, l); + BOOST_TEST(extended == make_vector(1, 'a', 101L)); + + char ch2('b'); + long l2(202L); + int i2(2); + extended_type extended2(initial_deque_type(i2, ch2), l2); + + extended = extended2; + + BOOST_TEST(extended == make_vector(2, 'b', 202L)); + + BOOST_TEST(i == i2); + BOOST_TEST(ch == ch2); + BOOST_TEST(l == l2); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/boost_array.cpp b/libs/fusion/test/sequence/boost_array.cpp new file mode 100644 index 000000000..a1bb65421 --- /dev/null +++ b/libs/fusion/test/sequence/boost_array.cpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/adapted/boost_array.hpp> +#include <boost/array.hpp> + +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/fusion/iterator.hpp> + +#include <boost/mpl/assert.hpp> + +int main() +{ + using namespace boost::fusion; + typedef boost::array<int,3> array_type; + + BOOST_MPL_ASSERT((traits::is_sequence<array_type>)); + BOOST_MPL_ASSERT_NOT((traits::is_view<array_type>)); + + array_type arr = {{1,2,3}}; + + BOOST_TEST(*begin(arr) == 1); + BOOST_TEST(*next(begin(arr)) == 2); + BOOST_TEST(*advance_c<2>(begin(arr)) == 3); + BOOST_TEST(prior(next(begin(arr))) == begin(arr)); + BOOST_TEST(*prior(end(arr)) == 3); + BOOST_TEST(at_c<2>(arr) == 3); + BOOST_TEST(size(arr) == 3); + BOOST_TEST(distance(begin(arr), end(arr)) == 3); + + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/boost_tuple.cpp b/libs/fusion/test/sequence/boost_tuple.cpp new file mode 100644 index 000000000..c16c08940 --- /dev/null +++ b/libs/fusion/test/sequence/boost_tuple.cpp @@ -0,0 +1,109 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/boost_tuple.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/iterator/distance.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/tuple/tuple.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef boost::tuple<int, std::string> tuple_type; + BOOST_MPL_ASSERT_NOT((traits::is_view<tuple_type>)); + tuple_type t(123, "Hola!!!"); + + std::cout << at_c<0>(t) << std::endl; + std::cout << at_c<1>(t) << std::endl; + std::cout << t << std::endl; + BOOST_TEST(t == make_vector(123, "Hola!!!")); + + at_c<0>(t) = 6; + at_c<1>(t) = "mama mia"; + BOOST_TEST(t == make_vector(6, "mama mia")); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<tuple_type>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<tuple_type>::value); + + BOOST_TEST(front(t) == 6); + } + + { + fusion::vector<int, float> v1(4, 3.3f); + boost::tuple<short, float> v2(5, 3.3f); + fusion::vector<long, double> v3(5, 4.4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from boost tuple to vector + fusion::vector<int, std::string> v(tuples::make_tuple(123, "Hola!!!")); + v = tuples::make_tuple(123, "Hola!!!"); + } + + { + // conversion from boost tuple to list + fusion::list<int, std::string> l(tuples::make_tuple(123, "Hola!!!")); + l = tuples::make_tuple(123, "Hola!!!"); + } + + { + // test from Ticket #1601, submitted by Shunsuke Sogame + // expanded by Stjepan Rajko + boost::tuple<int, char> t(3, 'a'); + + BOOST_TEST(0u == fusion::distance(fusion::begin(t), fusion::begin(t))); + BOOST_TEST(1u == fusion::distance(fusion::begin(t), fusion::next(fusion::begin(t)))); + BOOST_TEST(2u == fusion::distance(fusion::begin(t), fusion::end(t))); + } + + { + typedef boost::tuple<int, std::string> tuple_type; + BOOST_MPL_ASSERT((mpl::is_sequence<tuple_type>)); + BOOST_MPL_ASSERT((boost::is_same<int, mpl::front<tuple_type>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/comparison.hpp b/libs/fusion/test/sequence/comparison.hpp new file mode 100644 index 000000000..2dfe65503 --- /dev/null +++ b/libs/fusion/test/sequence/comparison.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/comparison.hpp> + +void +equality_test() +{ + using namespace boost::fusion; + + FUSION_SEQUENCE<int, char> v1(5, 'a'); + FUSION_SEQUENCE<int, char> v2(5, 'a'); + BOOST_TEST(v1 == v2); + + FUSION_SEQUENCE<int, char> v3(5, 'b'); + FUSION_SEQUENCE<int, char> t4(2, 'a'); + BOOST_TEST(v1 != v3); + BOOST_TEST(v1 != t4); + BOOST_TEST(!(v1 != v2)); + + FUSION_SEQUENCE<int, char, bool> v5(5, 'a', true); + BOOST_TEST(v1 != v5); + BOOST_TEST(!(v1 == v5)); + BOOST_TEST(v5 != v1); + BOOST_TEST(!(v5 == v1)); +} + +void +ordering_test() +{ + using namespace boost::fusion; + + FUSION_SEQUENCE<int, float> v1(4, 3.3f); + FUSION_SEQUENCE<short, float> v2(5, 3.3f); + FUSION_SEQUENCE<long, double> v3(5, 4.4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + +#if defined(FUSION_TEST_FAIL) + FUSION_SEQUENCE<int, char, bool> v5(5, 'a', true); + v1 >= v5; +#endif +} + + + diff --git a/libs/fusion/test/sequence/cons.cpp b/libs/fusion/test/sequence/cons.cpp new file mode 100644 index 000000000..cb74af619 --- /dev/null +++ b/libs/fusion/test/sequence/cons.cpp @@ -0,0 +1,88 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2005 Eric Niebler + + 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) +==============================================================================*/ +#include <string> +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/list/cons.hpp> +#include <boost/fusion/container/generation/make_cons.hpp> +#include <boost/fusion/container/generation/cons_tie.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/lambda/lambda.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/fusion/algorithm/transformation/filter_if.hpp> +#include <boost/fusion/sequence/io/out.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/lambda.hpp> + +int +main() +{ + using namespace boost::fusion; + using boost::is_same; + namespace fusion = boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing cons + + { + std::string hello("hello"); + cons<int, cons<std::string> > ns = + make_cons(1, make_cons(hello)); + + BOOST_TEST((*begin(ns) == 1)); + BOOST_TEST((*fusion::next(begin(ns)) == hello)); + + *begin(ns) += 1; + *fusion::next(begin(ns)) += ' '; + + BOOST_TEST((*begin(ns) == 2)); + BOOST_TEST((*fusion::next(begin(ns)) == hello + ' ')); + + for_each(ns, boost::lambda::_1 += ' '); + + BOOST_TEST((*begin(ns) == 2 + ' ')); + BOOST_TEST((*fusion::next(begin(ns)) == hello + ' ' + ' ')); + } + + { + BOOST_TEST( + make_cons("hello") == make_vector(std::string("hello")) + ); + + BOOST_TEST( + make_cons(123, make_cons("hello")) == + make_vector(123, std::string("hello")) + ); + } + + { + vector<int, float> t(1, 1.1f); + cons<int, cons<float> > nf = + make_cons(1, make_cons(1.1f)); + + BOOST_TEST((t == nf)); + BOOST_TEST((vector<int>(1) == filter_if<is_same<boost::mpl::_, int> >(nf))); + + std::cout << nf << std::endl; + std::cout << filter_if<is_same<boost::mpl::_, int> >(nf) << std::endl; + } + + { + int i = 3; + cons<int&> tie(cons_tie(i)); + BOOST_TEST((*begin(tie) == 3)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/construction.hpp b/libs/fusion/test/sequence/construction.hpp new file mode 100644 index 000000000..57ba53013 --- /dev/null +++ b/libs/fusion/test/sequence/construction.hpp @@ -0,0 +1,119 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/container/list/cons.hpp> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +namespace test_detail +{ + // something to prevent warnings for unused variables + template<class T> void dummy(const T&) {} + + // no public default constructor + class foo + { + public: + + explicit foo(int v) : val(v) {} + + bool operator==(const foo& other) const + { + return val == other.val; + } + + private: + + foo() {} + int val; + }; + + // another class without a public default constructor + class no_def_constructor + { + no_def_constructor() {} + + public: + + no_def_constructor(std::string) {} + }; +} + +inline void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + nil empty; + + FUSION_SEQUENCE<> empty0; + +#ifndef NO_CONSTRUCT_FROM_NIL + FUSION_SEQUENCE<> empty1(empty); +#endif + + FUSION_SEQUENCE<int> t1; + BOOST_TEST(FUSION_AT<0>(t1) == int()); + + FUSION_SEQUENCE<float> t2(5.5f); + BOOST_TEST(FUSION_AT<0>(t2) > 5.4f && FUSION_AT<0>(t2) < 5.6f); + + FUSION_SEQUENCE<foo> t3(foo(12)); + BOOST_TEST(FUSION_AT<0>(t3) == foo(12)); + + FUSION_SEQUENCE<double> t4(t2); + BOOST_TEST(FUSION_AT<0>(t4) > 5.4 && FUSION_AT<0>(t4) < 5.6); + + FUSION_SEQUENCE<int, float> t5; + BOOST_TEST(FUSION_AT<0>(t5) == int()); + BOOST_TEST(FUSION_AT<1>(t5) == float()); + + FUSION_SEQUENCE<int, float> t6(12, 5.5f); + BOOST_TEST(FUSION_AT<0>(t6) == 12); + BOOST_TEST(FUSION_AT<1>(t6) > 5.4f && FUSION_AT<1>(t6) < 5.6f); + + FUSION_SEQUENCE<int, float> t7(t6); + BOOST_TEST(FUSION_AT<0>(t7) == 12); + BOOST_TEST(FUSION_AT<1>(t7) > 5.4f && FUSION_AT<1>(t7) < 5.6f); + + FUSION_SEQUENCE<long, double> t8(t6); + BOOST_TEST(FUSION_AT<0>(t8) == 12); + BOOST_TEST(FUSION_AT<1>(t8) > 5.4f && FUSION_AT<1>(t8) < 5.6f); + + dummy + ( + FUSION_SEQUENCE<no_def_constructor, no_def_constructor, no_def_constructor>( + std::string("Jaba"), // ok, since the default + std::string("Daba"), // constructor is not used + std::string("Doo") + ) + ); + + dummy(FUSION_SEQUENCE<int, double>()); + dummy(FUSION_SEQUENCE<int, double>(1,3.14)); + +#if defined(FUSION_TEST_FAIL) + dummy(FUSION_SEQUENCE<double&>()); // should fail, no defaults for references + dummy(FUSION_SEQUENCE<const double&>()); // likewise +#endif + + { + double dd = 5; + dummy(FUSION_SEQUENCE<double&>(dd)); // ok + dummy(FUSION_SEQUENCE<const double&>(dd+3.14)); // ok, but dangerous + } + +#if defined(FUSION_TEST_FAIL) + dummy(FUSION_SEQUENCE<double&>(dd+3.14)); // should fail, + // temporary to non-const reference +#endif +} diff --git a/libs/fusion/test/sequence/copy.hpp b/libs/fusion/test/sequence/copy.hpp new file mode 100644 index 000000000..cb9384abc --- /dev/null +++ b/libs/fusion/test/sequence/copy.hpp @@ -0,0 +1,98 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/mpl/insert_range.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/begin.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/static_assert.hpp> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +#if !defined(FUSION_MAKE) +#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE) +#endif + +#if !defined(FUSION_TIE) +#define FUSION_TIE BOOST_PP_CAT(FUSION_SEQUENCE, _tie) +#endif + +namespace test_detail +{ + // classes with different kinds of conversions + class AA {}; + class BB : public AA {}; + struct CC { CC() {} CC(const BB&) {} }; + struct DD { operator CC() const { return CC(); }; }; +} + +boost::fusion::FUSION_SEQUENCE<double, double, double, double> +foo(int i) +{ + return boost::fusion::FUSION_MAKE(i, i+1, i+2, i+3); +} + +void test_mpl() +{ + using namespace boost::fusion; + + typedef FUSION_SEQUENCE<int, char> seq; + + typedef + boost::mpl::insert_range< + boost::mpl::vector<> + , boost::mpl::end< boost::mpl::vector<> >::type + , seq + >::type + sequence; + + typedef boost::mpl::equal<sequence, boost::mpl::vector<int, char> > equal; + BOOST_STATIC_ASSERT(equal::value); +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + FUSION_SEQUENCE<int, char> t1(4, 'a'); + FUSION_SEQUENCE<int, char> t2(5, 'b'); + t2 = t1; + BOOST_TEST(FUSION_AT<0>(t1) == FUSION_AT<0>(t2)); + BOOST_TEST(FUSION_AT<1>(t1) == FUSION_AT<1>(t2)); + + FUSION_SEQUENCE<long, std::string> t3(2, "a"); + t3 = t1; + BOOST_TEST((double)FUSION_AT<0>(t1) == FUSION_AT<0>(t3)); + BOOST_TEST(FUSION_AT<1>(t1) == FUSION_AT<1>(t3)[0]); + + // testing copy and assignment with implicit conversions + // between elements testing tie + + FUSION_SEQUENCE<char, BB*, BB, DD> t; + FUSION_SEQUENCE<int, AA*, CC, CC> a(t); + a = t; + + int i; char c; double d; + FUSION_TIE(i, c, d) = FUSION_MAKE(1, 'a', 5.5); + + BOOST_TEST(i==1); + BOOST_TEST(c=='a'); + BOOST_TEST(d>5.4 && d<5.6); + + // returning a tuple with conversion + foo(2); + + test_mpl(); +} diff --git a/libs/fusion/test/sequence/deduce_sequence.cpp b/libs/fusion/test/sequence/deduce_sequence.cpp new file mode 100644 index 000000000..ea6616627 --- /dev/null +++ b/libs/fusion/test/sequence/deduce_sequence.cpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/fusion/support/deduce_sequence.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/mpl/equal.hpp> + +#include <boost/ref.hpp> + +using boost::is_same; +using boost::reference_wrapper; +using boost::fusion::traits::deduce; +using boost::fusion::traits::deduce_sequence; + +namespace fusion = boost::fusion; + +template <class Args> +struct test_seq_ctor +{ + typename deduce_sequence<Args>::type fsq_args; + + test_seq_ctor(Args const & args) + : fsq_args(args) + { } +}; + +#define TEST_SAME_TYPE(a,b) BOOST_TEST(( is_same< a, b >::value )) +#define TEST_SAME_ELEMENTS(a,b) BOOST_TEST(( boost::mpl::equal< a, b >::type::value )) + +typedef fusion::vector<int, int const, int &, int const &> args1; +typedef fusion::vector<int, int, int &, int> storable1; +template struct test_seq_ctor<args1>; + +typedef fusion::vector< reference_wrapper<int> &, reference_wrapper<int const> &, + reference_wrapper<int> const &, reference_wrapper<int const> const & > args2; +typedef fusion::vector<int &, int const &, int &, int const &> storable2; +template struct test_seq_ctor<args2>; + + +typedef fusion::vector<int *, int const *, int const * const, int const * &, int const * const &> args3; +typedef fusion::vector<int *, int const *, int const *, int const * &, int const * > storable3; +template struct test_seq_ctor<args3>; + +typedef fusion::vector<int(&)[2], int const(&)[2]> args4; +typedef args4 storable4; +template struct test_seq_ctor<args4>; + +int main() +{ + TEST_SAME_TYPE(deduce<int &>::type, int &); + TEST_SAME_TYPE(deduce<int volatile &>::type, int volatile &); + + TEST_SAME_TYPE(deduce<int>::type, int); + TEST_SAME_TYPE(deduce<int const &>::type, int); + TEST_SAME_TYPE(deduce<int const volatile &>::type, int); + + TEST_SAME_TYPE(deduce< reference_wrapper<int> & >::type, int &); + TEST_SAME_TYPE(deduce< reference_wrapper<int const> & >::type, int const &); + TEST_SAME_TYPE(deduce< reference_wrapper<int> const & >::type, int &); + TEST_SAME_TYPE(deduce< reference_wrapper<int const> const & >::type, int const &); + + TEST_SAME_TYPE(deduce< int(&)[2] >::type, int(&)[2]); + TEST_SAME_TYPE(deduce< int const (&)[2] >::type, int const (&)[2]); + TEST_SAME_TYPE(deduce< int volatile (&)[2] >::type, int volatile (&)[2]); + TEST_SAME_TYPE(deduce< int const volatile (&)[2] >::type, int const volatile (&)[2]); + + TEST_SAME_ELEMENTS(deduce_sequence<args1>::type,storable1); + TEST_SAME_ELEMENTS(deduce_sequence<args2>::type,storable2); + TEST_SAME_ELEMENTS(deduce_sequence<args3>::type,storable3); + TEST_SAME_ELEMENTS(deduce_sequence<args4>::type,storable4); + + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/define_assoc_struct.cpp b/libs/fusion/test/sequence/define_assoc_struct.cpp new file mode 100644 index 000000000..ed8dfbe05 --- /dev/null +++ b/libs/fusion/test/sequence/define_assoc_struct.cpp @@ -0,0 +1,114 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/container.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/adapted/struct/define_assoc_struct.hpp> +#include <boost/preprocessor/empty.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; +} + +BOOST_FUSION_DEFINE_ASSOC_STRUCT( + (ns), + point, + (int, x, ns::x_member) + (int, y, ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + ns::point v2(5, 3); + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p(5, 3); + vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p(5, 3); + list<int, long> l(p); + l = p; + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<ns::point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<ns::point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int>)); + + ns::point p(5, 3); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + { + ns::point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/define_assoc_tpl_struct.cpp b/libs/fusion/test/sequence/define_assoc_tpl_struct.cpp new file mode 100644 index 000000000..6d0b5bdbf --- /dev/null +++ b/libs/fusion/test/sequence/define_assoc_tpl_struct.cpp @@ -0,0 +1,118 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/container.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/adapted/struct/define_assoc_struct.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +namespace ns +{ + struct x_member; + struct y_member; + struct z_member; +} + +BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( + (X)(Y), + (ns), + point, + (int, x, ns::x_member) + (int, y, ns::y_member) +) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int,int> point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + point v2(5, 3); + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p(5, 3); + vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p(5, 3); + list<int, long> l(p); + l = p; + } + + { + // assoc stuff + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::x_member>)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<point, ns::y_member>)); + BOOST_MPL_ASSERT((boost::mpl::not_<boost::fusion::result_of::has_key<point, ns::z_member> >)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::x_member>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::y_member>::type, int>)); + + point p(5, 3); + + BOOST_TEST(at_key<ns::x_member>(p) == 5); + BOOST_TEST(at_key<ns::y_member>(p) == 3); + } + + { + point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/define_struct.cpp b/libs/fusion/test/sequence/define_struct.cpp new file mode 100644 index 000000000..795fdf6e7 --- /dev/null +++ b/libs/fusion/test/sequence/define_struct.cpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/container.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/adapted/struct/define_struct.hpp> +#include <boost/preprocessor/empty.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +BOOST_FUSION_DEFINE_STRUCT( + (ns), + point, + (int, x) + (int, y) +) + +BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), s, (int, m)) + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>)); + ns::point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<ns::point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<ns::point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + ns::point v2(5, 3); + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from ns::point to vector + ns::point p(5, 3); + vector<int, long> v(p); + v = p; + } + + { + // conversion from ns::point to list + ns::point p(5, 3); + list<int, long> l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + + typedef boost::fusion::result_of::begin<s>::type b; + typedef boost::fusion::result_of::end<s>::type e; + // this fails + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::next<b>::type, e>)); + } + + { + ns::point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/define_tpl_struct.cpp b/libs/fusion/test/sequence/define_tpl_struct.cpp new file mode 100644 index 000000000..9896493cc --- /dev/null +++ b/libs/fusion/test/sequence/define_tpl_struct.cpp @@ -0,0 +1,109 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + 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) +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence.hpp> +#include <boost/fusion/container.hpp> +#include <boost/fusion/support.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/adapted/struct/define_struct.hpp> +#include <boost/preprocessor/empty.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> +#include <iostream> +#include <string> + +BOOST_FUSION_DEFINE_TPL_STRUCT( + (X)(Y), + (ns), + point, + (X, x) + (Y, y) +) + +BOOST_FUSION_DEFINE_TPL_STRUCT((M), BOOST_PP_EMPTY(), s, (M, m)) + +int +main() +{ + using namespace boost::fusion; + + typedef ns::point<int, int> point; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + BOOST_MPL_ASSERT_NOT((traits::is_view<point>)); + point p(123, 456); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, 456)); + + at_c<0>(p) = 6; + at_c<1>(p) = 9; + BOOST_TEST(p == make_vector(6, 9)); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<point>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<point>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == 9); + } + + { + vector<int, float> v1(4, 2); + point v2(5, 3); + vector<long, double> v3(5, 4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from point to vector + point p(5, 3); + vector<int, long> v(p); + v = p; + } + + { + // conversion from point to list + point p(5, 3); + list<int, long> l(p); + l = p; + } + + { // begin/end + using namespace boost::fusion; + + typedef boost::fusion::result_of::begin<s<int> >::type b; + typedef boost::fusion::result_of::end<s<int> >::type e; + // this fails + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::next<b>::type, e>)); + } + + + { + point p = make_list(5,3); + BOOST_TEST(p == make_vector(5,3)); + + p = make_list(3,5); + BOOST_TEST(p == make_vector(3,5)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_comparison.cpp b/libs/fusion/test/sequence/deque_comparison.cpp new file mode 100644 index 000000000..9bbf4fd95 --- /dev/null +++ b/libs/fusion/test/sequence/deque_comparison.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE deque +#include "comparison.hpp" + +int +main() +{ + equality_test(); + ordering_test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/deque_construction.cpp b/libs/fusion/test/sequence/deque_construction.cpp new file mode 100644 index 000000000..4fc8c8830 --- /dev/null +++ b/libs/fusion/test/sequence/deque_construction.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE deque +#include "construction.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/deque_copy.cpp b/libs/fusion/test/sequence/deque_copy.cpp new file mode 100644 index 000000000..2cf4a8eb3 --- /dev/null +++ b/libs/fusion/test/sequence/deque_copy.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/generation/make_deque.hpp> +#include <boost/fusion/container/generation/deque_tie.hpp> + +#define FUSION_SEQUENCE deque +#include "copy.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_iterator.cpp b/libs/fusion/test/sequence/deque_iterator.cpp new file mode 100644 index 000000000..f10f9b9e3 --- /dev/null +++ b/libs/fusion/test/sequence/deque_iterator.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE deque +#define FUSION_TRAVERSAL_TAG bidirectional_traversal_tag +#include "./iterator.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/deque_make.cpp b/libs/fusion/test/sequence/deque_make.cpp new file mode 100644 index 000000000..fe5705335 --- /dev/null +++ b/libs/fusion/test/sequence/deque_make.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/generation/make_deque.hpp> + +#define FUSION_SEQUENCE deque +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/deque_misc.cpp b/libs/fusion/test/sequence/deque_misc.cpp new file mode 100644 index 000000000..c9b880ea3 --- /dev/null +++ b/libs/fusion/test/sequence/deque_misc.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/deque/convert.hpp> +#include <boost/fusion/adapted/mpl.hpp> + +#define FUSION_SEQUENCE deque +#include "misc.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_move.cpp b/libs/fusion/test/sequence/deque_move.cpp new file mode 100644 index 000000000..42fda2d9c --- /dev/null +++ b/libs/fusion/test/sequence/deque_move.cpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2012 Joel de Guzman + + 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) +==============================================================================*/ +#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ + + +#include <boost/config.hpp> + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE boost::fusion::deque +#include "move.hpp" + +#else +#include <boost/detail/lightweight_test.hpp> +#endif + +int +main() +{ +#if !defined(BOOST_NO_RVALUE_REFERENCES) + test(); +#endif + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_mutate.cpp b/libs/fusion/test/sequence/deque_mutate.cpp new file mode 100644 index 000000000..1564ade9a --- /dev/null +++ b/libs/fusion/test/sequence/deque_mutate.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE deque +#include "mutate.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_tie.cpp b/libs/fusion/test/sequence/deque_tie.cpp new file mode 100644 index 000000000..f6ee91600 --- /dev/null +++ b/libs/fusion/test/sequence/deque_tie.cpp @@ -0,0 +1,23 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/generation/deque_tie.hpp> +#include <boost/fusion/container/generation/ignore.hpp> +#include <boost/fusion/container/generation/make_deque.hpp> + +#define FUSION_SEQUENCE deque +#include "tie.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/deque_value_at.cpp b/libs/fusion/test/sequence/deque_value_at.cpp new file mode 100644 index 000000000..5b31504fb --- /dev/null +++ b/libs/fusion/test/sequence/deque_value_at.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/container/deque/deque.hpp> + +#define FUSION_SEQUENCE deque +#include "value_at.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/filter_view.cpp b/libs/fusion/test/sequence/filter_view.cpp new file mode 100644 index 000000000..8ebe14767 --- /dev/null +++ b/libs/fusion/test/sequence/filter_view.cpp @@ -0,0 +1,129 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/container/vector/vector_iterator.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/view/filter_view/filter_view.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/container/map.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/iterator/key_of.hpp> +#include <boost/fusion/iterator/value_of_data.hpp> +#include <boost/fusion/iterator/deref_data.hpp> +#include <boost/type_traits/is_class.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/arg.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/assert.hpp> + +struct X +{ + operator char const*() const + { + return "<X-object>"; + } +}; + +struct Y +{ + operator char const*() const + { + return "<Y-object>"; + } +}; + +struct reject_all +{ + template<typename T> + struct apply : boost::mpl::false_ + {}; +}; + +int +main() +{ + using namespace boost::fusion; + + using boost::mpl::int_; + using boost::mpl::_; + using boost::mpl::not_; + using boost::mpl::less; + using boost::mpl::vector_c; + using boost::is_class; + using boost::is_same; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef vector<Y, char, long, X, bool, double> vector_type; + + X x; Y y; + vector_type v(y, '@', 987654, x, true, 6.6); + typedef filter_view<vector_type const, not_<is_class<_> > > filter_view_type; + filter_view_type view(v); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector('@', 987654, true, 6.6))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<filter_view_type>::value == 4); + } + + //cschmidt: This is illegal C++. ADL instantiates less<_, int_<3> > - which + //leads to compile errors. + /*{ + // $$$ JDG $$$ For some obscure reason, EDG based compilers + // (e.g. comeau 4.3.3, intel) have problems with this. + // vc7.1 and g++ are ok. The errors from comeau are useless. + +#ifndef __EDG_VERSION__ + typedef vector_c<int, 5, 1, 2, 3, 6, 0, -1> vector_type; + typedef filter_view<vector_type const, less<_, int_<3> > > filter_view_type; + vector_type v; + filter_view_type view(v); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(1, 2, 0, -1))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<filter_view_type>::value == 4); +#endif + }*/ + + { + // Previous filtering out all values caused problems as begin<seq> was not equal to end<seq> + // Picked up by Andreas Pokorny + typedef vector<int> vec; + typedef filter_view<vec, reject_all> filter_view_type; + + BOOST_MPL_ASSERT((boost::fusion::result_of::equal_to<boost::fusion::result_of::begin<filter_view_type>::type, boost::fusion::result_of::end<filter_view_type>::type>)); + } + + { + typedef map<pair<void, int>, pair<double, std::string> > map_type; + map_type m(make_pair<void>(0), make_pair<double>("Bond")); + + typedef filter_view<map_type const, is_same<_, pair<double, std::string> > > filter_view_type; + filter_view_type f(m); + + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<filter_view_type, double>::type)); + BOOST_MPL_ASSERT_NOT((boost::fusion::result_of::has_key<filter_view_type, void>::type)); + + BOOST_MPL_ASSERT((is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::begin<filter_view_type>::type>::type, double>)); + BOOST_MPL_ASSERT((is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<filter_view_type>::type>::type, std::string>)); + + std::cout << deref_data(begin(f)) << std::endl; + BOOST_TEST((deref_data(begin(f)) == "Bond")); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/front_extended_deque.cpp b/libs/fusion/test/sequence/front_extended_deque.cpp new file mode 100644 index 000000000..d1c903432 --- /dev/null +++ b/libs/fusion/test/sequence/front_extended_deque.cpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/container/deque/deque.hpp> +#include <boost/fusion/container/deque/front_extended_deque.hpp> +#include <boost/fusion/sequence/comparison.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/mpl.hpp> + +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/iterator.hpp> + +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> + +int main() +{ + using namespace boost::fusion; + { + typedef deque<char, long> initial_deque_type; + initial_deque_type initial_deque('a', 101L); + typedef front_extended_deque<initial_deque_type, int> extended_type; + extended_type extended(initial_deque, 1); + + BOOST_TEST(size(extended) == 3); + BOOST_TEST(extended == make_vector(1, 'a', 101L)); + BOOST_TEST(*begin(extended) == 1); + BOOST_TEST(*next(begin(extended)) == 'a'); + BOOST_TEST(*prior(end(extended)) == 101L); + BOOST_TEST(distance(begin(extended), end(extended)) == 3); + BOOST_TEST(*advance_c<2>(begin(extended)) == 101L); + } + { + namespace mpl = boost::mpl; + typedef deque<char, long> initial_deque_type; + typedef front_extended_deque<initial_deque_type, int> extended_type; + + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 0>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 1>::type, char>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::at_c<extended_type, 2>::type, long>)); + BOOST_MPL_ASSERT((boost::is_same<mpl::deref<mpl::begin<extended_type>::type>::type, int>)); + BOOST_MPL_ASSERT((mpl::equal_to<mpl::size<extended_type>::type, mpl::int_<3> >)); + } + { + char ch('a'); + long l(101L); + int i(1); + typedef deque<char&, long&> initial_deque_type; + initial_deque_type initial_deque(ch, l); + typedef front_extended_deque<initial_deque_type, int&> extended_type; + extended_type extended(initial_deque, i); + BOOST_TEST(extended == make_vector(1, 'a', 101L)); + + char ch2('b'); + long l2(202L); + int i2(2); + extended_type extended2(initial_deque_type(ch2, l2), i2); + + extended = extended2; + + BOOST_TEST(extended == make_vector(2, 'b', 202L)); + + BOOST_TEST(i == i2); + BOOST_TEST(ch == ch2); + BOOST_TEST(l == l2); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/io.cpp b/libs/fusion/test/sequence/io.cpp new file mode 100644 index 000000000..74e0f30ce --- /dev/null +++ b/libs/fusion/test/sequence/io.cpp @@ -0,0 +1,116 @@ +/*============================================================================= + Copyright (C) 1999-2003 Jaakko Jarvi + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/io/in.hpp> + +#include <fstream> +#include <iterator> +#include <algorithm> +#include <string> + +#if defined BOOST_NO_STRINGSTREAM +# include <strstream> +#else +# include <sstream> +#endif + +using boost::fusion::vector; +using boost::fusion::make_vector; +using boost::fusion::tuple_close; +using boost::fusion::tuple_open; +using boost::fusion::tuple_delimiter; + +#if defined BOOST_NO_STRINGSTREAM + using std::ostrstream; + using std::istrstream; + typedef ostrstream useThisOStringStream; + typedef istrstream useThisIStringStream; +#else + using std::ostringstream; + using std::istringstream; + typedef ostringstream useThisOStringStream; + typedef istringstream useThisIStringStream; +#endif + +using std::endl; +using std::ofstream; +using std::ifstream; +using std::string; + +int +main() +{ + using boost::fusion::tuple_close; + using boost::fusion::tuple_open; + using boost::fusion::tuple_delimiter; + + useThisOStringStream os1; + + // Set format [a, b, c] for os1 + os1 << tuple_open('['); + os1 << tuple_close(']'); + os1 << tuple_delimiter(','); + os1 << make_vector(1, 2, 3); + + BOOST_TEST (os1.str() == std::string("[1,2,3]") ); + + { + useThisOStringStream os2; + // Set format (a:b:c) for os2; + os2 << tuple_open('('); + os2 << tuple_close(')'); + os2 << tuple_delimiter(':'); + + os2 << make_vector("TUPU", "HUPU", "LUPU", 4.5); + BOOST_TEST (os2.str() == std::string("(TUPU:HUPU:LUPU:4.5)") ); + } + + // The format is still [a, b, c] for os1 + os1 << make_vector(1, 2, 3); + BOOST_TEST (os1.str() == std::string("[1,2,3][1,2,3]") ); + + std::ofstream tmp("temp.tmp"); + + tmp << make_vector("One", "Two", 3); + tmp << tuple_delimiter(':'); + tmp << make_vector(1000, 2000, 3000) << endl; + + tmp.close(); + + // When reading tuples from a stream, manipulators must be set correctly: + ifstream tmp3("temp.tmp"); + vector<string, string, int> j; + + tmp3 >> j; + BOOST_TEST (tmp3.good() ); + + tmp3 >> tuple_delimiter(':'); + vector<int, int, int> i; + tmp3 >> i; + BOOST_TEST (tmp3.good() ); + + tmp3.close(); + + // reading vector<int, int, int> in format (a b c); + useThisIStringStream is("(100 200 300)"); + + vector<int, int, int> ti; + BOOST_TEST(bool(is >> ti) != 0); + BOOST_TEST(ti == make_vector(100, 200, 300)); + + // Note that strings are problematic: + // writing a tuple on a stream and reading it back doesn't work in + // general. If this is wanted, some kind of a parseable string class + // should be used. + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/iterator.hpp b/libs/fusion/test/sequence/iterator.hpp new file mode 100644 index 000000000..d88b7199f --- /dev/null +++ b/libs/fusion/test/sequence/iterator.hpp @@ -0,0 +1,197 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <string> +#include <boost/static_assert.hpp> +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/equal_to.hpp> +#include <boost/fusion/iterator/distance.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/end.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> + +void test() +{ + using namespace boost::fusion; + using namespace boost; + + { // Testing deref, next, prior, begin, end + + char const* s = "Hello"; + typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type; + seq_type v(1, 'x', 3.3, s); + boost::fusion::result_of::begin<seq_type>::type i(v); + + BOOST_TEST(*i == 1); + BOOST_TEST(*next(i) == 'x'); + BOOST_TEST(*next(next(i)) == 3.3); + BOOST_TEST(*next(next(next(i))) == s); + next(next(next(next(i)))); // end + +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*prior(next(next(next(i)))) == 3.3); + BOOST_TEST(*prior(prior(next(next(next(i))))) == 'x'); + BOOST_TEST(*prior(prior(prior(next(next(next(i)))))) == 1); +#endif + BOOST_TEST(*begin(v) == 1); +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*prior(end(v)) == s); +#endif + + *i = 3; + BOOST_TEST(*i == 3); + BOOST_TEST(&*i == &at_c<0>(v)); + + // prove that it is mutable + *i = 987; + BOOST_TEST(*i == 987); + } + + { // Testing const sequence and const iterator + + char const* s = "Hello"; + typedef FUSION_SEQUENCE<int, char, double, char const*> const seq_type; + seq_type t(1, 'x', 3.3, s); + boost::fusion::result_of::begin<seq_type>::type i(t); + + BOOST_TEST(*i == 1); + BOOST_TEST(*next(i) == 'x'); + BOOST_TEST(*begin(t) == 1); +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*prior(end(t)) == s); +#endif + +#ifdef FUSION_TEST_FAIL + *i = 3; // must not compile +#endif + } + + { // Testing iterator equality + + typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type; + typedef FUSION_SEQUENCE<int, char, double, char const*> const cseq_type; + typedef boost::fusion::result_of::begin<seq_type>::type vi1; + typedef boost::fusion::result_of::begin<cseq_type>::type vi2; + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1 const, vi1>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1, vi1 const>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1, vi2>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1 const, vi2>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1, vi2 const>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::equal_to<vi1 const, vi2 const>::value)); + } + + { + typedef FUSION_SEQUENCE<int, int> seq_type; + typedef boost::fusion::result_of::begin<seq_type>::type begin_type; + typedef boost::fusion::result_of::end<seq_type>::type end_type; + typedef boost::fusion::result_of::next<begin_type>::type i1; + typedef boost::fusion::result_of::next<i1>::type i2; + + BOOST_STATIC_ASSERT((is_same<end_type, i2>::value)); + } + + { // testing deref, next, prior, begin, end + + char const* s = "Hello"; + typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type; + seq_type t(1, 'x', 3.3, s); + boost::fusion::result_of::begin<seq_type>::type i(t); + + BOOST_TEST(*i == 1); + BOOST_TEST(*next(i) == 'x'); + BOOST_TEST(*next(next(i)) == 3.3); + BOOST_TEST(*next(next(next(i))) == s); + + next(next(next(next(i)))); // end + +#ifdef FUSION_TEST_FAIL + next(next(next(next(next(i))))); // past the end: must not compile +#endif + +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*prior(next(next(next(i)))) == 3.3); + BOOST_TEST(*prior(prior(next(next(next(i))))) == 'x'); + BOOST_TEST(*prior(prior(prior(next(next(next(i)))))) == 1); +#endif + BOOST_TEST(*begin(t) == 1); +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*prior(end(t)) == s); +#endif + + *i = 3; + BOOST_TEST(*i == 3); + BOOST_TEST(*i == at_c<0>(t)); + } + + { // Testing distance + + typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type; + seq_type t(1, 'x', 3.3, "Hello"); + + BOOST_STATIC_ASSERT((boost::fusion::result_of::distance< + boost::fusion::result_of::begin<seq_type>::type + , boost::fusion::result_of::end<seq_type>::type >::value == 4)); + + BOOST_TEST(distance(begin(t), end(t)).value == 4); + } + + { // Testing tuple iterator boost::fusion::result_of::value_of, boost::fusion::result_of::deref, boost::fusion::result_of::value_at + + typedef FUSION_SEQUENCE<int, char&> seq_type; + typedef boost::fusion::result_of::begin<seq_type>::type i0; + typedef boost::fusion::result_of::next<i0>::type i1; + typedef boost::fusion::result_of::next<boost::fusion::result_of::begin<const seq_type>::type>::type i2; + + BOOST_STATIC_ASSERT(( + is_same<boost::fusion::result_of::value_at_c<seq_type, 0>::type, int>::value)); + + BOOST_STATIC_ASSERT(( + is_same<boost::fusion::result_of::value_at_c<seq_type, 1>::type, char&>::value)); + + BOOST_STATIC_ASSERT(( + is_same<traits::category_of<i0>::type, FUSION_TRAVERSAL_TAG>::value)); + + BOOST_STATIC_ASSERT((is_same<boost::fusion::result_of::deref<i0>::type, int&>::value)); + BOOST_STATIC_ASSERT((is_same<boost::fusion::result_of::deref<i1>::type, char&>::value)); + + BOOST_STATIC_ASSERT((is_same<boost::fusion::result_of::value_of<i0>::type, int>::value)); + BOOST_STATIC_ASSERT((is_same<boost::fusion::result_of::value_of<i1>::type, char&>::value)); + } + + { // Testing advance + + typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type; + seq_type t(1, 'x', 3.3, "Hello"); + + BOOST_TEST(*advance_c<0>(begin(t)) == at_c<0>(t)); + BOOST_TEST(*advance_c<1>(begin(t)) == at_c<1>(t)); + BOOST_TEST(*advance_c<2>(begin(t)) == at_c<2>(t)); + BOOST_TEST(*advance_c<3>(begin(t)) == at_c<3>(t)); + +#if !defined(FUSION_NO_PRIOR) + BOOST_TEST(*advance_c<-1>(end(t)) == at_c<3>(t)); + BOOST_TEST(*advance_c<-2>(end(t)) == at_c<2>(t)); + BOOST_TEST(*advance_c<-3>(end(t)) == at_c<1>(t)); + BOOST_TEST(*advance_c<-4>(end(t)) == at_c<0>(t)); +#endif + + BOOST_TEST(&*advance_c<0>(begin(t)) == &at_c<0>(t)); + BOOST_TEST(&*advance_c<1>(begin(t)) == &at_c<1>(t)); + BOOST_TEST(&*advance_c<2>(begin(t)) == &at_c<2>(t)); + BOOST_TEST(&*advance_c<3>(begin(t)) == &at_c<3>(t)); + } +} + + + + diff --git a/libs/fusion/test/sequence/iterator_range.cpp b/libs/fusion/test/sequence/iterator_range.cpp new file mode 100644 index 000000000..18f91af0a --- /dev/null +++ b/libs/fusion/test/sequence/iterator_range.cpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/map.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/view/iterator_range/iterator_range.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/key_of.hpp> +#include <boost/fusion/iterator/value_of_data.hpp> +#include <boost/fusion/iterator/deref_data.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/begin.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/static_assert.hpp> + +int +main() +{ + using namespace boost::fusion; + namespace fusion = boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type vec(1, 'x', 3.3, s); + + { + typedef vector_iterator<vector_type, 1> i1t; + typedef vector_iterator<vector_type, 3> i3t; + + i1t i1(vec); + i3t i3(vec); + + typedef iterator_range<i1t, i3t> slice_t; + slice_t slice(i1, i3); + std::cout << slice << std::endl; + BOOST_TEST((slice == make_vector('x', 3.3))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 2); + } + + { + typedef vector_iterator<vector_type, 0> i1t; + typedef vector_iterator<vector_type, 0> i3t; + + i1t i1(vec); + i3t i3(vec); + + typedef iterator_range<i1t, i3t> slice_t; + slice_t slice(i1, i3); + std::cout << slice << std::endl; + BOOST_TEST(slice == make_vector()); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 0); + } + } + + { + typedef boost::mpl::vector_c<int, 2, 3, 4, 5, 6> mpl_vec; + typedef boost::mpl::begin<mpl_vec>::type it0; + typedef boost::mpl::next<it0>::type it1; + typedef boost::mpl::next<it1>::type it2; + typedef boost::mpl::next<it2>::type it3; + + it1 f; + it3 l; + + typedef iterator_range<it1, it3> slice_t; + slice_t slice(f, l); + std::cout << slice << std::endl; + BOOST_TEST((slice == make_vector(3, 4))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 2); + } + + { + typedef map<pair<void,std::string>, pair<double,char>,pair<void*, int> > map_type; + map_type m(make_pair<void>("foo"), make_pair<double>('x'), make_pair<void*>(2)); + + typedef iterator_range< + boost::fusion::result_of::begin<map_type>::type + , boost::fusion::result_of::advance_c<boost::fusion::result_of::begin<map_type>::type,2>::type + > range_type; + range_type r(begin(m), advance_c<2>(begin(m))); + + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<range_type, void>::type)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<range_type, double>::type)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::begin<range_type>::type>::type, void>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<range_type>::type>::type>::type, double>)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<range_type>::type>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<range_type>::type>::type>::type, char>)); + + std::cout << deref_data(begin(r)) << std::endl; + std::cout << deref_data(fusion::next(begin(r))) << std::endl; + BOOST_TEST((deref_data(begin(r)) == "foo")); + BOOST_TEST((deref_data(fusion::next(begin(r))) == 'x')); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/joint_view.cpp b/libs/fusion/test/sequence/joint_view.cpp new file mode 100644 index 000000000..ba5659b74 --- /dev/null +++ b/libs/fusion/test/sequence/joint_view.cpp @@ -0,0 +1,188 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/map.hpp> +#include <boost/fusion/container/set.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/view/joint_view/joint_view.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/key_of.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/iterator/deref_data.hpp> +#include <boost/mpl/assert.hpp> +#include <string> + +struct X +{ + operator char const*() const + { + return "<X-object>"; + } +}; + +int +main() +{ + using namespace boost::fusion; + namespace fusion = boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing joint_view + + { + vector<int> t1(3); + vector<X> t2; + typedef joint_view<vector<int>, vector<X> > view_type; + view_type view(t1, t2); + + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(3, X()))); + } + + { + vector<int, char> t1(3, 'x'); + vector<X> t2; + typedef joint_view<vector<int, char>, vector<X> > view_type; + view_type view(t1, t2); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(3, 'x', X()))); + + *begin(view) = 4; + BOOST_TEST(at_c<0>(t1) == 4); + } + + { + vector<int, char> t1(3, 'x'); + vector<X, int> t2; + typedef joint_view<vector<int, char>, vector<X, int> > view_type; + view_type view(t1, t2); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(3, 'x', X(), 0))); + } + + { + typedef vector<int> t1_type; + t1_type t1(777); + typedef vector<int, char, double> t2_type; + t2_type t2(1, 'x', 3.3); + + { + typedef joint_view<t1_type, t2_type> view_type; + view_type view(t1, t2); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(777, 1, 'x', 3.3))); + } + + { + typedef joint_view<t2_type, t1_type> view_type; + view_type view(t2, t1); + std::cout << view << std::endl; + BOOST_TEST((view == make_vector(1, 'x', 3.3, 777))); + } + + { + typedef joint_view<t2_type, t1_type> jv_type; + typedef joint_view<jv_type, jv_type> jv2_type; + + jv_type jv(t2, t1); + jv2_type jv2(jv, jv); + + std::cout << jv << std::endl; + std::cout << jv2 << std::endl; + + BOOST_TEST(jv2 + == make_vector(1, 'x', 3.3, 777, 1, 'x', 3.3, 777)); + } + + { + typedef joint_view<t2_type, t1_type> jt_type; + typedef joint_view<t1_type, t2_type> jv2_type; + typedef joint_view<jt_type, jv2_type> jv3_type; + + jt_type jt(t2, t1); + jv2_type jv2(t1, t2); + jv3_type jv3(jt, jv2); + + std::cout << jt << std::endl; + std::cout << jv2 << std::endl; + std::cout << jv3 << std::endl; + + BOOST_TEST(jv3 + == make_vector(1, 'x', 3.3, 777, 777, 1, 'x', 3.3)); + } + + { + typedef joint_view<vector<>, t1_type> jt_type; + vector<> empty; + jt_type jt(empty, t1); + std::cout << jt << std::endl; + BOOST_TEST(jt == make_vector(777)); + } + + { + typedef joint_view<t1_type, vector<> > jt_type; + vector<> empty; + jt_type jt(t1, empty); + std::cout << jt << std::endl; + BOOST_TEST(jt == make_vector(777)); + } + + { + typedef joint_view<vector<>, vector<> > jt_type; + vector<> empty; + jt_type jt(empty, empty); + std::cout << jt << std::endl; + BOOST_TEST(jt == make_vector()); + } + } + + { + typedef map<pair<void,int> > map_type; + map_type m(make_pair<void>(0)); + + typedef set<std::string, float> set_type; + set_type s("foo", 1.3f); + + typedef joint_view<map_type, set_type> joint_view_type; + joint_view_type j(m,s); + + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<joint_view_type, void>::type)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<joint_view_type, std::string>::type)); + BOOST_MPL_ASSERT((boost::fusion::result_of::has_key<joint_view_type, float>::type)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::begin<joint_view_type>::type>::type, void>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<joint_view_type>::type>::type>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::next<boost::fusion::result_of::begin<joint_view_type>::type>::type>::type>::type + , float>)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<joint_view_type>::type>::type, int>)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<joint_view_type>::type>::type>::type, std::string>)); + BOOST_MPL_ASSERT((boost::is_same< + boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::next<boost::fusion::result_of::begin<joint_view_type>::type>::type>::type>::type + , float>)); + + std::cout << deref_data(begin(j)) << std::endl; + std::cout << deref_data(fusion::next(begin(j))) << std::endl; + std::cout << deref_data(fusion::next(fusion::next(begin(j)))) << std::endl; + BOOST_TEST((deref_data(begin(j)) == 0)); + BOOST_TEST((deref_data(fusion::next(begin(j))) == "foo")); + BOOST_TEST((deref_data(fusion::next(fusion::next(begin(j)))) == 1.3f)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_comparison.cpp b/libs/fusion/test/sequence/list_comparison.cpp new file mode 100644 index 000000000..2a02eba01 --- /dev/null +++ b/libs/fusion/test/sequence/list_comparison.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> + +#define FUSION_SEQUENCE list +#include "comparison.hpp" + +int +main() +{ + equality_test(); + ordering_test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/list_construction.cpp b/libs/fusion/test/sequence/list_construction.cpp new file mode 100644 index 000000000..a10b1e1a9 --- /dev/null +++ b/libs/fusion/test/sequence/list_construction.cpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> + +#define FUSION_SEQUENCE list +#include "construction.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/list_copy.cpp b/libs/fusion/test/sequence/list_copy.cpp new file mode 100644 index 000000000..adb588141 --- /dev/null +++ b/libs/fusion/test/sequence/list_copy.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/generation/list_tie.hpp> + +#define FUSION_SEQUENCE list +#include "copy.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_iterator.cpp b/libs/fusion/test/sequence/list_iterator.cpp new file mode 100644 index 000000000..62d670878 --- /dev/null +++ b/libs/fusion/test/sequence/list_iterator.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> + +#define FUSION_SEQUENCE list +#define FUSION_NO_PRIOR +#define FUSION_TRAVERSAL_TAG forward_traversal_tag +#include "./iterator.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/sequence/list_make.cpp b/libs/fusion/test/sequence/list_make.cpp new file mode 100644 index 000000000..296b6063e --- /dev/null +++ b/libs/fusion/test/sequence/list_make.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> + +#define FUSION_SEQUENCE list +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_misc.cpp b/libs/fusion/test/sequence/list_misc.cpp new file mode 100644 index 000000000..28d84854b --- /dev/null +++ b/libs/fusion/test/sequence/list_misc.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/list/convert.hpp> + +#define FUSION_SEQUENCE list +#define FUSION_FORWARD_ONLY +#include "misc.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_mutate.cpp b/libs/fusion/test/sequence/list_mutate.cpp new file mode 100644 index 000000000..b2736679c --- /dev/null +++ b/libs/fusion/test/sequence/list_mutate.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> + +#define FUSION_SEQUENCE list +#include "mutate.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_tie.cpp b/libs/fusion/test/sequence/list_tie.cpp new file mode 100644 index 000000000..30c8ed83d --- /dev/null +++ b/libs/fusion/test/sequence/list_tie.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/list_tie.hpp> +#include <boost/fusion/container/generation/ignore.hpp> +#include <boost/fusion/container/generation/make_list.hpp> + +#define FUSION_SEQUENCE list +#include "tie.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/list_value_at.cpp b/libs/fusion/test/sequence/list_value_at.cpp new file mode 100644 index 000000000..487968dae --- /dev/null +++ b/libs/fusion/test/sequence/list_value_at.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> + +#define FUSION_SEQUENCE list +#include "value_at.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/make.hpp b/libs/fusion/test/sequence/make.hpp new file mode 100644 index 000000000..00eaed2cd --- /dev/null +++ b/libs/fusion/test/sequence/make.hpp @@ -0,0 +1,88 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <string> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +#if !defined(FUSION_MAKE) +#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE) +#endif + +namespace test_detail +{ + // something to prevent warnings for unused variables + template<class T> void dummy(const T&) {} + + class A {}; + class B {}; +} + +void make_tuple_test() {} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + { + FUSION_SEQUENCE<int, char> t1 = FUSION_MAKE(5, 'a'); + BOOST_TEST(FUSION_AT<0>(t1) == 5); + BOOST_TEST(FUSION_AT<1>(t1) == 'a'); + + FUSION_SEQUENCE<int, std::string> t2; + t2 = FUSION_MAKE((short int)2, std::string("Hi")); + BOOST_TEST(FUSION_AT<0>(t2) == 2); + BOOST_TEST(FUSION_AT<1>(t2) == "Hi"); + } + + { // This test was previously disallowed for non-PTS compilers. + A a = A(); B b; + const A ca = a; + FUSION_MAKE(boost::cref(a), b); + FUSION_MAKE(boost::ref(a), b); + FUSION_MAKE(boost::ref(a), boost::cref(b)); + FUSION_MAKE(boost::ref(ca)); + } + + { // the result of make_xxx is assignable: + BOOST_TEST(FUSION_MAKE(2, 4, 6) == + (FUSION_MAKE(1, 2, 3) = FUSION_MAKE(2, 4, 6))); + } + + { // This test was previously disallowed for non-PTS compilers. + FUSION_MAKE("Donald", "Daisy"); // should work; + // std::make_pair("Doesn't","Work"); // fails + } + + { + // You can store a reference to a function in a sequence + FUSION_SEQUENCE<void(&)()> adf(make_tuple_test); + dummy(adf); // avoid warning for unused variable + } + +#if defined(FUSION_TEST_FAIL) + { + // But make_xxx doesn't work + // with function references, since it creates a const + // qualified function type + + FUSION_MAKE(make_tuple_test); + } +#endif + + { + // With function pointers, make_xxx works just fine + FUSION_MAKE(&make_tuple_test); + } +} diff --git a/libs/fusion/test/sequence/make_list.cpp b/libs/fusion/test/sequence/make_list.cpp new file mode 100644 index 000000000..296b6063e --- /dev/null +++ b/libs/fusion/test/sequence/make_list.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> + +#define FUSION_SEQUENCE list +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/make_vector.cpp b/libs/fusion/test/sequence/make_vector.cpp new file mode 100644 index 000000000..8a687354a --- /dev/null +++ b/libs/fusion/test/sequence/make_vector.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> + +#define FUSION_SEQUENCE vector +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/map.cpp b/libs/fusion/test/sequence/map.cpp new file mode 100644 index 000000000..b149d24e6 --- /dev/null +++ b/libs/fusion/test/sequence/map.cpp @@ -0,0 +1,88 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/map/map.hpp> +#include <boost/fusion/container/generation/make_map.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/intrinsic/value_at_key.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/iterator/key_of.hpp> +#include <boost/fusion/iterator/deref_data.hpp> +#include <boost/fusion/iterator/value_of_data.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/support/pair.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/static_assert.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + namespace fusion = boost::fusion; + using boost::fusion::pair; + using boost::fusion::make_pair; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef map< + pair<int, char> + , pair<double, std::string> > + map_type; + + BOOST_MPL_ASSERT((traits::is_associative<map_type>)); + + map_type m( + make_pair<int>('X') + , make_pair<double>("Men")); + + std::cout << at_key<int>(m) << std::endl; + std::cout << at_key<double>(m) << std::endl; + + BOOST_TEST(at_key<int>(m) == 'X'); + BOOST_TEST(at_key<double>(m) == "Men"); + + BOOST_STATIC_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_key<map_type, int>::type, char>::value)); + BOOST_STATIC_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_key<map_type, double>::type, std::string>::value)); + + std::cout << m << std::endl; + + BOOST_STATIC_ASSERT((boost::fusion::result_of::has_key<map_type, int>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::has_key<map_type, double>::value)); + BOOST_STATIC_ASSERT((!boost::fusion::result_of::has_key<map_type, std::string>::value)); + + std::cout << deref_data(begin(m)) << std::endl; + std::cout << deref_data(fusion::next(begin(m))) << std::endl; + + BOOST_TEST(deref_data(begin(m)) == 'X'); + BOOST_TEST(deref_data(fusion::next(begin(m))) == "Men"); + + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::begin<map_type>::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, double>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<map_type>::type>::type, char>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<map_type>::type>::type>::type, std::string>::value)); + } + + { + std::cout << make_map<char, int>('X', 123) << std::endl; + BOOST_TEST(at_key<char>(make_map<char, int>('X', 123)) == 'X'); + BOOST_TEST(at_key<int>(make_map<char, int>('X', 123)) == 123); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/map_tie.cpp b/libs/fusion/test/sequence/map_tie.cpp new file mode 100644 index 000000000..a3547375f --- /dev/null +++ b/libs/fusion/test/sequence/map_tie.cpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/container/generation/map_tie.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> + +struct key_zero; +struct key_one; + +int main() +{ + using namespace boost::fusion; + { + int number = 101; + char letter = 'a'; + BOOST_TEST(at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) == 101); + BOOST_TEST(at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) == 'a'); + + BOOST_TEST(&at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) == &number); + BOOST_TEST(&at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) == &letter); + + at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) = 202; + at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) = 'b'; + + BOOST_TEST(number == 202); + BOOST_TEST(letter == 'b'); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/misc.hpp b/libs/fusion/test/sequence/misc.hpp new file mode 100644 index 000000000..610b107a6 --- /dev/null +++ b/libs/fusion/test/sequence/misc.hpp @@ -0,0 +1,189 @@ +/*============================================================================= + Copyright (C) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/type_traits/is_same.hpp> +#include <string> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +#if !defined(FUSION_SIZE) +#define FUSION_SIZE boost::fusion::result_of::size +#endif + +template <typename S1, typename S2> +struct is_same +{ +}; + +struct test_intrinsics1 +{ + // test at, begin, end, next, prior, advance, size, deref, etc. + + typedef boost::fusion::FUSION_SEQUENCE<int, float, bool, char> sequence; + typedef boost::mpl::begin<sequence>::type first; + typedef boost::mpl::next<first>::type second; + typedef boost::mpl::next<second>::type third; + typedef boost::mpl::next<third>::type fourth; + typedef boost::mpl::end<sequence>::type last; + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<first>::type, int>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<second>::type, float>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<third>::type, bool>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<fourth>::type, char>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::at_c<sequence, 2>::type, bool>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::front<sequence>::type, int>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref< + boost::mpl::advance_c<second, 2>::type>::type, char>::value)); + + BOOST_STATIC_ASSERT((boost::mpl::size<sequence>::value == 4)); + BOOST_STATIC_ASSERT(!(boost::mpl::empty<sequence>::value)); + BOOST_STATIC_ASSERT((boost::mpl::distance<second, fourth>::value == 2)); + +#if !defined(FUSION_FORWARD_ONLY) // list has no back/prev + + typedef boost::mpl::prior<last>::type fourth_; + typedef boost::mpl::prior<fourth_>::type third_; + typedef boost::mpl::prior<third_>::type second_; + typedef boost::mpl::prior<second_>::type first_; + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<first_>::type, int>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<second_>::type, float>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<third_>::type, bool>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::deref<fourth_>::type, char>::value)); + + BOOST_STATIC_ASSERT((boost::is_same< + boost::mpl::back<sequence>::type, char>::value)); + +#endif +}; + +struct test_intrinsics2 +{ + typedef boost::fusion::FUSION_SEQUENCE<> seq0; + +#if !defined(FUSION_FORWARD_ONLY) // list has no back/prev + + typedef boost::fusion::FUSION_SEQUENCE<int> target1; + typedef boost::mpl::push_back<seq0, int>::type seq1; + BOOST_STATIC_ASSERT((boost::mpl::equal<seq1, target1>::value)); + + typedef boost::fusion::FUSION_SEQUENCE<int, double> target2; + typedef boost::mpl::push_back<seq1, double>::type seq2; + BOOST_STATIC_ASSERT((boost::mpl::equal<seq2, target2>::value)); + +#endif + + typedef boost::fusion::FUSION_SEQUENCE<int> target3; + typedef boost::mpl::push_front<seq0, int>::type seq3; + BOOST_STATIC_ASSERT((boost::mpl::equal<seq3, target3>::value)); + + typedef boost::fusion::FUSION_SEQUENCE<double, int> target4; + typedef boost::mpl::push_front<seq3, double>::type seq4; + BOOST_STATIC_ASSERT((boost::mpl::equal<seq4, target4>::value)); +}; + +void +test() +{ + using namespace boost::fusion; + + { // testing const sequences + + const FUSION_SEQUENCE<int, float> t1(5, 3.3f); + BOOST_TEST(FUSION_AT<0>(t1) == 5); + BOOST_TEST(FUSION_AT<1>(t1) == 3.3f); + } + + { // testing at<N> works with MPL integral constants + const FUSION_SEQUENCE<int, char> t1(101, 'z'); + BOOST_TEST(boost::fusion::at<boost::mpl::int_<0> >(t1) == 101); + BOOST_TEST(boost::fusion::at<boost::mpl::int_<1> >(t1) == 'z'); + // explicitly try something other than mpl::int_ + BOOST_TEST((boost::fusion::at<boost::mpl::integral_c<long, 0> >(t1) == 101)); + BOOST_TEST((boost::fusion::at<boost::mpl::integral_c<long, 1> >(t1) == 'z')); + } + + { // testing size & empty + + typedef FUSION_SEQUENCE<int, float, double> t1; + typedef FUSION_SEQUENCE<> t2; + + BOOST_STATIC_ASSERT(FUSION_SIZE<t1>::value == 3); + BOOST_STATIC_ASSERT(FUSION_SIZE<t2>::value == 0); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<t1>::value); + BOOST_STATIC_ASSERT(boost::fusion::result_of::empty<t2>::value); + } + + { // testing front & back + + typedef FUSION_SEQUENCE<int, float, std::string> tup; + tup t(1, 2.2f, "Kimpo"); + + BOOST_TEST(front(t) == 1); +#if !defined(FUSION_FORWARD_ONLY) // list has no back + BOOST_TEST(back(t) == "Kimpo"); +#endif + } + + { // testing is_sequence + + typedef FUSION_SEQUENCE<int, float, double> t1; + typedef FUSION_SEQUENCE<> t2; + typedef FUSION_SEQUENCE<char> t3; + + BOOST_STATIC_ASSERT(traits::is_sequence<t1>::value); + BOOST_STATIC_ASSERT(traits::is_sequence<t2>::value); + BOOST_STATIC_ASSERT(traits::is_sequence<t3>::value); + BOOST_STATIC_ASSERT(!traits::is_sequence<int>::value); + BOOST_STATIC_ASSERT(!traits::is_sequence<char>::value); + } + + { // testing mpl compatibility + + // test begin, end, next, prior, advance, size, deref, etc. + //~ typedef FUSION_SEQUENCE<int, float, bool, char> tuple_type; + //~ test_intrinsics1<tuple_type> test1; + //~ (void)test1; // prevent unused variable warning + + // test an algorithm + typedef FUSION_SEQUENCE<int, float, double> t1; + typedef boost::mpl::find<t1, float>::type iter; + typedef boost::mpl::deref<iter>::type type; + BOOST_STATIC_ASSERT((boost::is_same<type, float>::value)); + + } +} diff --git a/libs/fusion/test/sequence/move.hpp b/libs/fusion/test/sequence/move.hpp new file mode 100644 index 000000000..b96a60e7e --- /dev/null +++ b/libs/fusion/test/sequence/move.hpp @@ -0,0 +1,120 @@ +/*============================================================================= + Copyright (c) 2012 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/config.hpp> + +#if defined(BOOST_NO_RVALUE_REFERENCES) +#error "Valid only on compilers that support rvalues" +#endif + +#include <boost/detail/lightweight_test.hpp> +#include <boost/static_assert.hpp> +#include <boost/assert.hpp> +#include <vector> + + +namespace test_detail +{ + int copies = 0; + + void incr_copy() + { + copies++; + } + + struct x + { + int i; + x() : i(123) {} + + x(x&& rhs) : i(rhs.i) {} + + x& operator=(x&& rhs) + { + i = rhs.i; + return *this; + } + + x(x const& rhs) + { + incr_copy(); + } + + x& operator=(x const& rhs) + { + incr_copy(); + return *this; + } + }; + + typedef std::vector<x> vector_type; + extern bool disable_rvo; // to disable RVO + + vector_type + generate_vec() + { + vector_type v; + v.push_back(x()); + if (disable_rvo) + return v; + return vector_type(); + } + + + template <typename T> + T move_me(T && val) + { + T r(std::move(val)); + if (disable_rvo) + return r; + return T(); + } + + typedef FUSION_SEQUENCE<std::vector<x>> return_type; + + return_type + generate() + { + return_type r(generate_vec()); + if (disable_rvo) + return r; + return return_type(); + } + + typedef FUSION_SEQUENCE<std::vector<x>, x> return_type2; + + return_type2 + generate2() + { + return_type2 r(generate_vec(), x()); + if (disable_rvo) + return r; + return return_type2(); + } +} + +void test() +{ + using namespace boost::fusion; + using namespace test_detail; + + return_type v = move_me(generate()); + BOOST_TEST(copies == 0); + + return_type2 v2 = move_me(generate2()); + BOOST_TEST(copies == 0); + + v2 = move_me(generate2()); + BOOST_TEST(copies == 0); + + std::cout << "Copies: " << copies << std::endl; +} + +namespace test_detail +{ + bool disable_rvo = true; +} + diff --git a/libs/fusion/test/sequence/mutate.hpp b/libs/fusion/test/sequence/mutate.hpp new file mode 100644 index 000000000..9bc9be8ac --- /dev/null +++ b/libs/fusion/test/sequence/mutate.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +namespace test_detail +{ + // no public default constructor + class foo + { + public: + + explicit foo(int v) : val(v) {} + + bool operator==(const foo& other) const + { + return val == other.val; + } + + private: + + foo() {} + int val; + }; +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + FUSION_SEQUENCE<int, float, bool, foo> t1(5, 12.2f, true, foo(4)); + FUSION_AT<0>(t1) = 6; + FUSION_AT<1>(t1) = 2.2f; + FUSION_AT<2>(t1) = false; + FUSION_AT<3>(t1) = foo(5); + + BOOST_TEST(FUSION_AT<0>(t1) == 6); + BOOST_TEST(FUSION_AT<1>(t1) > 2.1f && FUSION_AT<1>(t1) < 2.3f); + BOOST_TEST(FUSION_AT<2>(t1) == false); + BOOST_TEST(FUSION_AT<3>(t1) == foo(5)); +} diff --git a/libs/fusion/test/sequence/nview.cpp b/libs/fusion/test/sequence/nview.cpp new file mode 100644 index 000000000..dab982a52 --- /dev/null +++ b/libs/fusion/test/sequence/nview.cpp @@ -0,0 +1,139 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> + +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/struct.hpp> +#include <boost/fusion/include/equal_to.hpp> +#include <boost/fusion/include/io.hpp> +#include <boost/fusion/include/nview.hpp> + +#include <string> +#include <iostream> + +struct test { + int int_; + std::string string_; + double double_; +}; + +BOOST_FUSION_ADAPT_STRUCT( + test, + (int, int_) + (std::string, string_) + (double, double_) +) + +namespace fusion = boost::fusion; + +template <typename Sequence> +bool check_size(Sequence const& s, int seqsize) +{ + return fusion::size(s) == seqsize; +} + +template <typename Sequence, typename T> +bool check_deref_begin(Sequence const& s, T val) +{ + return fusion::deref(fusion::begin(s)) == val; +} + +template <typename Sequence, typename T> +bool check_deref_next(Sequence const& s, T val) +{ + return fusion::deref(fusion::next(fusion::begin(s))) == val; +} + +template <int N, typename Sequence, typename T> +bool check_deref_advance(Sequence const& s, T val) +{ + return fusion::deref(fusion::advance_c<N>(fusion::begin(s))) == val; +} + +template <typename Sequence, typename T> +bool check_deref_prior(Sequence const& s, T val) +{ + return fusion::deref(fusion::prior(fusion::end(s))) == val; +} + +template <int N, typename Sequence, typename T> +bool check_at(Sequence const& s, T val) +{ + return fusion::at_c<N>(s) == val; +} + +template <typename Sequence> +bool check_distance(Sequence const& s, int val) +{ + return fusion::distance(fusion::begin(s), fusion::end(s)) == val; +} + +int main() +{ + test t; + t.int_ = 1; + t.string_ = "test"; + t.double_ = 2.0; + + using fusion::as_nview; + + // check size() + { + BOOST_TEST(check_size(as_nview<0>(t), 1)); + BOOST_TEST(check_size(as_nview<2, 1>(t), 2)); + BOOST_TEST(check_size(as_nview<2, 1, 0>(t), 3)); + BOOST_TEST(check_size(as_nview<2, 1, 0, 2, 0>(t), 5)); + } + + // check deref/begin + { + BOOST_TEST(check_deref_begin(as_nview<0>(t), 1)); + BOOST_TEST(check_deref_begin(as_nview<2, 1>(t), 2.0)); + BOOST_TEST(check_deref_begin(as_nview<1, 2, 0>(t), "test")); + BOOST_TEST(check_deref_begin(as_nview<2, 1, 0, 2, 0>(t), 2.0)); + } + + // check deref/next + { + BOOST_TEST(check_deref_next(as_nview<2, 1>(t), "test")); + BOOST_TEST(check_deref_next(as_nview<1, 2, 0>(t), 2.0)); + BOOST_TEST(check_deref_next(as_nview<2, 0, 1, 2, 0>(t), 1)); + } + + // check deref/advance + { + BOOST_TEST(check_deref_advance<0>(as_nview<2, 1>(t), 2.0)); + BOOST_TEST(check_deref_advance<2>(as_nview<1, 2, 0>(t), 1)); + BOOST_TEST(check_deref_advance<4>(as_nview<2, 0, 1, 2, 0>(t), 1)); + } + + // check deref/prior + { + BOOST_TEST(check_deref_prior(as_nview<2, 1>(t), "test")); + BOOST_TEST(check_deref_prior(as_nview<1, 2, 0>(t), 1)); + BOOST_TEST(check_deref_prior(as_nview<2, 0, 1, 2, 0>(t), 1)); + } + + // check at + { + BOOST_TEST(check_at<0>(as_nview<0>(t), 1)); + BOOST_TEST(check_at<1>(as_nview<2, 1>(t), "test")); + BOOST_TEST(check_at<2>(as_nview<1, 2, 0>(t), 1)); + BOOST_TEST(check_at<4>(as_nview<2, 1, 0, 2, 0>(t), 1)); + } + + // check distance + { + BOOST_TEST(check_distance(as_nview<0>(t), 1)); + BOOST_TEST(check_distance(as_nview<2, 1>(t), 2)); + BOOST_TEST(check_distance(as_nview<1, 2, 0>(t), 3)); + BOOST_TEST(check_distance(as_nview<2, 1, 0, 2, 0>(t), 5)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/repetitive_view.cpp b/libs/fusion/test/sequence/repetitive_view.cpp new file mode 100644 index 000000000..54da37bc8 --- /dev/null +++ b/libs/fusion/test/sequence/repetitive_view.cpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + + Use modification and distribution are 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). +==============================================================================*/ + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/view/repetitive_view.hpp> + +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/view/joint_view.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> + +#include <boost/type_traits/is_same.hpp> + +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/iterator/next.hpp> + +#include <boost/fusion/functional/generation/make_fused_procedure.hpp> + +struct check_equal +{ + template<typename LHS, typename RHS> + void operator()(LHS const& lhs, RHS const& rhs) const + { + BOOST_TEST(( boost::is_same<LHS,RHS>::value )); + BOOST_TEST(( lhs == rhs )); + } +}; + +int main() +{ + using namespace boost::fusion; + + typedef boost::fusion::vector<int,long,float,double> seq_t; + seq_t seq(1,2l,3.0f,4.0); + + typedef repetitive_view<seq_t> view_t; + view_t view(seq); + + typedef joint_view<seq_t,seq_t> seq_twice_t; + typedef joint_view<seq_t,seq_twice_t> seq_repeated_t; + seq_twice_t seq_twice(seq,seq); + seq_repeated_t seq_repeated(seq,seq_twice); + + for_each(zip(view,seq_repeated), make_fused_procedure(check_equal())); + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/reverse_view.cpp b/libs/fusion/test/sequence/reverse_view.cpp new file mode 100644 index 000000000..36bda96c5 --- /dev/null +++ b/libs/fusion/test/sequence/reverse_view.cpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/view/reverse_view/reverse_view.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/distance.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/type_traits/is_same.hpp> + + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing the reverse_view + + { + typedef boost::mpl::range_c<int, 5, 9> mpl_list1; + mpl_list1 l; + reverse_view<mpl_list1> rev(l); + + std::cout << rev << std::endl; + BOOST_TEST((rev == make_vector(8, 7, 6, 5))); + } + + { + char const* s = "Hi Kim"; + typedef vector<int, char, long, char const*> vector_type; + vector_type t(123, 'x', 123456789, s); + typedef reverse_view<vector_type> view_type; + view_type rev(t); + + std::cout << rev << std::endl; + BOOST_TEST((rev == make_vector(s, 123456789, 'x', 123))); + + typedef boost::fusion::result_of::begin<view_type>::type first_type; + first_type first_it(begin(rev)); + typedef boost::fusion::result_of::next<first_type>::type second_type; + second_type second_it(next(first_it)); + BOOST_TEST((*second_it == 123456789)); + BOOST_TEST((*prior(second_it) == s)); + BOOST_TEST((*advance_c<2>(first_it) == 'x')); + BOOST_TEST((distance(first_it, second_it) == 1)); + + BOOST_TEST((at_c<0>(rev)==s)); + BOOST_TEST((at_c<1>(rev)==123456789)); + BOOST_TEST((at_c<2>(rev)=='x')); + BOOST_TEST((at_c<3>(rev)==123)); + + BOOST_MPL_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_c<view_type,0>::type,char const*> + )); + BOOST_MPL_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_c<view_type,1>::type,long> + )); + BOOST_MPL_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_c<view_type,2>::type,char> + )); + BOOST_MPL_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_c<view_type,3>::type,int> + )); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/segmented_iterator_range.cpp b/libs/fusion/test/sequence/segmented_iterator_range.cpp new file mode 100644 index 000000000..df49407a6 --- /dev/null +++ b/libs/fusion/test/sequence/segmented_iterator_range.cpp @@ -0,0 +1,146 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <sstream> +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/fusion/algorithm/query/find_if.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/view/iterator_range/iterator_range.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/begin.hpp> +#include <boost/mpl/next.hpp> +#include <boost/static_assert.hpp> +#include "tree.hpp" + +struct ostream_fun +{ + ostream_fun(std::ostream &sout) + : sout_(sout) + {} + template<typename T> + void operator ()(T const &t) const + { + sout_ << t << ' '; + } +private: + std::ostream & sout_; +}; + +template<typename Tree> +void +process_tree(Tree const &tree) +{ + using namespace boost; + using namespace fusion; + using mpl::_; + + typedef typename boost::fusion::result_of::find_if<Tree const, is_same<_,short> >::type short_iter; + typedef typename boost::fusion::result_of::find_if<Tree const, is_same<_,float> >::type float_iter; + + typedef iterator_range<short_iter, float_iter> slice_t; + BOOST_STATIC_ASSERT(traits::is_segmented<slice_t>::value); + + // find_if of a segmented data structure returns generic + // segmented iterators + short_iter si = find_if<is_same<_,short> >(tree); + float_iter fi = find_if<is_same<_,float> >(tree); + + // If you put them in an iterator range, the range + // is automatically a segmented data structure. + slice_t slice(si, fi); + + std::stringstream sout; + fusion::for_each(slice, ostream_fun(sout)); + BOOST_TEST((sout.str() == "100 e f 0 B ")); +} + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + char const* s = "Ruby"; + typedef vector<int, char, double, char const*> vector_type; + vector_type vec(1, 'x', 3.3, s); + + { + typedef vector_iterator<vector_type, 1> i1t; + typedef vector_iterator<vector_type, 3> i3t; + + i1t i1(vec); + i3t i3(vec); + + typedef iterator_range<i1t, i3t> slice_t; + slice_t slice(i1, i3); + std::cout << slice << std::endl; + BOOST_TEST((slice == make_vector('x', 3.3))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 2); + } + + { + typedef vector_iterator<vector_type, 0> i1t; + typedef vector_iterator<vector_type, 0> i3t; + + i1t i1(vec); + i3t i3(vec); + + typedef iterator_range<i1t, i3t> slice_t; + slice_t slice(i1, i3); + std::cout << slice << std::endl; + BOOST_TEST(slice == make_vector()); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 0); + } + } + + { + typedef boost::mpl::vector_c<int, 2, 3, 4, 5, 6> mpl_vec; + typedef boost::mpl::begin<mpl_vec>::type it0; + typedef boost::mpl::next<it0>::type it1; + typedef boost::mpl::next<it1>::type it2; + typedef boost::mpl::next<it2>::type it3; + + it1 f; + it3 l; + + typedef iterator_range<it1, it3> slice_t; + slice_t slice(f, l); + std::cout << slice << std::endl; + BOOST_TEST((slice == make_vector(3, 4))); + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<slice_t>::value == 2); + } + + { + process_tree( + make_tree( + make_vector(double(0),'B') + , make_tree( + make_vector(1,2,long(3)) + , make_tree(make_vector('a','b','c')) + , make_tree(make_vector(short('d'),'e','f')) + ) + , make_tree( + make_vector(4,5,6) + , make_tree(make_vector(float(1),'h','i')) + , make_tree(make_vector('j','k','l')) + ) + ) + ); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/set.cpp b/libs/fusion/test/sequence/set.cpp new file mode 100644 index 000000000..1ea6ba241 --- /dev/null +++ b/libs/fusion/test/sequence/set.cpp @@ -0,0 +1,83 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/set/set.hpp> +#include <boost/fusion/container/generation/make_set.hpp> +#include <boost/fusion/sequence/intrinsic/at_key.hpp> +#include <boost/fusion/sequence/intrinsic/value_at_key.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/iterator/key_of.hpp> +#include <boost/fusion/iterator/deref_data.hpp> +#include <boost/fusion/iterator/value_of_data.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/support/pair.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/static_assert.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + namespace fusion = boost::fusion; + using boost::fusion::pair; + using boost::fusion::make_pair; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef set<int, std::string> set_type; + + BOOST_MPL_ASSERT((traits::is_associative<set_type>)); + + set_type m(123, "Hola"); + + std::cout << at_key<int>(m) << std::endl; + std::cout << at_key<std::string>(m) << std::endl; + + BOOST_TEST(at_key<int>(m) == 123); + BOOST_TEST(at_key<std::string>(m) == "Hola"); + + BOOST_STATIC_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_key<set_type, int>::type, int>::value)); + BOOST_STATIC_ASSERT(( + boost::is_same<boost::fusion::result_of::value_at_key<set_type, std::string>::type, std::string>::value)); + + std::cout << m << std::endl; + + BOOST_STATIC_ASSERT((boost::fusion::result_of::has_key<set_type, int>::value)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::has_key<set_type, std::string>::value)); + BOOST_STATIC_ASSERT((!boost::fusion::result_of::has_key<set_type, double>::value)); + + std::cout << deref_data(begin(m)) << std::endl; + std::cout << deref_data(fusion::next(begin(m))) << std::endl; + + BOOST_TEST(deref_data(begin(m)) == 123); + BOOST_TEST(deref_data(fusion::next(begin(m))) == "Hola"); + + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::begin<set_type>::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::key_of<boost::fusion::result_of::next<boost::fusion::result_of::begin<set_type>::type>::type>::type, std::string>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::begin<set_type>::type>::type, int>::value)); + BOOST_STATIC_ASSERT((boost::is_same<boost::fusion::result_of::value_of_data<boost::fusion::result_of::next<boost::fusion::result_of::begin<set_type>::type>::type>::type, std::string>::value)); + } + + { + std::cout << make_set('X', 123) << std::endl; + BOOST_TEST(at_key<char>(make_set('X', 123)) == 'X'); + BOOST_TEST(at_key<int>(make_set('X', 123)) == 123); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/single_view.cpp b/libs/fusion/test/sequence/single_view.cpp new file mode 100644 index 000000000..6fa517551 --- /dev/null +++ b/libs/fusion/test/sequence/single_view.cpp @@ -0,0 +1,93 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Eric Niebler + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/view/single_view/single_view.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/end.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/distance.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> + +struct X {}; + +template <typename OS> +OS& operator<<(OS& os, X const&) +{ + os << "<X-object>"; + return os; +} + +void foo() {} + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + single_view<int> view1(3); + std::cout << view1 << std::endl; + +#ifdef FUSION_TEST_FAIL + // single_view is immutable + *begin(view1) += 4; +#endif + std::cout << view1 << std::endl; + BOOST_TEST(*begin(view1) == 3); + BOOST_TEST(at<boost::mpl::int_<0> >(view1) == 3); + BOOST_TEST(view1.val == 3); + BOOST_TEST(3 == front(view1)); + BOOST_TEST(3 == back(view1)); + BOOST_TEST(!empty(view1)); + BOOST_TEST(next(begin(view1)) == end(view1)); + BOOST_TEST(prior(end(view1)) == begin(view1)); + BOOST_TEST(!(next(begin(view1)) != end(view1))); + BOOST_TEST(!(prior(end(view1)) != begin(view1))); + BOOST_TEST(1 == distance(begin(view1), end(view1))); + BOOST_TEST(0 == distance(end(view1), end(view1))); + BOOST_TEST(0 == distance(begin(view1), begin(view1))); + BOOST_TEST(end(view1) == advance<boost::mpl::int_<1> >(begin(view1))); + BOOST_TEST(begin(view1) == advance<boost::mpl::int_<0> >(begin(view1))); + BOOST_TEST(end(view1) == advance<boost::mpl::int_<0> >(end(view1))); + BOOST_TEST(begin(view1) == advance<boost::mpl::int_<-1> >(end(view1))); + BOOST_TEST(end(view1) == advance_c<1>(begin(view1))); + BOOST_TEST(begin(view1) == advance_c<0>(begin(view1))); + BOOST_TEST(end(view1) == advance_c<0>(end(view1))); + BOOST_TEST(begin(view1) == advance_c<-1>(end(view1))); + BOOST_TEST(1 == size(view1)); + BOOST_MPL_ASSERT((boost::is_same<int, boost::fusion::result_of::value_at<single_view<int>, boost::mpl::int_<0> >::type>)); + + single_view<X> view2; + std::cout << view2 << std::endl; + } + + { + std::cout << make_single_view(1) << std::endl; + std::cout << make_single_view("Hello, World") << std::endl; + std::cout << make_single_view(&foo) << std::endl; + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/std_pair.cpp b/libs/fusion/test/sequence/std_pair.cpp new file mode 100644 index 000000000..19f8e2a33 --- /dev/null +++ b/libs/fusion/test/sequence/std_pair.cpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/adapted/std_pair.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/empty.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/sequence/comparison/not_equal_to.hpp> +#include <boost/fusion/sequence/comparison/less.hpp> +#include <boost/fusion/sequence/comparison/less_equal.hpp> +#include <boost/fusion/sequence/comparison/greater.hpp> +#include <boost/fusion/sequence/comparison/greater_equal.hpp> +#include <boost/fusion/mpl.hpp> +#include <boost/fusion/support/is_view.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/assert.hpp> +#include <iostream> +#include <string> +#include <utility> + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef std::pair<int, std::string> pair_type; + BOOST_MPL_ASSERT_NOT((traits::is_view<pair_type>)); + pair_type p(123, "Hola!!!"); + + std::cout << at_c<0>(p) << std::endl; + std::cout << at_c<1>(p) << std::endl; + std::cout << p << std::endl; + BOOST_TEST(p == make_vector(123, "Hola!!!")); + + at_c<0>(p) = 6; + at_c<1>(p) = "mama mia"; + BOOST_TEST(p == make_vector(6, "mama mia")); + + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<pair_type>::value == 2); + BOOST_STATIC_ASSERT(!boost::fusion::result_of::empty<pair_type>::value); + + BOOST_TEST(front(p) == 6); + BOOST_TEST(back(p) == "mama mia"); + } + + { + fusion::vector<int, float> v1(4, 3.3f); + std::pair<short, float> v2(5, 3.3f); + fusion::vector<long, double> v3(5, 4.4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from pair to vector + fusion::vector<int, std::string> v(std::make_pair(123, "Hola!!!")); + v = std::make_pair(123, "Hola!!!"); + } + + { + // conversion from pair to list + fusion::list<int, std::string> l(std::make_pair(123, "Hola!!!")); + l = std::make_pair(123, "Hola!!!"); + } + + { + typedef std::pair<int, std::string> pair_type; + BOOST_MPL_ASSERT((mpl::is_sequence<pair_type>)); + BOOST_MPL_ASSERT((boost::is_same<int, mpl::front<pair_type>::type>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/std_tuple_iterator.cpp b/libs/fusion/test/sequence/std_tuple_iterator.cpp new file mode 100644 index 000000000..1592eef5f --- /dev/null +++ b/libs/fusion/test/sequence/std_tuple_iterator.cpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/config.hpp> + +// The std_tuple_iterator adaptor only supports implementations +// using variadic templates +#if !defined(BOOST_NO_VARIADIC_TEMPLATES) + +#include <boost/fusion/adapted/std_tuple.hpp> + +#define FUSION_SEQUENCE std::tuple +#define FUSION_TRAVERSAL_TAG random_access_traversal_tag +#include "./iterator.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + +#else + +int +main() +{ + return 0; +} + +#endif + diff --git a/libs/fusion/test/sequence/swap.cpp b/libs/fusion/test/sequence/swap.cpp new file mode 100644 index 000000000..cac832b4b --- /dev/null +++ b/libs/fusion/test/sequence/swap.cpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/fusion/sequence/intrinsic/swap.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/detail/lightweight_test.hpp> + +#include <boost/mpl/assert.hpp> + +#include <boost/type_traits/is_same.hpp> + +#include <vector> + +int main() +{ + namespace fusion = boost::fusion; + { + typedef fusion::vector<std::vector<int>, char> test_vector; + BOOST_MPL_ASSERT((boost::is_same<void, boost::fusion::result_of::swap<test_vector, test_vector>::type>)); + + test_vector v1(std::vector<int>(1, 101), 'a'), v2(std::vector<int>(1, 202), 'b'); + + fusion::swap(v1, v2); + + BOOST_TEST(v1 == fusion::make_vector(std::vector<int>(1, 202), 'b')); + BOOST_TEST(v2 == fusion::make_vector(std::vector<int>(1, 101), 'a')); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/test_deduce_sequence.cpp b/libs/fusion/test/sequence/test_deduce_sequence.cpp new file mode 100644 index 000000000..d137cd307 --- /dev/null +++ b/libs/fusion/test/sequence/test_deduce_sequence.cpp @@ -0,0 +1,16 @@ + +#include <boost/mpl/vector.hpp> +#include <boost/fusion/support.hpp> + +typedef boost::fusion::traits::deduce_sequence < + +boost::mpl::vector<int, char> + +>::type seq1_t; + + +typedef boost::fusion::traits::deduce_sequence < + +boost::fusion::vector<int, char> + +>::type seq2_t; diff --git a/libs/fusion/test/sequence/tie.hpp b/libs/fusion/test/sequence/tie.hpp new file mode 100644 index 000000000..536af1e95 --- /dev/null +++ b/libs/fusion/test/sequence/tie.hpp @@ -0,0 +1,85 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +#if !defined(FUSION_MAKE) +#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE) +#endif + +#if !defined(FUSION_TIE) +#define FUSION_TIE BOOST_PP_CAT(FUSION_SEQUENCE, _tie) +#endif + +namespace test_detail +{ + // something to prevent warnings for unused variables + template<class T> void dummy(const T&) {} + + // no public default constructor + class foo + { + public: + + explicit foo(int v) : val(v) {} + + bool operator==(const foo& other) const + { + return val == other.val; + } + + private: + + foo() {} + int val; + }; +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + int a; + char b; + foo c(5); + + FUSION_TIE(a, b, c) = FUSION_MAKE(2, 'a', foo(3)); + BOOST_TEST(a == 2); + BOOST_TEST(b == 'a'); + BOOST_TEST(c == foo(3)); + + FUSION_TIE(a, ignore, c) = FUSION_MAKE((short int)5, false, foo(5)); + BOOST_TEST(a == 5); + BOOST_TEST(b == 'a'); + BOOST_TEST(c == foo(5)); + + int i, j; + FUSION_TIE(i, j) = FUSION_MAKE(1, 2); + BOOST_TEST(i == 1 && j == 2); + + FUSION_SEQUENCE<int, int, float> ta; + +#if defined(FUSION_TEST_FAIL) + ta = std::FUSION_MAKE(1, 2); // should fail, tuple is of length 3, not 2 +#endif + + dummy(ta); + + // ties cannot be rebound + int d = 3; + FUSION_SEQUENCE<int&> ti(a); + BOOST_TEST(&FUSION_AT<0>(ti) == &a); + ti = FUSION_SEQUENCE<int&>(d); + BOOST_TEST(&FUSION_AT<0>(ti) == &a); +} diff --git a/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp b/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp new file mode 100644 index 000000000..010d4c710 --- /dev/null +++ b/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp @@ -0,0 +1,56 @@ +#include <boost/tr1/memory.hpp> +#include <boost/tr1/tuple.hpp> +#include <boost/any.hpp> +#include <iostream> + +namespace Core +{ + class AutoConverter + { + std::tr1::shared_ptr<boost::any> t_; + + public: + AutoConverter(std::tr1::shared_ptr<boost::any> const & t) + : t_(t) + {} + + template <typename C> + operator C () + { + try + { + boost::any & a = (*t_); + + return boost::any_cast<C>(a); + } + catch(boost::bad_any_cast & e) + { + std::cerr << "Internal conversion bug: " + << "Failed to convert data holder to " + << typeid(C).name() << "\n" + << e.what() + << std::endl; + + C c = C(); + return c; + } + } + }; + + + inline AutoConverter Demo() + { + std::tr1::shared_ptr<boost::any> p_result + (new boost::any(std::tr1::make_tuple(1, 2, 3, 4))); + return p_result; + } + +} // namespace Core + + +int main() +{ + std::tr1::tuple<int, int, int, int> test = Core::Demo(); + return 0; +} + diff --git a/libs/fusion/test/sequence/transform_view.cpp b/libs/fusion/test/sequence/transform_view.cpp new file mode 100644 index 000000000..b9e3f9432 --- /dev/null +++ b/libs/fusion/test/sequence/transform_view.cpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/io/out.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/view/transform_view/transform_view.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/distance.hpp> + +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> + +struct square +{ + template<typename T> + struct result; + + template <typename T> + struct result<square(T)> + { + typedef int type; + }; + + template <typename T> + int operator()(T x) const + { + return x * x; + } +}; + +struct add +{ + template<typename T> + struct result; + + template <typename A, typename B> + struct result<add(A,B)> + { + typedef int type; + }; + + template <typename A, typename B> + int operator()(A a, B b) const + { + return a + b; + } +}; + +int +main() +{ + using namespace boost::fusion; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + +/// Testing the transform_view + + { + typedef boost::mpl::range_c<int, 5, 9> sequence_type; + sequence_type sequence; + square sq; + typedef transform_view<sequence_type, square> xform_type; + xform_type xform(sequence, sq); + + std::cout << xform << std::endl; + BOOST_TEST((xform == make_vector(25, 36, 49, 64))); + + typedef boost::fusion::result_of::begin<xform_type>::type first_type; + first_type first_it(boost::fusion::begin(xform)); + + typedef boost::fusion::result_of::next<first_type>::type next_type; + next_type next_it(boost::fusion::next(first_it)); + BOOST_TEST((*next_it == 36)); + BOOST_TEST((*boost::fusion::prior(next_it) == 25)); + BOOST_TEST((boost::fusion::distance(first_it, next_it) == 1)); + + BOOST_TEST((*boost::fusion::advance_c<3>(boost::fusion::begin(xform)) == 64)); + BOOST_TEST((boost::fusion::at_c<2>(xform) == 49)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<xform_type, 0>::type, int>)); + } + + { + typedef boost::mpl::range_c<int, 5, 9> sequence1_type; + typedef boost::mpl::range_c<int, 10, 14> sequence2_type; + sequence1_type sequence1; + sequence2_type sequence2; + add f; + typedef transform_view<sequence1_type, sequence2_type, add> xform_type; + xform_type xform(sequence1, sequence2, f); + + std::cout << xform << std::endl; + BOOST_TEST((xform == make_vector(15, 17, 19, 21))); + BOOST_TEST((boost::fusion::at_c<2>(xform) == 19)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<xform_type, 0>::type, int>)); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tree.hpp b/libs/fusion/test/sequence/tree.hpp new file mode 100644 index 000000000..a345a8f1d --- /dev/null +++ b/libs/fusion/test/sequence/tree.hpp @@ -0,0 +1,100 @@ +/*============================================================================= + Copyright (c) 2006 Eric Niebler + + Use, modification and distribution is 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) +==============================================================================*/ +#ifndef FUSION_BINARY_TREE_EAN_05032006_1027 +#define FUSION_BINARY_TREE_EAN_05032006_1027 + +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/view/single_view.hpp> +#include <boost/fusion/container/list/cons.hpp> // for nil +#include <boost/fusion/container/vector/vector10.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/support/is_segmented.hpp> +#include <boost/fusion/sequence/intrinsic/segments.hpp> + +namespace boost { namespace fusion +{ + struct tree_tag; + + template <typename Data, typename Left = nil, typename Right = nil> + struct tree + : sequence_base<tree<Data, Left, Right> > + { + typedef Data data_type; + typedef Left left_type; + typedef Right right_type; + typedef tree_tag fusion_tag; + typedef forward_traversal_tag category; + typedef mpl::false_ is_view; + + typedef typename mpl::if_< + traits::is_sequence<Data> + , Data + , single_view<Data> + >::type data_view; + + explicit tree( + typename fusion::detail::call_param<Data>::type data_ + , typename fusion::detail::call_param<Left>::type left_ = Left() + , typename fusion::detail::call_param<Right>::type right_ = Right() + ) + : segments(left_, data_view(data_), right_) + {} + + typedef vector3<Left, data_view, Right> segments_type; + segments_type segments; + }; + + template <typename Data> + tree<Data> make_tree(Data const &data) + { + return tree<Data>(data); + } + + template <typename Data, typename Left, typename Right> + tree<Data, Left, Right> make_tree(Data const &data, Left const &left, Right const &right) + { + return tree<Data, Left, Right>(data, left, right); + } + + namespace extension + { + template <> + struct is_segmented_impl<tree_tag> + { + template <typename Sequence> + struct apply : mpl::true_ {}; + }; + + template <> + struct segments_impl<tree_tag> + { + template <typename Sequence> + struct apply + { + typedef typename mpl::if_< + is_const<Sequence> + , typename Sequence::segments_type const & + , typename Sequence::segments_type & + >::type type; + + static type call(Sequence &seq) + { + return seq.segments; + } + }; + }; + } +}} + +#endif diff --git a/libs/fusion/test/sequence/tuple_comparison.cpp b/libs/fusion/test/sequence/tuple_comparison.cpp new file mode 100644 index 000000000..2b4433068 --- /dev/null +++ b/libs/fusion/test/sequence/tuple_comparison.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple/tuple.hpp> +#include <boost/fusion/adapted/mpl.hpp> + +#define FUSION_SEQUENCE tuple +#include "comparison.hpp" + +int +main() +{ + equality_test(); + ordering_test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/tuple_construction.cpp b/libs/fusion/test/sequence/tuple_construction.cpp new file mode 100644 index 000000000..044701c40 --- /dev/null +++ b/libs/fusion/test/sequence/tuple_construction.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple/tuple.hpp> +#include <boost/fusion/adapted/mpl.hpp> + +#define NO_CONSTRUCT_FROM_NIL +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#include "construction.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/tuple_copy.cpp b/libs/fusion/test/sequence/tuple_copy.cpp new file mode 100644 index 000000000..c41117e7a --- /dev/null +++ b/libs/fusion/test/sequence/tuple_copy.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> + +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#define FUSION_MAKE make_tuple +#define FUSION_TIE tie +#include "copy.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tuple_element.cpp b/libs/fusion/test/sequence/tuple_element.cpp new file mode 100644 index 000000000..0932e627e --- /dev/null +++ b/libs/fusion/test/sequence/tuple_element.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> + +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#define FUSION_VALUE_AT(S, N) tuple_element<N, S> +#include "value_at.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tuple_make.cpp b/libs/fusion/test/sequence/tuple_make.cpp new file mode 100644 index 000000000..806a7f290 --- /dev/null +++ b/libs/fusion/test/sequence/tuple_make.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> + +#define FUSION_SEQUENCE boost::fusion::tuple +#define FUSION_AT get +#define FUSION_MAKE boost::fusion::make_tuple +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tuple_misc.cpp b/libs/fusion/test/sequence/tuple_misc.cpp new file mode 100644 index 000000000..473efb61c --- /dev/null +++ b/libs/fusion/test/sequence/tuple_misc.cpp @@ -0,0 +1,23 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/adapted/mpl.hpp> + +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#define FUSION_SIZE tuple_size +#include "misc.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tuple_mutate.cpp b/libs/fusion/test/sequence/tuple_mutate.cpp new file mode 100644 index 000000000..b6e72a610 --- /dev/null +++ b/libs/fusion/test/sequence/tuple_mutate.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> + +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#include "mutate.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/tuple_tie.cpp b/libs/fusion/test/sequence/tuple_tie.cpp new file mode 100644 index 000000000..2d5ec24f6 --- /dev/null +++ b/libs/fusion/test/sequence/tuple_tie.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/tuple.hpp> + +#define FUSION_SEQUENCE tuple +#define FUSION_AT get +#define FUSION_MAKE make_tuple +#define FUSION_TIE tie +#include "tie.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/value_at.hpp b/libs/fusion/test/sequence/value_at.hpp new file mode 100644 index 000000000..9fe3a1982 --- /dev/null +++ b/libs/fusion/test/sequence/value_at.hpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/static_assert.hpp> +#include <iostream> + +#if !defined(FUSION_AT) +#define FUSION_AT at_c +#endif + +#if !defined(FUSION_VALUE_AT) +#define FUSION_VALUE_AT(S, N) boost::fusion::result_of::value_at_c<S, N> +#endif + +namespace test_detail +{ + // something to prevent warnings for unused variables + template<class T> void dummy(const T&) {} + + class A {}; +} + +void +test() +{ + using namespace boost::fusion; + using namespace test_detail; + + double d = 2.7; + A a; + FUSION_SEQUENCE<int, double&, const A&, int> t(1, d, a, 2); + const FUSION_SEQUENCE<int, double&, const A, int> ct(t); + + int i = FUSION_AT<0>(t); + int i2 = FUSION_AT<3>(t); + + BOOST_TEST(i == 1 && i2 == 2); + + int j = FUSION_AT<0>(ct); + BOOST_TEST(j == 1); + + FUSION_AT<0>(t) = 5; + BOOST_TEST(FUSION_AT<0>(t) == 5); + +#if defined(FUSION_TEST_FAIL) + FUSION_AT<0>(ct) = 5; // can't assign to const +#endif + + double e = FUSION_AT<1>(t); + BOOST_TEST(e > 2.69 && e < 2.71); + + FUSION_AT<1>(t) = 3.14+i; + BOOST_TEST(FUSION_AT<1>(t) > 4.13 && FUSION_AT<1>(t) < 4.15); + +#if defined(FUSION_TEST_FAIL) + FUSION_AT<4>(t) = A(); // can't assign to const + dummy(FUSION_AT<5>(ct)); // illegal index +#endif + + ++FUSION_AT<0>(t); + BOOST_TEST(FUSION_AT<0>(t) == 6); + + typedef FUSION_SEQUENCE<int, float> seq_type; + + BOOST_STATIC_ASSERT(!( + boost::is_const<FUSION_VALUE_AT(seq_type, 0)::type>::value)); + + // constness should not affect + BOOST_STATIC_ASSERT(!( + boost::is_const<FUSION_VALUE_AT(const seq_type, 0)::type>::value)); + + BOOST_STATIC_ASSERT(!( + boost::is_const<FUSION_VALUE_AT(seq_type, 1)::type>::value)); + + // constness should not affect + BOOST_STATIC_ASSERT(!( + boost::is_const<FUSION_VALUE_AT(const seq_type, 1)::type>::value)); + + dummy(i); dummy(i2); dummy(j); dummy(e); // avoid warns for unused variables +} diff --git a/libs/fusion/test/sequence/vector_comparison.cpp b/libs/fusion/test/sequence/vector_comparison.cpp new file mode 100644 index 000000000..c23db8336 --- /dev/null +++ b/libs/fusion/test/sequence/vector_comparison.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> + +#define FUSION_SEQUENCE vector +#include "comparison.hpp" + +int +main() +{ + equality_test(); + ordering_test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/vector_construction.cpp b/libs/fusion/test/sequence/vector_construction.cpp new file mode 100644 index 000000000..8af5bc042 --- /dev/null +++ b/libs/fusion/test/sequence/vector_construction.cpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> + +#define FUSION_SEQUENCE vector +#include "construction.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/vector_copy.cpp b/libs/fusion/test/sequence/vector_copy.cpp new file mode 100644 index 000000000..d21f5c9cb --- /dev/null +++ b/libs/fusion/test/sequence/vector_copy.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/vector_tie.hpp> + +#define FUSION_SEQUENCE vector +#include "copy.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_iterator.cpp b/libs/fusion/test/sequence/vector_iterator.cpp new file mode 100644 index 000000000..4d4b6b39a --- /dev/null +++ b/libs/fusion/test/sequence/vector_iterator.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/vector/vector_iterator.hpp> + +#define FUSION_SEQUENCE vector +#define FUSION_TRAVERSAL_TAG random_access_traversal_tag +#include "./iterator.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + + + diff --git a/libs/fusion/test/sequence/vector_make.cpp b/libs/fusion/test/sequence/vector_make.cpp new file mode 100644 index 000000000..8a687354a --- /dev/null +++ b/libs/fusion/test/sequence/vector_make.cpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> + +#define FUSION_SEQUENCE vector +#include "make.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_misc.cpp b/libs/fusion/test/sequence/vector_misc.cpp new file mode 100644 index 000000000..e2b273967 --- /dev/null +++ b/libs/fusion/test/sequence/vector_misc.cpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/adapted/mpl.hpp> + +#define FUSION_SEQUENCE vector +#include "misc.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_move.cpp b/libs/fusion/test/sequence/vector_move.cpp new file mode 100644 index 000000000..70483f06a --- /dev/null +++ b/libs/fusion/test/sequence/vector_move.cpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2012 Joel de Guzman + + 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) +==============================================================================*/ +#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES // $$$ JDG temp $$$ + +#include <boost/config.hpp> + +#if !defined(BOOST_NO_RVALUE_REFERENCES) + +#include <boost/fusion/container/vector/vector.hpp> + +#define FUSION_SEQUENCE boost::fusion::vector +#include "move.hpp" + +#else +#include <boost/detail/lightweight_test.hpp> +#endif + +int +main() +{ +#if !defined(BOOST_NO_RVALUE_REFERENCES) + test(); +#endif + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_mutate.cpp b/libs/fusion/test/sequence/vector_mutate.cpp new file mode 100644 index 000000000..448bbf768 --- /dev/null +++ b/libs/fusion/test/sequence/vector_mutate.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> + +#define FUSION_SEQUENCE vector +#include "mutate.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_n.cpp b/libs/fusion/test/sequence/vector_n.cpp new file mode 100644 index 000000000..05c07ce45 --- /dev/null +++ b/libs/fusion/test/sequence/vector_n.cpp @@ -0,0 +1,231 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector/vector10.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> + +#include <boost/fusion/container/vector/vector20.hpp> +#include <boost/fusion/container/vector/vector30.hpp> +#include <boost/fusion/container/vector/vector40.hpp> +#include <boost/fusion/container/vector/vector50.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_empty.hpp> +#include <boost/static_assert.hpp> +#include <iostream> + +#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/mpl/vector_c.hpp> + + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + + { + vector0<> vec; + (void) vec; + std::cout << "(): " << sizeof(vec) << std::endl; + std::cout << (boost::is_empty<vector0<> >::value ? "is empty" : "is not empty") << std::endl; + } + + { + typedef vector1<int> type; + type vec; + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<type>::value == 1); + + BOOST_TEST(at_c<0>(vec) == 0); + BOOST_STATIC_ASSERT((boost::is_same<int, boost::fusion::result_of::value_at_c<type, 0>::type>::value)); + + // prove that it is mutable + at_c<0>(vec) = 987; + BOOST_TEST(at_c<0>(vec) == 987); + } + + { + typedef vector1<int> type; + type vec(123); + BOOST_TEST(at_c<0>(vec) == 123); + std::cout << "(int): " << sizeof(vec) << std::endl; + } + + { // testing const vector + vector1<short> const vec(999); + BOOST_TEST(at_c<0>(vec) == 999); + +#ifdef FUSION_TEST_COMPILE_FAIL + at_c<0>(vec) = 321; +#endif + } + + { + vector1<int> t1(123L); // try conversion from long to int + vector1<double> t2(t1); // try copy + (void)t2; + } + + { + typedef vector2<int, char> type; + type vec; + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<type>::value == 2); + + BOOST_TEST(at_c<0>(vec) == 0); + BOOST_TEST(at_c<1>(vec) == char()); + + BOOST_STATIC_ASSERT((boost::is_same<int, boost::fusion::result_of::value_at_c<type, 0>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<char, boost::fusion::result_of::value_at_c<type, 1>::type>::value)); + } + + { + typedef vector2<int, char> type; + type vec(123, 'x'); + BOOST_TEST(at_c<0>(vec) == 123); + BOOST_TEST(at_c<1>(vec) == 'x'); + std::cout << "(int, char): " << sizeof(vec) << std::endl; + } + + { + vector2<int, int> t1(123, 456); + vector2<double, float> t2(t1); + (void)t2; + } + + { + typedef vector3<int, char, double> type; + type vec; + BOOST_STATIC_ASSERT(boost::fusion::result_of::size<type>::value == 3); + + BOOST_TEST(at_c<0>(vec) == 0); + BOOST_TEST(at_c<1>(vec) == char()); + BOOST_TEST(at_c<2>(vec) == double()); + + BOOST_STATIC_ASSERT((boost::is_same<int, boost::fusion::result_of::value_at_c<type, 0>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<char, boost::fusion::result_of::value_at_c<type, 1>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<double, boost::fusion::result_of::value_at_c<type, 2>::type>::value)); + } + + { + typedef vector3<int, char, double> type; + type vec(123, 'x', 123.456); + BOOST_TEST(at_c<0>(vec) == 123); + BOOST_TEST(at_c<1>(vec) == 'x'); + BOOST_TEST(at_c<2>(vec) >= 123.455 && at_c<2>(vec) <= 123.457); + std::cout << "(int, char, double): " << sizeof(vec) << std::endl; + } + + { + typedef vector4<int, char, double, bool> type; + type vec(123, 'x', 123.456, true); + std::cout << "(int, char, double, bool): " << sizeof(vec) << std::endl; + } + + { + typedef vector4<int, char, bool, double> type; + type vec(123, 'x', true, 123.456); + std::cout << "(int, char, bool, double): " << sizeof(vec) << std::endl; + } + + { + typedef vector7<bool, char, short, int, long, float, double> type; + type vec(false, 'x', 3, 4, 5, 6.0, 7.0); + + BOOST_TEST(at_c<0>(vec) == false); + BOOST_TEST(at_c<1>(vec) == 'x'); + BOOST_TEST(at_c<2>(vec) == 3); + BOOST_TEST(at_c<3>(vec) == 4); + BOOST_TEST(at_c<4>(vec) == 5); + BOOST_TEST(at_c<5>(vec) >= 5.9 && at_c<5>(vec) <= 6.1); + BOOST_TEST(at_c<6>(vec) >= 6.9 && at_c<6>(vec) <= 7.1); + + BOOST_STATIC_ASSERT((boost::is_same<bool, boost::fusion::result_of::value_at_c<type, 0>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<char, boost::fusion::result_of::value_at_c<type, 1>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<short, boost::fusion::result_of::value_at_c<type, 2>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<int, boost::fusion::result_of::value_at_c<type, 3>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<long, boost::fusion::result_of::value_at_c<type, 4>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<float, boost::fusion::result_of::value_at_c<type, 5>::type>::value)); + BOOST_STATIC_ASSERT((boost::is_same<double, boost::fusion::result_of::value_at_c<type, 6>::type>::value)); + std::cout << "(bool, char, short, int, long, float, double): " << sizeof(vec) << std::endl; + } + + { + typedef vector10<int, int, int, int, int, int, int, int, int, int> type; + type vec; // compile check only + std::cout << "vector10 of int: " << sizeof(vec) << std::endl; + } + + { + typedef vector20< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int> type; + + type vec; // compile check only + std::cout << "vector20 of int: " << sizeof(vec) << std::endl; + } + + { + typedef vector30< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int> type; + + type vec; // compile check only + std::cout << "vector30 of int: " << sizeof(vec) << std::endl; + } + + { + typedef vector40< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int> type; + + type vec; // compile check only + std::cout << "vector40 of int: " << sizeof(vec) << std::endl; + } + + { + typedef vector50< + int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int + , int, int, int, int, int, int, int, int, int, int> type; + + type vec; // compile check only + std::cout << "vector50 of int: " << sizeof(vec) << std::endl; + } + + { + // testing copy and assign from a view + vector0<> empty; + fusion::vector2<int, long> v(fusion::push_back(fusion::push_back(empty, 123), 456)); + BOOST_TEST(at_c<0>(v) == 123); + BOOST_TEST(at_c<1>(v) == 456); + v = fusion::push_back(fusion::push_back(empty, 123), 456); // test assign + BOOST_TEST(at_c<0>(v) == 123); + BOOST_TEST(at_c<1>(v) == 456); + } + + { + // testing copy and assign from a vector_c + mpl::vector_c<int, 123, 456> vec_c; + fusion::vector2<int, long> v(vec_c); + BOOST_TEST(at_c<0>(v) == 123); + BOOST_TEST(at_c<1>(v) == 456); + v = mpl::vector_c<int, 123, 456>(); // test assign + BOOST_TEST(at_c<0>(v) == 123); + BOOST_TEST(at_c<1>(v) == 456); + } + + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_tie.cpp b/libs/fusion/test/sequence/vector_tie.cpp new file mode 100644 index 000000000..123bf888e --- /dev/null +++ b/libs/fusion/test/sequence/vector_tie.cpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/container/generation/vector_tie.hpp> +#include <boost/fusion/container/generation/ignore.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> + +#define FUSION_SEQUENCE vector +#include "tie.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/vector_value_at.cpp b/libs/fusion/test/sequence/vector_value_at.cpp new file mode 100644 index 000000000..191da4cf7 --- /dev/null +++ b/libs/fusion/test/sequence/vector_value_at.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/fusion/container/vector/vector.hpp> + +#define FUSION_SEQUENCE vector +#include "value_at.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/zip_view.cpp b/libs/fusion/test/sequence/zip_view.cpp new file mode 100644 index 000000000..83bfa8798 --- /dev/null +++ b/libs/fusion/test/sequence/zip_view.cpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/view/zip_view.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/vector_c.hpp> + +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> + +int main() +{ + using namespace boost::fusion; + { + typedef vector2<int,int> int_vector; + typedef vector2<char,char> char_vector; + typedef vector<int_vector&, char_vector&> seqs_type; + typedef zip_view<seqs_type> view; + + BOOST_MPL_ASSERT((boost::mpl::equal_to<boost::fusion::result_of::size<view>::type, boost::fusion::result_of::size<int_vector>::type>)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::size<view>::value == 2)); + + int_vector iv(1,2); + char_vector cv('a', 'b'); + seqs_type seqs(iv, cv); + view v(seqs); + + BOOST_TEST(at_c<0>(v) == make_vector(1, 'a')); + BOOST_TEST(at_c<1>(v) == make_vector(2, 'b')); + BOOST_TEST(front(v) == make_vector(1, 'a')); + BOOST_TEST(back(v) == make_vector(2, 'b')); + BOOST_TEST(*next(begin(v)) == make_vector(2, 'b')); + BOOST_TEST(*prior(end(v)) == make_vector(2, 'b')); + BOOST_TEST(advance_c<2>(begin(v)) == end(v)); + BOOST_TEST(advance_c<-2>(end(v)) == begin(v)); + BOOST_TEST(distance(begin(v), end(v)) == 2); + + BOOST_STATIC_ASSERT((boost::fusion::result_of::distance<boost::fusion::result_of::begin<view>::type, boost::fusion::result_of::end<view>::type>::value == 2)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<view,0>::type, vector2<int,char> >)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of<boost::fusion::result_of::begin<view>::type>::type, vector2<int,char> >)); + } + { + using namespace boost; + typedef mpl::vector2<int,bool> v1_type; + typedef mpl::vector2<char,long> v2_type; + typedef fusion::vector<v1_type&, v2_type&> seqs_type; + typedef fusion::zip_view<seqs_type> view; + + v1_type v1; + v2_type v2; + seqs_type seqs(v1,v2); + view v(seqs); + BOOST_TEST((fusion::at_c<0>(v) == mpl::vector2<int,char>())); + BOOST_TEST((fusion::at_c<1>(v) == mpl::vector2<bool,long>())); + BOOST_TEST((fusion::front(v) == mpl::vector2<int,char>())); + BOOST_TEST((fusion::back(v) == mpl::vector2<bool,long>())); + BOOST_TEST((*fusion::next(fusion::begin(v)) == mpl::vector2<bool,long>())); + BOOST_TEST((*fusion::prior(fusion::end(v)) == mpl::vector2<bool,long>())); + BOOST_TEST(fusion::advance_c<2>(fusion::begin(v)) == fusion::end(v)); + BOOST_TEST(fusion::advance_c<-2>(fusion::end(v)) == fusion::begin(v)); + BOOST_TEST(fusion::distance(fusion::begin(v), fusion::end(v)) == 2); + } + return boost::report_errors(); +} + diff --git a/libs/fusion/test/sequence/zip_view2.cpp b/libs/fusion/test/sequence/zip_view2.cpp new file mode 100644 index 000000000..b63a27446 --- /dev/null +++ b/libs/fusion/test/sequence/zip_view2.cpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2006 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> + +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/view/zip_view.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/container/list.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/intrinsic/front.hpp> +#include <boost/fusion/sequence/intrinsic/back.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/sequence/comparison/equal_to.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/adapted/mpl.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/equal_to.hpp> + +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/static_assert.hpp> + +int main() +{ + { + using namespace boost::fusion; + typedef vector2<int,int> int_vector; + typedef vector2<char,char> char_vector; + typedef list<char,char> char_list; + typedef vector<int_vector&, char_vector&, char_list&> seqs_type; + typedef zip_view<seqs_type> view; + + BOOST_MPL_ASSERT((boost::mpl::equal_to<boost::fusion::result_of::size<view>::type, boost::fusion::result_of::size<int_vector>::type>)); + BOOST_STATIC_ASSERT((boost::fusion::result_of::size<view>::value == 2)); + + int_vector iv(1,2); + char_vector cv('a', 'b'); + char_list cl('y','z'); + seqs_type seqs(iv, cv, cl); + view v(seqs); + + BOOST_TEST(at_c<0>(v) == make_vector(1, 'a', 'y')); + BOOST_TEST(at_c<1>(v) == make_vector(2, 'b', 'z')); + BOOST_TEST(front(v) == make_vector(1, 'a', 'y')); + BOOST_TEST(*next(begin(v)) == make_vector(2, 'b', 'z')); + BOOST_TEST(advance_c<2>(begin(v)) == end(v)); + BOOST_TEST(distance(begin(v), end(v)) == 2); + BOOST_STATIC_ASSERT((boost::fusion::result_of::distance<boost::fusion::result_of::begin<view>::type, boost::fusion::result_of::end<view>::type>::value == 2)); + + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<view,0>::type, vector3<int,char,char> >)); + BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of<boost::fusion::result_of::begin<view>::type>::type, vector3<int,char,char> >)); + } + return boost::report_errors(); +} diff --git a/libs/fusion/test/sequence/zip_view_ignore.cpp b/libs/fusion/test/sequence/zip_view_ignore.cpp new file mode 100644 index 000000000..d22bf70ff --- /dev/null +++ b/libs/fusion/test/sequence/zip_view_ignore.cpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2007 Dan Marsden + + 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) +==============================================================================*/ +#include <boost/detail/lightweight_test.hpp> +#include <boost/fusion/container/vector.hpp> +#include <boost/fusion/view/zip_view.hpp> +#include <boost/fusion/support/unused.hpp> +#include <boost/fusion/iterator.hpp> +#include <boost/fusion/sequence/intrinsic.hpp> + +#include <boost/mpl/assert.hpp> +#include <boost/type_traits/is_same.hpp> + +int main() +{ + using namespace boost::fusion; + { + typedef vector2<int,int> int_vector; + typedef vector2<char,char> char_vector; + typedef vector<int_vector&, unused_type const&, char_vector&> seqs_type; + typedef zip_view<seqs_type> view; + + int_vector iv(1,2); + char_vector cv('a','b'); + seqs_type seq(iv, unused, cv); + view v(seq); + + BOOST_TEST(at_c<0>(front(v)) == 1); + BOOST_TEST(at_c<2>(front(v)) == 'a'); + BOOST_TEST(at_c<0>(back(v)) == 2); + BOOST_TEST(at_c<2>(back(v)) == 'b'); + + typedef boost::fusion::result_of::begin<view>::type first_iterator; + typedef boost::fusion::result_of::value_of<first_iterator>::type first_element; + + typedef boost::fusion::result_of::at_c<first_element, 0>::type e0; + typedef boost::fusion::result_of::at_c<first_element, 2>::type e2; + BOOST_MPL_ASSERT((boost::is_same<e0, int&>)); + BOOST_MPL_ASSERT((boost::is_same<e2, char&>)); + + BOOST_TEST(size(front(v)) == 3); + + typedef boost::fusion::result_of::value_at_c<view, 0>::type first_value_at; + typedef boost::fusion::result_of::value_at_c<first_value_at, 0>::type v0; + typedef boost::fusion::result_of::value_at_c<first_value_at, 2>::type v2; + + BOOST_MPL_ASSERT((boost::is_same<v0, int>)); + BOOST_MPL_ASSERT((boost::is_same<v2, char>)); + + BOOST_TEST(at_c<0>(at_c<0>(v)) == 1); + BOOST_TEST(at_c<2>(at_c<0>(v)) == 'a'); + } + return boost::report_errors(); +} diff --git a/libs/fusion/todo.txt b/libs/fusion/todo.txt new file mode 100644 index 000000000..2add4cc89 --- /dev/null +++ b/libs/fusion/todo.txt @@ -0,0 +1,185 @@ +=============================================================================== +Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger + +Use, modification and distribution is 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) +=============================================================================== + +* Document extension::struct_size, extension::struct_member and + extension::struct_assoc_member in extension section. + +* Document rationale behind at and value_at and how to choose which + to use. + +* Reinstate the function object algorithms + +* Break all dependency cycles if there are some more + +* Break the view<-->algorithm dependency cycle + +* Improve extension docs + +* Document sequence/convert + +* Consider object equivalent of functions and algorithms (so you can do + transform(iterators, deref()) with needing to put together a wrapper for deref). + +* Make algorithms work with mutable data + +* Consider segmented sequence / algorithm support + +* Consider utility element_ref<Seq,Member>::type thats consts and refs as appropriate + +* Improved motivation section + +* Expand details of view concept + +* Examples, examples, examples + +* look at lambda stuff + +* Complete the fusion/include/ directory containing a flat list of + include files for all the modules and components. + +* The error messages when e.g. the function is not set as const are difficult + to decipher. e.g. transform(s, f) <<- where f has a non-const operator() + +* mpl, fusion, container type preserving operations incompatible + -- shall we consider container-type preserving variations of the + functions/algorithms? + + How about making joint_view Concept preserving? This way push/pop/front/back + will return a view of the same Concept. - tosh + +* map_tie is implemented. It seems not yet documented? - Dan: done now! + +* multi_set, multi_map? + +* why is insert_range not spelled insert_sequence ? + +* Document the new fusion extension mechanisms + ->iterator_facade + ->sequence_facade + +* David A: + Wouldn't extension be a lot easier if iterator_base and sequence_base + took (optional) 2nd arguments that specify the tag? Then you wouldn't + need that whole dance that enables tag dispatching (right?) + +* David A: is_iterator isn't documented? + JDG: There is no is_iterator ;) There is is_fusion_iterator, but it should + probably be placed in detail. + +* for_each takes the function object by reference to const, so you have to + const qualify operator() and make the data members mutable so you can change + them anyway. + Eric N: IMO, this is a bug in Fusion. There should be an overload of for_each + that takes a function object by non-const reference. Stateful predicates should + be supported, and Fusion should be explicit about where and when predicates + are copied, so that the state doesn't get messed up. + +* Make Boost.parameters library's ArgumentPacks a conforming fusion sequence + +* Optimize container performance with typeof / compiler defect typeof. In particular + improve the performance of the prototype deque implementation. + +* Deque docs if we decide we like it + +* Rewrite the whole extension docs section. More formal docs of extension point, + example to use the various facade types, rather than hand coding everything. + +* zip optimization - Zip is rather compiler heavy, try and reduce the likelihood + of compilers like msvc7 hitting internal compiler limits + +* Document the unused support added to zip for Hartmut. + +* Rationalize support/unused.hpp and the ignore stuff needed for tie etc. + +* Why do we need to set FUSION_MAX_VECTOR_SIZE when we set + FUSION_MAX_MAP_SIZE? Setting FUSION_MAX_MAP_SIZE should be enough. + +tosh: + +* Document Incrementable / Single Pass Concepts +* Provide infinity-aware default implementation for Incrementable Sequences + + Thoughts: It would probably be cleaner to have infinity conceptually + orthogonal so there can be infinite Bidi/RA/Assoc Sequences. + OTOH it complicates things in way that might not be worth it... + +* Implement always_view/always with repetitive_view<single_view<T> > + semantics - using repetitive_view will for this purpose will be way + too much overhead. + +? Functional wrappers for intrinsics/algorithms. + +* Rewrite functional benchmark + +========================================================== + +From the fusion review (please mark all done items): + +The following comments refer to issues that the library authors should +address prior to merging the library into CVS: + +* Documentation: Many of the reviewers stated that they would like to + see more tutorial documentation that demonstrates not only what the + particular constructs in Fusion do, but also how they are expected + to be used. A reasonably concise motivating example has been + requested. It has already been pointed out that Fusion is used for + some other boost libraries. A well-developed and self-contained + case study of when and how to use Fusion would be greatly + appreciated. The relationship between this library and the current + Boost.Tuple library, as well as Boost.Mpl, should be discussed. The + reference documentation is quite thorough and detailed comments + regarding them have already been addressed by the authors. However + the notion of "views" requires greater documentation. The + examples in the algorithm sections currently do little more than + demonstrate the syntax by which they can be called. Examples that + more specifically express intent would be a notable + improvement. (see for example Matt Austern's "Generic Programming + and the STL"). In general the documentation would benefit from + copy-editing. + +* Several commented on the use of the name "pair" for the fusion type + that has typedefs for two types but only contains the second type. + Although the typedefs and member names are consistent with the + std::pair object, the name "pair" is confusing. The + compile-time/run-time hybrid nature of this library makes it + difficult to find perfect metaphors for constructs in the library. + In this case, it seems better to find a term for this template (and + the concept that it models) that more directly states its purpose. + The name "tag_of" would also benefit from renaming. + +* The behavior of Fusion functions in the face of argument-dependent + lookup (ADL) is not well specified. This should be made + explicit in the reference documentation. + +The following comments refer to issues that, while not mandatory, +deserve consideration: + +* The library name "Fusion", though not arbitrary, says little about + the library's purpose. There is precedent for this within boost, + however. A name change is not mandatory for the + library's acceptance, but it would be worth while for the authors to + consider a more telling name. + + Dan - I like the name Fusion, and there is precendent for less direct + library names like Spirit and Xpressive in Boost. (And Boost is not + exactly an explicit name either). + +* The mechanism for extending Fusion with new containers and iterators + is complex and involves implementing a number of components, + especially regarding iterators. An adaptation layer that is + analogous to the Boost.Iterator library would be a fine addition to + Fusion. + + Dan - Joel added iterator and container adapters, still to be documented + as part of the improved extension docs to be done by me. + +* It would be beneficial to supply Boost.Serialization support for the + Fusion container types. I am sure, as mentioned, that the authors + of this library would accept a volunteer to implement this + functionality. + |