Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66531 - sandbox/statistics/support/boost/assign/v2/detail/config
From: erwann.rogard_at_[hidden]
Date: 2010-11-12 11:04:29


Author: e_r
Date: 2010-11-12 11:04:20 EST (Fri, 12 Nov 2010)
New Revision: 66531
URL: http://svn.boost.org/trac/boost/changeset/66531

Log:
adding files to /boost/assign/v2/detail/config
Added:
   sandbox/statistics/support/boost/assign/v2/detail/config/enable_cpp0x.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/config/limit_arity.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/config/limit_csv_arity.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/config/limit_lvalue_const_arity.hpp (contents, props changed)

Added: sandbox/statistics/support/boost/assign/v2/detail/config/enable_cpp0x.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/config/enable_cpp0x.hpp 2010-11-12 11:04:20 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+////////////////////////////////////////////////////////////////////////////
+#include <boost/preprocessor/logical/and.hpp>
+#ifndef BOOST_ASSIGN_V2_ENABLE_CPP0X
+#if __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
+#define BOOST_ASSIGN_V2_ENABLE_CPP0X 1
+#else
+#define BOOST_ASSIGN_V2_ENABLE_CPP0X 0
+#endif
+#endif
+
+// -- TODO add check for MSVC when support for variadic template becomes
+// available
+//
+// -- In principle this is more portable,
+// #include <boost/preprocessor/logical/bool.hpp>
+// #define BOOST_ASSIGN_V2_ENABLE_CPP0X \
+// BOOST_PP_BOOL(__cplusplus > 199711L) \
+// /**/
+// but GCC is non-conformant.
+//
+// -- Sources:
+// http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros
+// http://www2.research.att.com/~bs/C++0xFAQ.html
+// http://msdn.microsoft.com/en-us/library/dd465215.aspx

Added: sandbox/statistics/support/boost/assign/v2/detail/config/limit_arity.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/config/limit_arity.hpp 2010-11-12 11:04:20 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,33 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/mpl/limits/arity.hpp>
+
+#ifndef BOOST_ASSIGN_V2_LIMIT_ARITY
+#define BOOST_ASSIGN_V2_LIMIT_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#endif
+
+#if BOOST_ASSIGN_V2_LIMIT_ARITY_BOUND > BOOST_MPL_LIMIT_METAFUNCTION_ARITY
+#error
+// This is required for a metafunction class that returns the result type of a
+// functors.
+#endif
+
+// Functors are by default overloaded as follows:
+//
+// n = BOOST_ASSIGN_V2_LIMIT_ARITY
+// Overload | Arity
+// -------------------------------------
+// f() | 0
+// f(x[0]) | 1
+// f(x[0], x[1]) | 2
+// ...
+// f(x[0], ...., x[n-1]) | n
+

Added: sandbox/statistics/support/boost/assign/v2/detail/config/limit_csv_arity.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/config/limit_csv_arity.hpp 2010-11-12 11:04:20 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,13 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_ASSIGN_V2_LIMIT_CSV_ARITY
+#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 20
+#endif

Added: sandbox/statistics/support/boost/assign/v2/detail/config/limit_lvalue_const_arity.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/config/limit_lvalue_const_arity.hpp 2010-11-12 11:04:20 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to 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) //
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/mpl/limits/arity.hpp>
+
+#ifndef BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
+#define BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY 2
+#endif
+
+// This constant defines the maximum arity for which functors are overloaded
+// for any combination of lvalue and const under C++03 (the restriction does
+// not apply to C++0x). Be warned, therefore, that the number of function
+// overloads increases geometrically with this number.
+
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#if BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY > BOOST_ASSIGN_V2_LIMIT_ARITY
+#error
+#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