Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49641 - sandbox/mpl_ext/boost/mpl_ext
From: vicente.botet_at_[hidden]
Date: 2008-11-07 14:25:39


Author: viboes
Date: 2008-11-07 14:25:38 EST (Fri, 07 Nov 2008)
New Revision: 49641
URL: http://svn.boost.org/trac/boost/changeset/49641

Log:
mpl_ext initial version
Added:
   sandbox/mpl_ext/boost/mpl_ext/and_seq.hpp (contents, props changed)
   sandbox/mpl_ext/boost/mpl_ext/or_seq.hpp (contents, props changed)

Added: sandbox/mpl_ext/boost/mpl_ext/and_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/mpl_ext/boost/mpl_ext/and_seq.hpp 2008-11-07 14:25:38 EST (Fri, 07 Nov 2008)
@@ -0,0 +1,30 @@
+/* Copyright 2008 Vicente J. Botet Escriba
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org/libs/mpl_ext for library home page.
+ */
+
+#ifndef BOOST_MPLEXT_AND_SEQ_HPP_
+#define BOOST_MPLEXT_AND_SEQ_HPP_
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+namespace mpl_ext {
+
+/*
+Calculate the mlp::and_ of a sequence of nullary logical metafunctions.
+*/
+template <typename Seq>
+struct and_seq : boost::is_same<typename mpl::find_if<Seq, mpl::not_<mpl::_> >::type,
+ typename mpl::end<Seq>::type>
+ {};
+
+} // mpl_ext
+} // boost
+#endif // BOOST_MPLEXT_AND_SEQ_HPP_

Added: sandbox/mpl_ext/boost/mpl_ext/or_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/mpl_ext/boost/mpl_ext/or_seq.hpp 2008-11-07 14:25:38 EST (Fri, 07 Nov 2008)
@@ -0,0 +1,30 @@
+/* Copyright 2008 Vicente J. Botet Escriba
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org/libs/mpl_ext for library home page.
+ */
+
+#ifndef BOOST_MPLEXT_OR_SEQ_HPP_
+#define BOOST_MPLEXT_OR_SEQ_HPP_
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+namespace mpl_ext {
+
+/*
+Calculate the mlp::or_ of a sequence of nullary logical metafunctions.
+*/
+template <typename Seq>
+struct or_seq : mpl::not_<boost::is_same<typename mpl::find_if<Seq, mpl::_>::type,
+ typename mpl::end<Seq>::type>
+ > {};
+
+} // mpl_ext
+} // boost
+#endif // BOOST_MPLEXT_OR_SEQ_HPP_


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