Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77995 - in sandbox/coerce/boost/coerce: . detail
From: vexocide_at_[hidden]
Date: 2012-04-15 09:02:37


Author: vexocide
Date: 2012-04-15 09:02:36 EDT (Sun, 15 Apr 2012)
New Revision: 77995
URL: http://svn.boost.org/trac/boost/changeset/77995

Log:
Added a missing include and removed is_tag in favour of disambiguation using is_convertible
Removed:
   sandbox/coerce/boost/coerce/detail/tag.hpp
Text files modified:
   sandbox/coerce/boost/coerce/coerce.hpp | 4 ++--
   sandbox/coerce/boost/coerce/detail/karma.hpp | 1 +
   sandbox/coerce/boost/coerce/detail/spirit.hpp | 8 ++++----
   3 files changed, 7 insertions(+), 6 deletions(-)

Modified: sandbox/coerce/boost/coerce/coerce.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/coerce.hpp (original)
+++ sandbox/coerce/boost/coerce/coerce.hpp 2012-04-15 09:02:36 EDT (Sun, 15 Apr 2012)
@@ -12,11 +12,11 @@
 #endif
 
 #include <boost/coerce/detail/spirit.hpp>
-#include <boost/coerce/detail/tag.hpp>
 #include <boost/coerce/string.hpp>
 #include <boost/coerce/tag.hpp>
 
 #include <boost/throw_exception.hpp>
+#include <boost/type_traits/is_convertible.hpp>
 #include <boost/utility/enable_if.hpp>
 
 #include <typeinfo> // for std::bad_cast
@@ -66,7 +66,7 @@
     }
 
     template <typename Target, typename Source, typename Tag>
- inline typename enable_if<detail::is_tag<Tag>, Target>::type
+ inline typename disable_if<is_convertible<Tag, Target>, Target>::type
     as_default(
         Source const & source,
         Tag const & tag,

Modified: sandbox/coerce/boost/coerce/detail/karma.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/detail/karma.hpp (original)
+++ sandbox/coerce/boost/coerce/detail/karma.hpp 2012-04-15 09:02:36 EDT (Sun, 15 Apr 2012)
@@ -19,6 +19,7 @@
 #include <boost/spirit/home/karma/generate.hpp>
 #include <boost/spirit/home/karma/numeric.hpp>
 #include <boost/spirit/home/karma/operator/optional.hpp>
+#include <boost/spirit/home/karma/string/lit.hpp>
 
 namespace boost { namespace coerce { namespace detail {
 

Modified: sandbox/coerce/boost/coerce/detail/spirit.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/detail/spirit.hpp (original)
+++ sandbox/coerce/boost/coerce/detail/spirit.hpp 2012-04-15 09:02:36 EDT (Sun, 15 Apr 2012)
@@ -19,9 +19,9 @@
 
 namespace boost { namespace coerce { namespace detail {
 
- template <typename U, typename V>
+ template <typename T, typename U>
     struct spirit {
- BOOST_STATIC_ASSERT(sizeof(U) == 0);
+ BOOST_STATIC_ASSERT(sizeof(T) == 0);
     };
 
     template <>
@@ -29,8 +29,8 @@
         typedef qi type;
     };
 
- template <typename U>
- struct spirit<U, mpl::true_> {
+ template <typename T>
+ struct spirit<T, mpl::true_> {
         typedef karma type;
     };
 

Deleted: sandbox/coerce/boost/coerce/detail/tag.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/detail/tag.hpp 2012-04-15 09:02:36 EDT (Sun, 15 Apr 2012)
+++ (empty file)
@@ -1,31 +0,0 @@
-// Copyright Jeroen Habraken 2011.
-//
-// 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)
-
-#ifndef BOOST_COERCE_DETAIL_TAG_HPP
-#define BOOST_COERCE_DETAIL_TAG_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/mpl/has_xxx.hpp>
-#include <boost/mpl/or.hpp>
-
-namespace boost { namespace coerce { namespace detail {
-
- BOOST_MPL_HAS_XXX_TEMPLATE_DEF(parser)
- BOOST_MPL_HAS_XXX_TEMPLATE_DEF(generator)
-
- template <typename T>
- struct is_tag
- : mpl::or_<
- has_parser<T>,
- has_generator<T>
- > { };
-
-} } } // namespace boost::coerce::detail
-
-#endif // BOOST_COERCE_DETAIL_TAG_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