mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-23 17:17:23 +02:00
Add docs for std::tuple adaptation.
This commit is contained in:
@ -89,6 +89,35 @@ __std_pair_doc__, __tr1_tuple_pair__
|
|||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
[section std::tuple]
|
||||||
|
|
||||||
|
This module provides adapters for `std::tuple`. Including the module header
|
||||||
|
makes `std::tuple` a fully conforming __random_access_sequence__.
|
||||||
|
|
||||||
|
[important To be fully conforming, compiler should support C++11 Variadic Templates.]
|
||||||
|
|
||||||
|
[heading Header]
|
||||||
|
|
||||||
|
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||||
|
#include <boost/fusion/include/std_tuple.hpp>
|
||||||
|
|
||||||
|
[heading Model of]
|
||||||
|
|
||||||
|
* __random_access_sequence__
|
||||||
|
|
||||||
|
[heading Example]
|
||||||
|
|
||||||
|
std::tuple<int, std::string, float> p(123, "Hola!!!", 456.f);
|
||||||
|
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_tuple_doc__
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
[section mpl sequence]
|
[section mpl sequence]
|
||||||
|
|
||||||
This module provides adapters for __mpl__ sequences. Including the module
|
This module provides adapters for __mpl__ sequences. Including the module
|
||||||
@ -168,8 +197,8 @@ header makes `boost::tuple` a fully conforming __forward_sequence__.
|
|||||||
[heading Example]
|
[heading Example]
|
||||||
|
|
||||||
boost::tuple<int,std::string> example_tuple(101, "hello");
|
boost::tuple<int,std::string> example_tuple(101, "hello");
|
||||||
std::cout << *boost::fusion::begin(example_tuple) << '\n';
|
std::cout << *__begin__(example_tuple) << '\n';
|
||||||
std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';
|
std::cout << *__next__(__begin__(example_tuple)) << '\n';
|
||||||
|
|
||||||
[heading See also]
|
[heading See also]
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
[def __boost_func_factory__ [@http://www.boost.org/libs/functional/factory/doc/html/index.html Boost.Functional/Factory]]
|
[def __boost_func_factory__ [@http://www.boost.org/libs/functional/factory/doc/html/index.html Boost.Functional/Factory]]
|
||||||
[def __boost_func_hash__ [@http://www.boost.org/doc/html/hash.html Boost.Functional/Hash]]
|
[def __boost_func_hash__ [@http://www.boost.org/doc/html/hash.html Boost.Functional/Hash]]
|
||||||
[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`]]
|
||||||
|
[def __std_tuple_doc__ [@http://en.cppreference.com/w/cpp/utility/tuple `std::tuple`]]
|
||||||
[def __std_plus_doc__ [@http://www.sgi.com/tech/stl/plus.html `std::plus`]]
|
[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 __std_minus_doc__ [@http://www.sgi.com/tech/stl/minus.html `std::minus`]]
|
||||||
|
|
||||||
|
@ -167,6 +167,7 @@
|
|||||||
<dd><dl>
|
<dd><dl>
|
||||||
<dt><span class="section"><a href="fusion/adapted/array.html">Array</a></span></dt>
|
<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/std__pair.html">std::pair</a></span></dt>
|
||||||
|
<dt><span class="section"><a href="fusion/adapted/std__tuple.html">std::tuple</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/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__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/boost__tuple.html">boost::tuple</a></span></dt>
|
||||||
|
Reference in New Issue
Block a user