|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73553 - sandbox/coerce/boost/coerce/tag
From: vexocide_at_[hidden]
Date: 2011-08-05 14:48:35
Author: vexocide
Date: 2011-08-05 14:48:35 EDT (Fri, 05 Aug 2011)
New Revision: 73553
URL: http://svn.boost.org/trac/boost/changeset/73553
Log:
Moved assert to the constructor
Text files modified:
sandbox/coerce/boost/coerce/tag/base.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Modified: sandbox/coerce/boost/coerce/tag/base.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/tag/base.hpp (original)
+++ sandbox/coerce/boost/coerce/tag/base.hpp 2011-08-05 14:48:35 EDT (Fri, 05 Aug 2011)
@@ -94,7 +94,9 @@
template <typename Iterator, typename Target, typename Source>
struct parser
: spirit::qi::parser<parser<Iterator, Target, Source> > {
- parser(tag::hex const &) { }
+ parser(tag::hex const &) {
+ BOOST_STATIC_ASSERT(is_integral<Target>::value);
+ }
template <typename Context, typename Iterator_>
struct attribute {
@@ -110,8 +112,6 @@
Skipper const & skipper,
Target & target
) const {
- BOOST_STATIC_ASSERT(is_integral<Target>::value);
-
return spirit::compile<spirit::qi::domain>(
-spirit::standard::no_case_type()["0x"] >> parser_base<Target>()
).parse(first, last, context, skipper, target);
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