|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-07-15 12:15:09
Author: hkaiser
Date: 2008-07-15 12:15:08 EDT (Tue, 15 Jul 2008)
New Revision: 47449
URL: http://svn.boost.org/trac/boost/changeset/47449
Log:
Spirit: brought test in sync with branch
Text files modified:
trunk/libs/spirit/test/karma/real_numerics.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
Modified: trunk/libs/spirit/test/karma/real_numerics.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/real_numerics.cpp (original)
+++ trunk/libs/spirit/test/karma/real_numerics.cpp 2008-07-15 12:15:08 EDT (Tue, 15 Jul 2008)
@@ -5,6 +5,7 @@
//#define KARMA_FAIL_COMPILATION
+#include <boost/version.hpp>
#include <boost/config/warning_disable.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/math/concepts/real_concept.hpp>
@@ -65,6 +66,9 @@
static bool const force_sign = true;
};
+// support for using real_concept with a Karma generator has been implemented
+// in Boost versions > 1.36 only
+#if BOOST_VERSION > 103600
///////////////////////////////////////////////////////////////////////////////
// We need to specialize is_real_lit_tag to allow to use a real_concept as a
// literal below
@@ -74,6 +78,7 @@
struct is_real_lit_tag<boost::math::concepts::real_concept, Domain>
: boost::mpl::true_ {};
}}
+#endif
///////////////////////////////////////////////////////////////////////////////
int
@@ -390,6 +395,9 @@
BOOST_TEST(test(" 0.0", upper[signed_], 0.0));
}
+// support for using real_concept with a Karma generator has been implemented
+// in Boost versions > 1.36 only
+#if BOOST_VERSION > 103600
{
using boost::math::concepts::real_concept;
typedef karma::real_spec<real_concept> custom_type;
@@ -435,6 +443,7 @@
BOOST_TEST(test("12342.0", custom(real_concept(12342.))));
BOOST_TEST(test("1.234e05", custom(real_concept(123420.))));
}
-
+#endif
+
return boost::report_errors();
}
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