$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71599 - in sandbox/coerce: boost boost/coerce libs/coerce/example libs/coerce/test
From: vexocide_at_[hidden]
Date: 2011-04-29 05:10:21
Author: vexocide
Date: 2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
New Revision: 71599
URL: http://svn.boost.org/trac/boost/changeset/71599
Log:
Removed the old tag implementation in preparation for the GSoC
Removed:
   sandbox/coerce/boost/coerce/spirit.hpp
   sandbox/coerce/boost/coerce/tag.hpp
   sandbox/coerce/libs/coerce/example/tag.cpp
Text files modified: 
   sandbox/coerce/boost/coerce.hpp               |    40 +++---------                            
   sandbox/coerce/boost/coerce/reserve.hpp       |   133 ++++++++++++++++----------------------- 
   sandbox/coerce/libs/coerce/example/Jamfile.v2 |     3                                         
   sandbox/coerce/libs/coerce/test/reserve.cpp   |    47 ++++++--------                          
   4 files changed, 85 insertions(+), 138 deletions(-)
Modified: sandbox/coerce/boost/coerce.hpp
==============================================================================
--- sandbox/coerce/boost/coerce.hpp	(original)
+++ sandbox/coerce/boost/coerce.hpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
@@ -8,8 +8,6 @@
 #include <boost/coerce/container.hpp>
 #include <boost/coerce/iterable.hpp>
 #include <boost/coerce/reserve.hpp>
-#include <boost/coerce/spirit.hpp>
-#include <boost/coerce/tag.hpp>
 
 #include <boost/mpl/bool.hpp>
 #include <boost/spirit/home/karma/auto.hpp>
@@ -37,7 +35,7 @@
 
         namespace detail {
 
-            template <typename Target, typename Source, typename Tag>
+            template <typename Target, typename Source>
             struct as {
                 static inline bool
                 call(Target & target, Source const & source) {
@@ -70,7 +68,7 @@
                         iterator_type end = iterable.end();
 
                         bool result = spirit::qi::parse(
-                            iterator, end, wrap<Tag>::call(target));
+                            iterator, end, target);
 
                         if (!result || !((begin < iterator && iterator < end && *iterator == 0) || iterator == end))
                             return false;
@@ -87,14 +85,14 @@
                     ) {
                         call_reserve(
                             target,
-                            traits::reserve_size<Source, Tag>::call(source));
+                            traits::reserve_size<Source>::call(source));
 
                         bool result = spirit::karma::generate(
                             std::back_inserter(target),
 #if SPIRIT_VERSION <= 0x2030
                             spirit::karma::auto_,
 #endif
-                            wrap<Tag>::call(source));
+                            source);
 
                         return result;
                     }
@@ -116,19 +114,19 @@
 
         namespace traits {
 
-            template <typename Target, typename Source, typename Tag, typename Enable = void>
+            template <typename Target, typename Source, typename Enable = void>
             struct as
-                : coerce::detail::as<Target, Source, Tag> { };
+                : coerce::detail::as<Target, Source> { };
 
         }  // namespace traits
 
-        template <typename Target, typename Source, typename Tag>
+        template <typename Target, typename Source>
         inline Target
-        as(Source const & source, Tag const &) {
+        as(Source const & source) {
             Target target;
 
             bool result = traits::as<
-                    Target, Source, Tag
+                    Target, Source
                 >::call(target, source);
 
             if (!result)
@@ -139,22 +137,14 @@
 
         template <typename Target, typename Source>
         inline Target
-        as(Source const & source) {
-            return as<Target, Source>(source, spirit::unused);
-        }
-
-        template <typename Target, typename Source, typename Tag>
-        inline typename disable_if<
-            is_same<Target, Tag>, Target>::type
         as_default(
             Source const & source,
-            Tag const &,
             Target const & default_value = Target()
         ) {
             Target target;
 
             bool result = traits::as<
-                    Target, Source, Tag
+                    Target, Source
                 >::call(target, source);
 
             if (!result)
@@ -163,16 +153,6 @@
             return target;
         }
 
-        template <typename Target, typename Source>
-        inline Target
-        as_default(
-            Source const & source,
-            Target const & default_value = Target()
-        ) {
-            return as_default<Target, Source>(
-                source, spirit::unused, default_value);
-        }
-
     }  // namespace coerce
 
 }  // namespace boost
