Update of /cvsroot/boost/boost/libs/fusion/doc
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15362
Modified Files:
fusion.qbk support.qbk
Log Message:
introduces documentation for deduce / deduce_sequence
Index: fusion.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/fusion/doc/fusion.qbk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fusion.qbk 1 Jan 2007 02:22:54 -0000 1.3
+++ fusion.qbk 27 Jan 2007 10:52:39 -0000 1.4
@@ -50,6 +50,8 @@
[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`]]
Index: support.qbk
===================================================================
RCS file: /cvsroot/boost/boost/libs/fusion/doc/support.qbk,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- support.qbk 20 Nov 2006 23:15:39 -0000 1.6
+++ support.qbk 27 Jan 2007 10:52:39 -0000 1.7
@@ -254,6 +254,96 @@
[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>
+
+[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>
+
+[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]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs