|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55955 - in sandbox/variadic_templates: boost/mpl boost/mpl/list/aux_ boost/mpl/map/aux_ boost/mpl/set/aux_ boost/mpl/vector/aux_ libs/mpl/test
From: cppljevans_at_[hidden]
Date: 2009-09-01 07:29:52
Author: cppljevans
Date: 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
New Revision: 55955
URL: http://svn.boost.org/trac/boost/changeset/55955
Log:
use new foldr_pkg for sequence super
Added:
sandbox/variadic_templates/boost/mpl/foldr_pkg.hpp (contents, props changed)
Text files modified:
sandbox/variadic_templates/boost/mpl/list.hpp | 19 +++++++----------
sandbox/variadic_templates/boost/mpl/list/aux_/begin_end.hpp | 11 ++++-----
sandbox/variadic_templates/boost/mpl/list/aux_/item.hpp | 10 ++++----
sandbox/variadic_templates/boost/mpl/list/aux_/iterator.hpp | 9 +++----
sandbox/variadic_templates/boost/mpl/list/aux_/list0.hpp | 17 +++++++--------
sandbox/variadic_templates/boost/mpl/map/aux_/clear_impl.hpp | 1
sandbox/variadic_templates/boost/mpl/set.hpp | 38 ++++++++++------------------------
sandbox/variadic_templates/boost/mpl/set/aux_/begin_end_impl.hpp | 4 +-
sandbox/variadic_templates/boost/mpl/set/aux_/clear_impl.hpp | 6 ++--
sandbox/variadic_templates/boost/mpl/set/aux_/iterator.hpp | 10 ++++----
sandbox/variadic_templates/boost/mpl/set/aux_/set0.hpp | 12 +++++-----
sandbox/variadic_templates/boost/mpl/vector.hpp | 35 +++++++++++++++----------------
sandbox/variadic_templates/boost/mpl/vector/aux_/item.hpp | 9 ++++++++
sandbox/variadic_templates/boost/mpl/vector/aux_/vector0.hpp | 13 +++--------
sandbox/variadic_templates/libs/mpl/test/copy_if.cpp | 2 +
sandbox/variadic_templates/libs/mpl/test/set.cpp | 44 +++++++++++++++------------------------
16 files changed, 106 insertions(+), 134 deletions(-)
Added: sandbox/variadic_templates/boost/mpl/foldr_pkg.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_templates/boost/mpl/foldr_pkg.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -0,0 +1,79 @@
+#ifndef BOOST_MPL_FOLDR_PKG_HPP_VARIADIC_TEMPLATES
+#define BOOST_MPL_FOLDR_PKG_HPP_VARIADIC_TEMPLATES
+#include <boost/mpl/apply.hpp>
+
+namespace boost { namespace mpl {
+
+ template
+ < typename State0 //initial State
+ , typename OpValueState_State //Operator: (Value,State) -> State
+ , typename... Values
+ >
+ struct
+foldr_pkg
+/**@brief
+ * Apply OpValueState_State to each element in Values...
+ * starting with intial State, State0. Associate the applications
+ * to the right.
+ *
+ * For example, the analogous operation on run-time-value's is:
+ *
+ * Assuming:
+ * z == the run-time-value analogue of State0.
+ * xI == the analogue of I-th element in Values...
+ * F == the analogue of OpValueState_State.
+ * Then the analogue of result would be:
+ * F(x1,F(x2,F(x3,z)))
+ *
+ * This template is similar to the haskell foldr described on p. 117 of:
+ *
+ * http://haskell.org/definition/haskell98-report.pdf
+ *
+ * where:
+ * haskell these_comments
+ * ------- --------------
+ * f F
+ * a typename
+ * b State
+ * z initial State
+ */
+;
+ template
+ < typename State0 //initial State
+ , typename OpValueState_State //Operator: (Value,State) -> State
+ , typename Head
+ , typename... Tail
+ >
+ struct
+foldr_pkg
+ < State0
+ , OpValueState_State
+ , Head
+ , Tail...
+ >
+: apply
+ < OpValueState_State
+ , Head
+ , typename foldr_pkg
+ < State0
+ , OpValueState_State
+ , Tail...
+ >::type
+ >::type
+{};
+ template
+ < typename State0 //initial State
+ , typename OpValueState_State //Operator: (Value,State) -> State
+ >
+ struct
+foldr_pkg
+ < State0
+ , OpValueState_State
+ >
+{
+ typedef State0 type;
+};
+
+}}//exit boost::mpl namespace
+
+#endif //include guard
Modified: sandbox/variadic_templates/boost/mpl/list.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/list.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/list.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -1,6 +1,8 @@
#ifndef BOOST_MPL_LIST_HPP_INCLUDED
#define BOOST_MPL_LIST_HPP_INCLUDED
#include <boost/mpl/list/list0.hpp>
+#include <boost/mpl/foldr_pkg.hpp>
+#include <boost/mpl/quote.hpp>
namespace boost
{
@@ -8,19 +10,15 @@
{
template
- < typename Head
- , typename... Tail
+ < typename... Values
>
struct
list
- < Head
- , Tail...
- >
- : l_item
- < long_<1+sizeof...(Tail)>
- , Head
- , list<Tail...>
- >
+ : foldr_pkg
+ < list0
+ , quote2<l_item>
+ , Values...
+ >::type
//@diff-nv-mpl:
// This specialization corresponds to all of the listI
// for I=1..., which are defined in non-variadic mpl in
@@ -28,7 +26,6 @@
// boost/mpl/list/aux_/preprocessed/plain/listN.hpp
// for some N in 10,20,...
{
- typedef list type;
};
Modified: sandbox/variadic_templates/boost/mpl/list/aux_/begin_end.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/list/aux_/begin_end.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/list/aux_/begin_end.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -11,14 +11,13 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/05/08 22:20:07 $
-// $Revision: 1.1 $
+// $Date: 2009/08/30 04:12:38 $
+// $Revision: 1.3 $
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/list/aux_/iterator.hpp>
#include <boost/mpl/list/aux_/tag.hpp>
-#include <boost/mpl/list/aux_/item.hpp>
-#include <boost/mpl/list_fwd.hpp>
+#include <boost/mpl/list/aux_/list0.hpp>
namespace boost { namespace mpl {
@@ -27,7 +26,7 @@
{
template< typename List > struct apply
{
- typedef l_iter<typename List::type> type;
+ typedef l_iter<typename List::pkg_type> type;
};
};
@@ -36,7 +35,7 @@
{
template< typename > struct apply
{
- typedef l_iter<list<> > type;
+ typedef l_iter<list0> type;
};
};
Modified: sandbox/variadic_templates/boost/mpl/list/aux_/item.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/list/aux_/item.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/list/aux_/item.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -11,8 +11,8 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/05/08 22:12:12 $
-// $Revision: 1.5 $
+// $Date: 2009/08/30 14:45:16 $
+// $Revision: 1.7 $
#include <boost/mpl/list/aux_/tag.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
@@ -21,8 +21,7 @@
namespace boost { namespace mpl {
template<
- typename Size
- , typename T
+ typename T
, typename Next
>
struct l_item
@@ -33,8 +32,9 @@
#endif
typedef aux::list_tag tag;
typedef l_item type;
+ typedef l_item pkg_type;
- typedef Size size;
+ typedef typename next<typename Next::size>::type size;
typedef T item;
typedef Next next;
};
Modified: sandbox/variadic_templates/boost/mpl/list/aux_/iterator.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/list/aux_/iterator.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/list/aux_/iterator.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -11,17 +11,16 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2008-10-10 04:10:26 -0500 (Fri, 10 Oct 2008) $
-// $Revision: 49239 $
+// $Date: 2009/08/30 04:13:27 $
+// $Revision: 1.2 $
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/next_prior.hpp>
#include <boost/mpl/deref.hpp>
-#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/list/aux_/list0.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/lambda_spec.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
-#include <boost/mpl/list_fwd.hpp>
namespace boost { namespace mpl {
@@ -60,7 +59,7 @@
#endif
-template<> struct l_iter<list<> >
+template<> struct l_iter<list0>
{
typedef aux::l_iter_tag tag;
typedef forward_iterator_tag category;
Modified: sandbox/variadic_templates/boost/mpl/list/aux_/list0.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/list/aux_/list0.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/list/aux_/list0.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -13,23 +13,22 @@
//! WHY:
//! Make consistent with the vector files.
//!
-#include <boost/mpl/list_fwd.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
namespace boost
{
namespace mpl
{
- template
- <
- >
- struct
-list
- <
- >
+struct list0
{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+ typedef int begin;
+#endif
typedef aux::list_tag tag;
- typedef list type;
+ typedef list0 type;
+ typedef list0 pkg_type;
+
typedef long_<0> size;
};
Modified: sandbox/variadic_templates/boost/mpl/map/aux_/clear_impl.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/map/aux_/clear_impl.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/map/aux_/clear_impl.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -16,7 +16,6 @@
// $Revision: 1.1 $
#include <boost/mpl/clear_fwd.hpp>
-#include <boost/mpl/map_fwd.hpp>
#include <boost/mpl/map/aux_/map0.hpp>
#include <boost/mpl/map/aux_/tag.hpp>
Modified: sandbox/variadic_templates/boost/mpl/set.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/set.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/set.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -11,11 +11,13 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Source: /home/evansl/prog_dev/boost-svn/ro/boost-vrtmp/boost/mpl/RCS/set.hpp,v $
-// $Date: 2009/08/25 20:17:50 $
-// $Revision: 1.9 $
+// $Date: 2009/08/30 12:18:00 $
+// $Revision: 1.10 $
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/set/set0.hpp>
+#include <boost/mpl/foldr_pkg.hpp>
+#include <boost/mpl/quote.hpp>
namespace boost
{
@@ -23,20 +25,15 @@
{
template
- < class MemberKey
- , typename... MembersOther
+ < typename... Values
>
struct
set
- < MemberKey
- , MembersOther...
- >
-: s_item
- < MemberKey
- , typename set
- < MembersOther...
- >::item_
- >
+ : foldr_pkg
+ < set0
+ , s_item<arg<1>,arg<2> >
+ , Values...
+ >::type
//!
//!@nv-mpl_repl:
//! This specialization corresponds to all of the setI
@@ -46,21 +43,8 @@
//! for some N in 10,20,...
//!
//!@nv-mpl_diff:
-//! WHAT:
-//! Instead of adding items to s_item from the tail, items are added from
-//! head.
-//! WHY:
-//! The variadic template compiler doesn't allow parameter
-//! packs to be followed by anything else (designated here as the
-//! [PACKS_at_END_CONSTRAINT]). IOW:
-//! set<typename Head..., typename Tail>
-//! is not allowed because paramerter pack, Head..., is followed
-//! by non-pack Tail.
-//!
+//! Similar to that of vector.hpp.
{
- typedef
- set
- type;
};
}//exit mpl namespace
Modified: sandbox/variadic_templates/boost/mpl/set/aux_/begin_end_impl.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/set/aux_/begin_end_impl.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/set/aux_/begin_end_impl.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -17,7 +17,7 @@
//GhangeLog:
// 2007-01-28.1246.CST Larry Evans
// WHAT:
-// copied from corresponding boost-cvs file and renamed set0<> to set<>
+// copied from corresponding boost-cvs file and renamed set0<> to set0
// WHY:
// In variadic template version of library, there's no set0.
//
@@ -41,7 +41,7 @@
{
template< typename Set > struct apply
{
- typedef s_iter< Set,set<> > type;
+ typedef s_iter< Set,set0 > type;
};
};
Modified: sandbox/variadic_templates/boost/mpl/set/aux_/clear_impl.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/set/aux_/clear_impl.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/set/aux_/clear_impl.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -12,8 +12,8 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/08/25 11:56:04 $
-// $Revision: 1.1 $
+// $Date: 2009/08/29 14:15:00 $
+// $Revision: 1.2 $
#include <boost/mpl/clear_fwd.hpp>
#include <boost/mpl/set/aux_/set0.hpp>
@@ -26,7 +26,7 @@
{
template< typename Set > struct apply
{
- typedef set<> type;
+ typedef set0 type;
};
};
Modified: sandbox/variadic_templates/boost/mpl/set/aux_/iterator.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/set/aux_/iterator.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/set/aux_/iterator.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -58,9 +58,9 @@
};
template< typename Set >
-struct next< s_iter<Set,set<> > >
+struct next< s_iter<Set,set0 > >
{
- typedef s_iter<Set,set<> > type;
+ typedef s_iter<Set,set0 > type;
};
template< typename Set, typename Tail > struct s_iter
@@ -68,7 +68,7 @@
{
};
-template< typename Set > struct s_iter<Set, set<> >
+template< typename Set > struct s_iter<Set, set0 >
{
typedef forward_iterator_tag category;
};
@@ -79,12 +79,12 @@
struct s_end_iter
{
typedef forward_iterator_tag category;
- typedef s_iter<Set,set<> > next;
+ typedef s_iter<Set,set0 > next;
};
template< typename Set, typename Tail > struct s_iter
: if_<
- is_same< Tail,set<> >
+ is_same< Tail,set0 >
, s_end_iter<Set>
, s_iter_impl<Set,Tail>
>::type
Modified: sandbox/variadic_templates/boost/mpl/set/aux_/set0.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/set/aux_/set0.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/set/aux_/set0.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -12,8 +12,8 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/08/25 12:20:04 $
-// $Revision: 1.2 $
+// $Date: 2009/08/30 12:37:14 $
+// $Revision: 1.3 $
#include <boost/mpl/set_fwd.hpp>
@@ -51,9 +51,9 @@
#endif
-template<> struct set<>
+struct set0
{
- typedef set<> item_;
+ typedef set0 item_;
typedef item_ type;
typedef aux::set_tag tag;
typedef void_ last_masked_;
@@ -61,8 +61,8 @@
typedef long_<0> size;
typedef long_<1> order;
- BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set<>, void const volatile* );
- BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set<>, void const volatile* );
+ BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set0, void const volatile* );
+ BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set0, void const volatile* );
};
}}
Modified: sandbox/variadic_templates/boost/mpl/vector.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/vector.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/vector.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -7,6 +7,7 @@
//! indirectly #includes vector_fwd.hpp.
//!
#include <boost/mpl/vector/vector0.hpp>
+#include <boost/mpl/foldr_pkg.hpp>
namespace boost
{
@@ -14,18 +15,15 @@
{
template
- < typename Head
- , typename... Tail
+ < typename... Values
>
struct
vector
- < Head
- , Tail...
- >
- : v_item
- < Head
- , vector<Tail...>
- >
+ : foldr_pkg
+ < vector0
+ , v_item_fold<arg<1>,arg<2> >
+ , Values...
+ >::type
//!
//!@nv-mpl_repl:
//! This specialization corresponds to all of the vectorI
@@ -36,18 +34,19 @@
//!
//!@nv-mpl_diff:
//! WHAT:
-//! Instead of adding items from the tail, items are added from
-//! head.
+//! 1) Instead of adding items from the tail, items are added from
+//! head.
+//! 2) foldr_pkg is used instead of recursive call of vector.
//! WHY:
-//! The variadic template compiler doesn't allow parameter
-//! packs to be followed by anything else (designated here as the
-//! [PACKS_at_END_CONSTRAINT]). IOW:
-//! vector<typename Head..., typename Tail>
-//! is not allowed because paramerter pack, Head..., is followed
-//! by non-pack Tail.
+//! 1) The variadic template compiler doesn't allow parameter
+//! packs to be followed by anything else (designated here as the
+//! [PACKS_at_END_CONSTRAINT]). IOW:
+//! vector<typename Head..., typename Tail>
+//! is not allowed because paramerter pack, Head..., is followed
+//! by non-pack Tail.
+//! 2) Try and generalize the way sequences are constructed.
//!
{
- typedef vector type;
};
}//exit mpl namespace
Modified: sandbox/variadic_templates/boost/mpl/vector/aux_/item.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/vector/aux_/item.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/vector/aux_/item.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -84,6 +84,15 @@
using Base::item_;
};
+template
+ < typename T
+ , typename Base
+ >
+struct v_item_fold
+ : v_item<T,Base,1>
+{
+};
+
// "erasure" item
template<
typename Base
Modified: sandbox/variadic_templates/boost/mpl/vector/aux_/vector0.hpp
==============================================================================
--- sandbox/variadic_templates/boost/mpl/vector/aux_/vector0.hpp (original)
+++ sandbox/variadic_templates/boost/mpl/vector/aux_/vector0.hpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -11,8 +11,8 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/05/09 19:46:56 $
-// $Revision: 1.6 $
+// $Date: 2009/08/29 22:43:12 $
+// $Revision: 1.8 $
#include <boost/mpl/long.hpp>
#include <boost/mpl/void.hpp>
@@ -42,13 +42,8 @@
namespace mpl
{
- template
- <
- >
struct
-vector
- <
- >
+vector0
//!
//!@nv-mpl_repl:
//! This specialization replaces the vector0 template
@@ -57,7 +52,7 @@
//!
{
typedef aux::vector_tag tag;
- typedef vector type;
+ typedef vector0 type;
static long const push_back0_index=
0
//|
Modified: sandbox/variadic_templates/libs/mpl/test/copy_if.cpp
==============================================================================
--- sandbox/variadic_templates/libs/mpl/test/copy_if.cpp (original)
+++ sandbox/variadic_templates/libs/mpl/test/copy_if.cpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -34,6 +34,8 @@
>::type result;
MPL_ASSERT_RELATION(size<result>::value, ==, 5);
+// MPL_ASSERT(( is_same<void,begin<answer>::type> ));
+ // MPL_ASSERT(( is_same<void,begin<result>::type> ));
MPL_ASSERT(( equal<result,answer> ));
}
Modified: sandbox/variadic_templates/libs/mpl/test/set.cpp
==============================================================================
--- sandbox/variadic_templates/libs/mpl/test/set.cpp (original)
+++ sandbox/variadic_templates/libs/mpl/test/set.cpp 2009-09-01 07:29:50 EDT (Tue, 01 Sep 2009)
@@ -9,8 +9,8 @@
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
-// $Date: 2009/08/27 16:21:07 $
-// $Revision: 1.6 $
+// $Date: 2009/08/30 17:46:06 $
+// $Revision: 1.10 $
#include <boost/mpl/set.hpp>
#include <boost/mpl/contains.hpp>
@@ -40,7 +40,7 @@
MPL_ASSERT_RELATION( size<s>::value, ==, 0 );
MPL_ASSERT(( empty<s> ));
- MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set<> > ));
+ MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0 > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, void_ > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, void_ > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,long>::type, void_ > ));
@@ -70,7 +70,7 @@
MPL_ASSERT_RELATION( size<s>::value, ==, 1 );
MPL_ASSERT_NOT(( empty<s> ));
- MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set<> > ));
+ MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0 > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, int > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, void_ > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,long>::type, void_ > ));
@@ -102,7 +102,7 @@
{
MPL_ASSERT_RELATION( size<s>::value, ==, 2 );
MPL_ASSERT_NOT(( empty<s> ));
- MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set<> > ));
+ MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0 > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, int > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, char > ));
@@ -131,7 +131,7 @@
{
MPL_ASSERT_RELATION( size<s>::value, ==, 3 );
MPL_ASSERT_NOT(( empty<s> ));
- MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set<> > ));
+ MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0 > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, int > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, char > ));
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,long>::type, long > ));
@@ -214,35 +214,26 @@
}
-template< typename S1, typename S2 >
-void numbered_vs_variadic_set_test()
-{
- MPL_ASSERT(( is_same< S1, BOOST_DEDUCED_TYPENAME S1::type > ));
- MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME S2::type, S1 > ));
-}
-
-
MPL_TEST_CASE()
{
+//!
+//!@nv-mpl_diff:
+//! WHAT:
+//! 1) Numbered set types (e.g. set0,set1,set2)
+//! and variables (those with names ending in 2, e.g. s02,s12)
+//! removed.
+//! WHY:
+//! 1) Numbered set's no longer needed.
+//|
typedef mpl::set<> s01;
- typedef mpl::set<> s02;
typedef mpl::set<int> s11;
- typedef mpl::set<int> s12;
typedef mpl::set<int,char> s21;
- typedef mpl::set<int,char> s22;
typedef mpl::set<char,int> s23;
typedef mpl::set<int,char,long> s31;
- typedef mpl::set<int,char,long> s32;
typedef mpl::set<int,long,char> s33;
typedef mpl::set<long,char,int> s34;
-
- numbered_vs_variadic_set_test<s01,s02>();
- numbered_vs_variadic_set_test<s11,s12>();
- numbered_vs_variadic_set_test<s21,s22>();
- numbered_vs_variadic_set_test<s31,s32>();
-
+
basic_set_test<s01,s11,s21,s31>();
- basic_set_test<s02,s12,s22,s32>();
basic_set_test<s01,s11,s23,s31>();
basic_set_test<s01,s11,s23,s33>();
basic_set_test<s01,s11,s23,s34>();
@@ -305,12 +296,10 @@
char,int const,long*,UDT* const,incomplete,abstract
, incomplete volatile&,abstract const&
> s;
-
set_types_variety_test<s>();
set_types_variety_test<s::type>();
}
-
template <class S>
void find_test()
{
@@ -329,3 +318,4 @@
find_test<s>();
find_test<s::type>();
}
+
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