Update of /cvsroot/boost/boost/libs/mpl/doc/src/refmanual
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6195

Modified Files:
        if_.rst if_c.rst 
Log Message:
Add an example that shows use of if_ with dependent entities

Index: if_.rst
===================================================================
RCS file: /cvsroot/boost/boost/libs/mpl/doc/src/refmanual/if_.rst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- if_.rst     29 Nov 2004 06:33:06 -0000      1.1
+++ if_.rst     29 May 2007 06:59:16 -0000      1.2
@@ -76,6 +76,23 @@
     BOOST_MPL_ASSERT(( is_same<t2, long> ));
 
 
+.. parsed-literal::
+
+    // allocates space for an object of class T on heap or "inplace"
+    // depending on its size
+    template< typename T > struct lightweight
+    {
+        // ...
+        typedef typename if\_<
+              less_equal< sizeof\_<T>, sizeof\_<T*> >
+            , inplace_storage<T>
+            , heap_storage<T>
+            >::type impl_t;
+
+        impl_t impl;
+    };
+
+
 See also
 --------
 

Index: if_c.rst
===================================================================
RCS file: /cvsroot/boost/boost/libs/mpl/doc/src/refmanual/if_c.rst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- if_c.rst    29 Nov 2004 06:33:06 -0000      1.1
+++ if_c.rst    29 May 2007 06:59:16 -0000      1.2
@@ -77,6 +77,23 @@
     BOOST_MPL_ASSERT(( is_same<t2, long> ));
 
 
+.. parsed-literal::
+
+    // allocates space for an object of class T on heap or "inplace"
+    // depending on its size
+    template< typename T > struct lightweight
+    {
+        // ...
+        typedef typename if_c<
+              sizeof(T) <= sizeof(T*)
+            , inplace_storage<T>
+            , heap_storage<T>
+            >::type impl_t;
+
+        impl_t impl;
+    };
+
+
 See also
 --------
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to