Modified: sandbox/coerce/boost/coerce/reserve.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/reserve.hpp	(original)
+++ sandbox/coerce/boost/coerce/reserve.hpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
@@ -8,8 +8,6 @@
 #ifndef BOOST_COERCE_RESERVE_HPP
 #define BOOST_COERCE_RESERVE_HPP
 
-#include <boost/coerce/tag.hpp>
-
 #include <boost/config.hpp>
 #include <boost/limits.hpp>
 #include <boost/optional.hpp>
@@ -28,23 +26,23 @@
 
         namespace traits {
 
-            template <typename Type, typename Tag>
+            template <typename Type>
             struct reserve_size_impl {
                 BOOST_STATIC_CONSTANT(std::size_t, value =
                     BOOST_COERCE_UNSPECIALIZED_RESERVE);
             };
 
-            template <typename Tag>
-            struct reserve_size_impl<char, Tag> {
+            template <>
+            struct reserve_size_impl<char> {
                 BOOST_STATIC_CONSTANT(std::size_t, value = 1);
             };
 
-            template <typename Tag>
-            struct reserve_size_impl<wchar_t, Tag> {
+            template <>
+            struct reserve_size_impl<wchar_t> {
                 BOOST_STATIC_CONSTANT(std::size_t, value = 1);
             };
 
-            template <typename Type, typename Tag>
+            template <typename Type>
             struct reserve_size_impl_integral {
                 BOOST_STATIC_CONSTANT(std::size_t, value =
                     std::numeric_limits<Type>::is_signed +
@@ -52,64 +50,43 @@
                     std::numeric_limits<Type>::digits10);
             };
 
-            template <typename Type>
-            struct reserve_size_impl_integral<Type, tag::bin_type> {
-                BOOST_STATIC_CONSTANT(std::size_t, value =
-                    1 +
-                    std::numeric_limits<Type>::digits);
-            };
-
-            template <typename Type>
-            struct reserve_size_impl_integral<Type, tag::oct_type> {
-                BOOST_STATIC_CONSTANT(std::size_t, value =
-                    1 +
-                    (std::numeric_limits<Type>::digits / 3));
-            };
-
-            template <typename Type>
-            struct reserve_size_impl_integral<Type, tag::hex_type> {
-                BOOST_STATIC_CONSTANT(std::size_t, value =
-                    1 +
-                    (std::numeric_limits<Type>::digits / 4));
-            };
-
-            template <typename Tag>
-            struct reserve_size_impl<int, Tag>
-                : reserve_size_impl_integral<int, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<short, Tag>
-                : reserve_size_impl_integral<short, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<long, Tag>
-                : reserve_size_impl_integral<long, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<unsigned int, Tag>
-                : reserve_size_impl_integral<unsigned int, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<unsigned short, Tag>
-                : reserve_size_impl_integral<unsigned short, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<unsigned long, Tag>
-                : reserve_size_impl_integral<unsigned long, Tag> { };
+            template <>
+            struct reserve_size_impl<int>
+                : reserve_size_impl_integral<int> { };
+
+            template <>
+            struct reserve_size_impl<short>
+                : reserve_size_impl_integral<short> { };
+
+            template <>
+            struct reserve_size_impl<long>
+                : reserve_size_impl_integral<long> { };
+
+            template <>
+            struct reserve_size_impl<unsigned int>
+                : reserve_size_impl_integral<unsigned int> { };
+
+            template <>
+            struct reserve_size_impl<unsigned short>
+                : reserve_size_impl_integral<unsigned short> { };
+
+            template <>
+            struct reserve_size_impl<unsigned long>
+                : reserve_size_impl_integral<unsigned long> { };
 
 #ifdef BOOST_HAS_LONG_LONG
 
-            template <typename Tag>
-            struct reserve_size_impl<boost::long_long_type, Tag>
-                : reserve_size_impl_integral<boost::long_long_type, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<boost::ulong_long_type, Tag>
-                : reserve_size_impl_integral<boost::ulong_long_type, Tag> { };
+            template <>
+            struct reserve_size_impl<boost::long_long_type>
+                : reserve_size_impl_integral<boost::long_long_type> { };
+
+            template <>
+            struct reserve_size_impl<boost::ulong_long_type>
+                : reserve_size_impl_integral<boost::ulong_long_type> { };
 
 #endif  // BOOST_HAS_LONG_LONG
 
-            template <typename Type, typename Tag>
+            template <typename Type>
             struct reserve_size_impl_floating_point {
                 BOOST_STATIC_CONSTANT(std::size_t, value =
                     std::numeric_limits<Type>::is_signed +
@@ -117,28 +94,28 @@
                     std::numeric_limits<Type>::digits10);
             };
 
-            template <typename Tag>
-            struct reserve_size_impl<float, Tag>
-                : reserve_size_impl_floating_point<float, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<double, Tag>
-                : reserve_size_impl_floating_point<double, Tag> { };
-
-            template <typename Tag>
-            struct reserve_size_impl<long double, Tag>
-                : reserve_size_impl_floating_point<long double, Tag> { };
+            template <>
+            struct reserve_size_impl<float>
+                : reserve_size_impl_floating_point<float> { };
+
+            template <>
+            struct reserve_size_impl<double>
+                : reserve_size_impl_floating_point<double> { };
+
+            template <>
+            struct reserve_size_impl<long double>
+                : reserve_size_impl_floating_point<long double> { };
 
-            template <typename Tag>
-            struct reserve_size_impl<bool, Tag> {
+            template <>
+            struct reserve_size_impl<bool> {
                 BOOST_STATIC_CONSTANT(std::size_t, value = 5);
             };
 
-            template <typename Type, typename Tag>
-            struct reserve_size_impl<boost::optional<Type>, Tag>
-                : reserve_size_impl<Type, Tag> { };
+            template <typename Type>
+            struct reserve_size_impl<boost::optional<Type> >
+                : reserve_size_impl<Type> { };
 
-            template <typename Type, typename Tag, typename Enable = void>
+            template <typename Type, typename Enable = void>
             struct reserve_size {
                 typedef std::size_t type;
 
@@ -147,7 +124,7 @@
                     return reserve_size_impl<
                         typename remove_const<
                             typename remove_reference<Type>::type
-                        >::type, Tag>::value;
+                        >::type>::value;
                 }
             };
 
Deleted: sandbox/coerce/boost/coerce/spirit.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/spirit.hpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
+++ (empty file)
@@ -1,226 +0,0 @@
-//              Copyright Jeroen Habraken 2010.
-//
-// 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_SPIRIT_HPP
-#define BOOST_COERCE_SPIRIT_HPP
-
-#include <boost/limits.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/spirit/home/karma/auto.hpp>
-#include <boost/spirit/home/karma/numeric/real.hpp>
-#include <boost/spirit/home/karma/numeric/real_policies.hpp>
-#include <boost/spirit/home/qi/auto.hpp>
-#include <boost/spirit/home/support/unused.hpp>
-#include <boost/spirit/include/version.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-namespace boost {
-
-    namespace coerce {
-
-        namespace detail {
-
-            template <typename Type, typename Tag>
-            struct wrapped {
-                wrapped(Type & value)
-                    : value_(value) { }
-
-                inline Type const &
-                get_value() const {
-                    return value_;
-                }
-
-                inline void
-                set_value(Type const & value) {
-                    value_ = value;
-                } 
-                
-                private:
-                    Type & value_;
-            };
-
-            template <typename Tag>
-            struct wrap {
-                template <typename Type>
-                static inline wrapped<
-                    typename remove_reference<Type>::type,
-                    Tag
-                >
-                call(Type & value) {
-                    return value;
-                }
-            };
-
-            template <>
-            struct wrap<spirit::unused_type> {
-                template <typename Type>
-                struct result {
-                    typedef typename mpl::if_<
-                        is_floating_point<Type>,
-                        wrapped<
-                            typename remove_reference<Type>::type,
-                            spirit::unused_type
-                        >,
-                        Type &
-                    >::type type;
-                };
-
-                template <typename Type>
-                static inline typename result<Type>::type
-                call(Type & value) {
-                    return value;
-                }
-            };
-
-            template <typename Target, typename Tag>
-            struct create_parser {
-                typedef typename Tag::template parser<Target>::type type;
-
-                static inline type const
-                call() {
-                    return Tag::template parser<Target>::call();
-                }
-            };
-
-            template <typename Target>
-            struct create_parser<Target, spirit::unused_type>
-                : spirit::traits::create_parser<Target> { };
-
-            template <typename Source, typename Tag>
-            struct create_generator {
-                typedef typename Tag::template generator<Source>::type type;
-
-                static inline type const
-                call() {
-                    return Tag::template generator<Source>::call();
-                }
-            };
-
-            template <typename Source>
-            struct create_generator<Source, spirit::unused_type>
-                : spirit::traits::create_generator<Source> { };
-
-            template <typename Source>
-            struct real_policies
-                : spirit::karma::real_policies<Source> {
-                static inline unsigned
-                precision(Source const &) {
-                    return std::numeric_limits<Source>::digits10 + 1;
-                }
-            };
-
-            template <typename Source>
-            struct create_generator_floating_point {
-                typedef spirit::karma::real_generator<
-                    Source,
-                    real_policies<typename remove_const<Source>::type>
-                > type;
-
-                static inline type const
-                call() {
-                    return type();
-                }
-            };
-
-            template <>
-            struct create_generator<float, spirit::unused_type>
-                : create_generator_floating_point<float> { };
-
-            template <>
-            struct create_generator<double, spirit::unused_type>
-                : create_generator_floating_point<double> { };
-
-            template <>
-            struct create_generator<long double, spirit::unused_type>
-                : create_generator_floating_point<long double> { };
-
-        }  // namespace detail 
-
-    }  // namespace coerce
-
-    namespace spirit {
-
-        namespace traits {
-
-            template <typename Target, typename Tag>
-            struct create_parser<coerce::detail::wrapped<Target, Tag> >
-                : coerce::detail::create_parser<
-                    // NOTE, reference already remove in coerce::detail::wrap
-                    typename remove_const<Target>::type,
-                    Tag
-                > { };
-
-            template <typename Target, typename Tag>
-            struct assign_to_attribute_from_value<
-                coerce::detail::wrapped<Target, Tag>,
-                typename remove_const<Target>::type
-            > {
-                static inline void
-                call(
-                    Target const & value,
-                    coerce::detail::wrapped<Target, Tag> & attribute
-                ) {
-                    attribute.set_value(value);
-                }
-            };
-
-            template <typename Target, typename Tag, typename Attrib>
-            struct assign_to_attribute_from_value<
-                coerce::detail::wrapped<Target, Tag>,
-                Attrib
-            > {
-                BOOST_STATIC_ASSERT(sizeof(Target) == 0);
-            };
-
-            template <typename Source, typename Tag>
-            struct create_generator<coerce::detail::wrapped<Source, Tag> >
-                : coerce::detail::create_generator<
-                    // NOTE, reference already remove in coerce::detail::wrap
-                    typename remove_const<Source>::type,
-                    Tag
-                > { };
-
-            template <typename Source, typename Tag>
-            struct extract_from_attribute<
-#if SPIRIT_VERSION >= 2040
-                coerce::detail::wrapped<Source, Tag>,
-                typename remove_const<Source>::type
-#else
-                coerce::detail::wrapped<Source, Tag>
-#endif
-            > {
-                typedef Source type;
-
-                template <typename Context>
-                static inline type const &
-                call(
-                    coerce::detail::wrapped<Source, Tag> const & attribute,
-                    Context &
-                ) {
-                    return attribute.get_value();
-                }
-            };
-
-#if SPIRIT_VERSION >= 2040
-            template <typename Source, typename Tag, typename Attrib>
-            struct extract_from_attribute<
-                coerce::detail::wrapped<Source, Tag>,
-                Attrib
-            > {
-                BOOST_STATIC_ASSERT(sizeof(Source) == 0);
-            };
-#endif
-
-        }  // namespace traits
-
-    }  // namespace spirit
-
-}  // namespace boost
-
-#endif  // BOOST_COERCE_SPIRIT_HPP
Deleted: sandbox/coerce/boost/coerce/tag.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/tag.hpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
+++ (empty file)
@@ -1,150 +0,0 @@
-//              Copyright Jeroen Habraken 2010.
-//
-// 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_TAG_HPP
-#define BOOST_COERCE_TAG_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/proto/deep_copy.hpp>
-#include <boost/spirit/home/karma/auto.hpp>
-#include <boost/spirit/home/karma/numeric.hpp>
-#include <boost/spirit/home/qi/auto.hpp>
-#include <boost/spirit/home/qi/directive/no_case.hpp>
-#include <boost/spirit/home/qi/numeric.hpp>
-#include <boost/spirit/home/qi/operator/sequence.hpp>
-#include <boost/spirit/home/qi/operator/optional.hpp>
-#include <boost/spirit/home/qi/string/lit.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_signed.hpp>
-
-namespace boost {
-
-    namespace coerce {
-
-        namespace detail {
-
-            // TODO, numeric_parser and numeric_generator: http://codepad.org/qbneDiqx
-
-        }  // namespace detail
-
-        namespace tag {
-
-            struct bin_type {
-                template <typename Target>
-                struct parser {
-                    BOOST_STATIC_ASSERT(is_integral<Target>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Target>,
-                        spirit::qi::int_parser<Target, 2>,
-                        spirit::qi::uint_parser<Target, 2>
-                    >::type type;
-                
-                    static inline type const
-                    call() {
-                        return type();
-                    }
-                };
-
-                template <typename Source>
-                struct generator {
-                    BOOST_STATIC_ASSERT(is_integral<Source>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Source>,
-                        spirit::karma::int_generator<Source, 2>,
-                        spirit::karma::uint_generator<Source, 2>
-                    >::type type;
-
-                    static inline type const
-                    call() {
-                        return type();
-                    }
-                };
-            } const bin = bin_type();
-
-            struct oct_type {
-                template <typename Target>
-                struct parser {
-                    BOOST_STATIC_ASSERT(is_integral<Target>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Target>,
-                        spirit::qi::int_parser<Target, 8>,
-                        spirit::qi::uint_parser<Target, 8>
-                    >::type type;
-
-                    static inline type const
-                    call() {
-                        return type();
-                    }
-                };
-
-                template <typename Source>
-                struct generator {
-                    BOOST_STATIC_ASSERT(is_integral<Source>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Source>,
-                        spirit::karma::int_generator<Source, 8>,
-                        spirit::karma::uint_generator<Source, 8>
-                    >::type type;
-
-                    static inline type const
-                    call() {
-                        return type();
-                    }
-                };
-            } const oct = oct_type();
-
-            struct hex_type {
-                template <typename Target>
-                struct parser {
-                    BOOST_STATIC_ASSERT(is_integral<Target>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Target>,
-                        spirit::qi::int_parser<Target, 16>,
-                        spirit::qi::uint_parser<Target, 16>
-                    >::type parser_type;
-
-                    typedef typename proto::result_of::deep_copy<
-                        BOOST_TYPEOF_TPL((-spirit::standard::no_case["0x"] >> parser_type()))
-                    >::type type;
-
-                    static inline type const
-                    call() {
-                        return proto::deep_copy(
-                            -spirit::standard::no_case["0x"] >> parser_type());
-                    }
-                };
-
-                template <typename Source>
-                struct generator {
-                    BOOST_STATIC_ASSERT(is_integral<Source>::value);
-
-                    typedef typename mpl::if_<
-                        is_signed<Source>,
-                        spirit::karma::int_generator<Source, 16>,
-                        spirit::karma::uint_generator<Source, 16>
-                    >::type type;
-
-                    static inline type const
-                    call() {
-                        return type();
-                    }
-                };
-            } const hex = hex_type();
-
-        }  // namespace tag
-
-    }  // namespace coerce
-
-}  // namespace boost
-
-#endif  // BOOST_COERCE_TAG_HPP
Modified: sandbox/coerce/libs/coerce/example/Jamfile.v2
==============================================================================
--- sandbox/coerce/libs/coerce/example/Jamfile.v2	(original)
+++ sandbox/coerce/libs/coerce/example/Jamfile.v2	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
@@ -16,6 +16,3 @@
 
 exe optional :
     optional.cpp ;
-
-exe tag :
-    tag.cpp ;
Deleted: sandbox/coerce/libs/coerce/example/tag.cpp
==============================================================================
--- sandbox/coerce/libs/coerce/example/tag.cpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
+++ (empty file)
@@ -1,22 +0,0 @@
-//              Copyright Jeroen Habraken 2010.
-//
-// 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)
-
-#include <boost/coerce.hpp>
-
-#include <iostream>
-#include <ostream>
-#include <string>
-
-int
-main() {
-    using namespace boost;
-    
-    // A coerce from a binary string representation to integer ..
-    std::cout << coerce::as<int>("10111", coerce::tag::bin) << std::endl;
-
-    // .. and vice-versa
-    std::cout << coerce::as<std::string>(23, coerce::tag::bin) << std::endl;
-}
Modified: sandbox/coerce/libs/coerce/test/reserve.cpp
==============================================================================
--- sandbox/coerce/libs/coerce/test/reserve.cpp	(original)
+++ sandbox/coerce/libs/coerce/test/reserve.cpp	2011-04-29 05:10:20 EDT (Fri, 29 Apr 2011)
@@ -15,37 +15,30 @@
 #include <vector>
 
 BOOST_AUTO_TEST_CASE(reserve_size) {
-    using namespace boost::coerce::tag;
-
     using boost::coerce::traits::reserve_size;
-    using boost::spirit::unused_type;
 
-    BOOST_CHECK_GT((reserve_size<char, unused_type>::call('\0')), 0u);
-    BOOST_CHECK_GT((reserve_size<wchar_t, unused_type>::call(L'\0')), 0u);
+    BOOST_CHECK_GT(reserve_size<char>::call('\0'), 0u);
+    BOOST_CHECK_GT(reserve_size<wchar_t>::call(L'\0'), 0u);
     short const test_short = 0;
-    BOOST_CHECK_GT((reserve_size<short, unused_type>::call(test_short)), 0u);
-    BOOST_CHECK_GT((reserve_size<int, unused_type>::call(0)), 0u);
-    BOOST_CHECK_GT((reserve_size<long, unused_type>::call(0l)), 0u);
+    BOOST_CHECK_GT(reserve_size<short>::call(test_short), 0u);
+    BOOST_CHECK_GT(reserve_size<int>::call(0), 0u);
+    BOOST_CHECK_GT(reserve_size<long>::call(0l), 0u);
     unsigned short const test_unsigned_short = 0u;
-    BOOST_CHECK_GT((reserve_size<unsigned short, unused_type>::call(
-        test_unsigned_short)), 0u);
-    BOOST_CHECK_GT((reserve_size<unsigned int, unused_type>::call(0u)), 0u);
-    BOOST_CHECK_GT((reserve_size<unsigned long, unused_type>::call(0ul)), 0u);
-    BOOST_CHECK_GT((reserve_size<float, unused_type>::call(0.0f)), 0u);
-    BOOST_CHECK_GT((reserve_size<double, unused_type>::call(0.0)), 0u);
-    BOOST_CHECK_GT((reserve_size<long double, unused_type>::call(0.0l)), 0u);
-    BOOST_CHECK_GT((reserve_size<bool, unused_type>::call(false)), 0u);
-
-    BOOST_CHECK_GT((reserve_size<char const, unused_type>::call('\0')), 0u);
-    BOOST_CHECK_GT((reserve_size<char &, unused_type>::call('\0')), 0u);
-    BOOST_CHECK_GT((reserve_size<char const &, unused_type>::call('\0')), 0u);
-
-    BOOST_CHECK_GT((reserve_size<boost::optional<char>, unused_type>::call(
-        boost::optional<char>('\0'))), 0u);
-
-    BOOST_CHECK_GT((reserve_size<int, bin_type>::call(0)), 0u);
-    BOOST_CHECK_GT((reserve_size<int, oct_type>::call(0)), 0u);
-    BOOST_CHECK_GT((reserve_size<int, hex_type>::call(0)), 0u);
+    BOOST_CHECK_GT(reserve_size<unsigned short>::call(
+        test_unsigned_short), 0u);
+    BOOST_CHECK_GT(reserve_size<unsigned int>::call(0u), 0u);
+    BOOST_CHECK_GT(reserve_size<unsigned long>::call(0ul), 0u);
+    BOOST_CHECK_GT(reserve_size<float>::call(0.0f), 0u);
+    BOOST_CHECK_GT(reserve_size<double>::call(0.0), 0u);
+    BOOST_CHECK_GT(reserve_size<long double>::call(0.0l), 0u);
+    BOOST_CHECK_GT(reserve_size<bool>::call(false), 0u);
+
+    BOOST_CHECK_GT(reserve_size<char const>::call('\0'), 0u);
+    BOOST_CHECK_GT(reserve_size<char &>::call('\0'), 0u);
+    BOOST_CHECK_GT(reserve_size<char const &>::call('\0'), 0u);
+
+    BOOST_CHECK_GT(reserve_size<boost::optional<char> >::call(
+        boost::optional<char>('\0')), 0u);
 }
 
 BOOST_AUTO_TEST_CASE(has_reserve) {