Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64383 - in sandbox/variadic_templates: . boost/mpl sandbox sandbox/boost sandbox/boost/mpl
From: cppljevans_at_[hidden]
Date: 2010-07-27 07:51:26


Author: cppljevans
Date: 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
New Revision: 64383
URL: http://svn.boost.org/trac/boost/changeset/64383

Log:
add not-yet-working variand binary bool ops
Added:
   sandbox/variadic_templates/sandbox/
   sandbox/variadic_templates/sandbox/README.txt (contents, props changed)
   sandbox/variadic_templates/sandbox/boost/
   sandbox/variadic_templates/sandbox/boost/mpl/
   sandbox/variadic_templates/sandbox/boost/mpl/and.hpp (contents, props changed)
   sandbox/variadic_templates/sandbox/boost/mpl/or.hpp (contents, props changed)
Text files modified:
   sandbox/variadic_templates/Jamfile | 4 ++--
   sandbox/variadic_templates/boost/mpl/iter_fold_if.hpp | 9 +++++----
   2 files changed, 7 insertions(+), 6 deletions(-)

Modified: sandbox/variadic_templates/Jamfile
==============================================================================
--- sandbox/variadic_templates/Jamfile (original)
+++ sandbox/variadic_templates/Jamfile 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
@@ -1,6 +1,6 @@
 project boost
     : requirements
- <include>.
+# <include>.
     : usage-requirements
- <include>.
+# <include>.
     ;

Modified: sandbox/variadic_templates/boost/mpl/iter_fold_if.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/iter_fold_if.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/iter_fold_if.hpp 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
@@ -11,9 +11,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Source: /home/evansl/prog_dev/boost-svn/ro/boost-vrtmp/boost/mpl/RCS/iter_fold_if.hpp,v $
-// $Date: 2009/04/08 16:19:50 $
-// $Revision: 1.6 $
+// $Source: /home/evansl/prog_dev/boost-svn/ro/sandbox/rw/variadic_templates/boost/mpl/RCS/iter_fold_if.hpp,v $
+// $Date: 2010/07/20 13:35:49 $
+// $Revision: 1.7 $
 
 //ChangeLog:
 // 2009-02-04:1026
@@ -45,7 +45,8 @@
 // 2) apply1 was replaced with variadic template apply.
 
 #include <boost/mpl/begin_end.hpp>
-#include <boost/mpl/logical.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/and.hpp>
 #include <boost/mpl/always.hpp>
 #include <boost/mpl/eval_if.hpp>
 #include <boost/mpl/if.hpp>

Added: sandbox/variadic_templates/sandbox/README.txt
==============================================================================
--- (empty file)
+++ sandbox/variadic_templates/sandbox/README.txt 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
@@ -0,0 +1,11 @@
+Code in this directory is experimental and hasn't passed some "basic"
+testing.
+
+Specifically, the failed tests(in the ../libs/mpl/tests directory)
+include but are not limited to:
+
+ test code
+ ---- ----
+ lambda.cpp ./boost/mpl/or.hpp
+ lambda.cpp ./boost/mpl/and.hpp
+

Added: sandbox/variadic_templates/sandbox/boost/mpl/and.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_templates/sandbox/boost/mpl/and.hpp 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
@@ -0,0 +1,26 @@
+#ifndef BOOST_MPL_AND_HPP_INCLUDED
+#define BOOST_MPL_AND_HPP_INCLUDED
+
+#include <boost/mpl/fold_null_unit.hpp>
+#include <boost/mpl/converter_bool.hpp>
+
+namespace boost
+{
+namespace mpl
+{
+
+ template
+ < typename... T
+ >
+ struct and_
+ : fold_null_unit
+ < false_
+ , true_
+ , converter_bool
+ , T...
+ >
+ {};
+
+}//exit mpl namespace
+}//exit boost namespace
+#endif

Added: sandbox/variadic_templates/sandbox/boost/mpl/or.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_templates/sandbox/boost/mpl/or.hpp 2010-07-27 07:51:25 EDT (Tue, 27 Jul 2010)
@@ -0,0 +1,47 @@
+#ifndef BOOST_MPL_OR_HPP_INCLUDED
+#define BOOST_MPL_OR_HPP_INCLUDED
+
+#include <boost/mpl/fold_null_unit.hpp>
+#include <boost/mpl/converter_bool.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/aux_/template_arity_fwd.hpp>
+
+namespace boost
+{
+namespace mpl
+{
+
+ template
+ < typename... T
+ >
+ struct or_
+ : fold_null_unit
+ < true_
+ , false_
+ , converter_bool
+ , T...
+ >
+ {
+ using
+ fold_null_unit
+ < true_
+ , false_
+ , converter_bool
+ , T...
+ >::
+ apply
+ ;
+ };
+
+ namespace aux
+ {
+ template < typename... T>
+ struct template_arity <or_ < T...> >
+ : int_ < sizeof...(T) >
+ {
+ };
+
+ }
+}//exit mpl namespace
+}//exit boost namespace
+#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk