variant and boost tuple adaptor docs

[SVN r36140]
This commit is contained in:
Dan Marsden
2006-11-21 22:49:05 +00:00
parent 4f14542256
commit e5cf298835
2 changed files with 54 additions and 0 deletions

View File

@ -32,6 +32,8 @@
[def __boost_any__ [@http://boost.org/doc/html/any.html Boost.Any]] [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 __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_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__ [@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_ref_call__ [@http://www.boost.org/doc/html/ref.html `ref`]]
[def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]] [def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]]

View File

@ -1326,6 +1326,58 @@ __boost_array_library__
[endsect] [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/sequence/adapted/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 boost::variant]
This module provides adapters for `boost::variant`. Including the module
header makes `boost::variant` a fully conforming __forward_sequence__.
The variant acts as a sequence of the types that can be contained in the variant.
Accessing types not currently stored int the variant will lead to the variant
being populated with a default constructed value of that type.
[heading Header]
#include <boost/fusion/sequence/adapted/variant.hpp>
[heading Model of]
* __forward_sequence__
[heading Example]
boost::variant<int,std::string> example_variant = 101;
std::cout << example_variant << '\n';
*boost::fusion::find<std::string>(example_variant) = "hello";
std::cout << example_variant << '\n';
[heading See also]
__boost_variant_library__
[endsect]
[endsect] [endsect]
[section Intrinsics] [section Intrinsics]