Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81157 - in trunk/boost/spirit/home: . karma/numeric/detail karma/operator
From: hartmut.kaiser_at_[hidden]
Date: 2012-11-03 10:21:03


Author: hkaiser
Date: 2012-11-03 10:21:02 EDT (Sat, 03 Nov 2012)
New Revision: 81157
URL: http://svn.boost.org/trac/boost/changeset/81157

Log:
Spirit: fixing some eol inconsistencies.
Text files modified:
   trunk/boost/spirit/home/karma.hpp | 4
   trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 156 ++++++++++++++++++++--------------------
   trunk/boost/spirit/home/karma/operator/list.hpp | 32 ++++----
   3 files changed, 96 insertions(+), 96 deletions(-)

Modified: trunk/boost/spirit/home/karma.hpp
==============================================================================
--- trunk/boost/spirit/home/karma.hpp (original)
+++ trunk/boost/spirit/home/karma.hpp 2012-11-03 10:21:02 EDT (Sat, 03 Nov 2012)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2011 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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)
 
 #if !defined(SPIRIT_KARMA_CORE_MARCH_06_2007_0833PM)

Modified: trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2012-11-03 10:21:02 EDT (Sat, 03 Nov 2012)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2011 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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)
 
 #if !defined(BOOST_SPIRIT_KARMA_NUMERIC_UTILS_FEB_23_2007_0841PM)
@@ -25,11 +25,11 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// The value BOOST_KARMA_NUMERICS_LOOP_UNROLL specifies, how to unroll the
+// The value BOOST_KARMA_NUMERICS_LOOP_UNROLL specifies, how to unroll the
 // integer string generation loop (see below).
 //
-// Set the value to some integer in between 0 (no unrolling) and the
-// largest expected generated integer string length (complete unrolling).
+// Set the value to some integer in between 0 (no unrolling) and the
+// largest expected generated integer string length (complete unrolling).
 // If not specified, this value defaults to 6.
 //
 ///////////////////////////////////////////////////////////////////////////////
@@ -37,15 +37,15 @@
 #define BOOST_KARMA_NUMERICS_LOOP_UNROLL 6
 #endif
 
-#if BOOST_KARMA_NUMERICS_LOOP_UNROLL < 0
+#if BOOST_KARMA_NUMERICS_LOOP_UNROLL < 0
 #error "Please set the BOOST_KARMA_NUMERICS_LOOP_UNROLL to a non-negative value!"
 #endif
 
 namespace boost { namespace spirit { namespace traits
-{
+{
     ///////////////////////////////////////////////////////////////////////
     //
- // return the absolute value from a given number, avoiding over- and
+ // return the absolute value from a given number, avoiding over- and
     // underflow
     //
     ///////////////////////////////////////////////////////////////////////
@@ -153,36 +153,36 @@
     template <typename T, typename Enable/* = void*/>
     struct is_negative
     {
- static bool call(T n)
- {
- return (n < 0) ? true : false;
+ static bool call(T n)
+ {
+ return (n < 0) ? true : false;
         }
     };
 
     template <>
     struct is_negative<float>
     {
- static bool call(float n)
- {
- return (spirit::detail::signbit)(n) ? true : false;
+ static bool call(float n)
+ {
+ return (spirit::detail::signbit)(n) ? true : false;
         }
     };
 
     template <>
     struct is_negative<double>
     {
- static bool call(double n)
- {
- return (spirit::detail::signbit)(n) ? true : false;
+ static bool call(double n)
+ {
+ return (spirit::detail::signbit)(n) ? true : false;
         }
     };
 
     template <>
     struct is_negative<long double>
     {
- static bool call(long double n)
- {
- return (spirit::detail::signbit)(n) ? true : false;
+ static bool call(long double n)
+ {
+ return (spirit::detail::signbit)(n) ? true : false;
         }
     };
 
@@ -196,36 +196,36 @@
     template <typename T, typename Enable/* = void*/>
     struct is_zero
     {
- static bool call(T n)
- {
- return (n == 0) ? true : false;
+ static bool call(T n)
+ {
+ return (n == 0) ? true : false;
         }
     };
 
     template <>
     struct is_zero<float>
     {
- static bool call(float n)
- {
- return (math::fpclassify)(n) == FP_ZERO;
+ static bool call(float n)
+ {
+ return (math::fpclassify)(n) == FP_ZERO;
         }
     };
 
     template <>
     struct is_zero<double>
     {
- static bool call(double n)
- {
- return (math::fpclassify)(n) == FP_ZERO;
+ static bool call(double n)
+ {
+ return (math::fpclassify)(n) == FP_ZERO;
         }
     };
 
     template <>
     struct is_zero<long double>
     {
- static bool call(long double n)
- {
- return (math::fpclassify)(n) == FP_ZERO;
+ static bool call(long double n)
+ {
+ return (math::fpclassify)(n) == FP_ZERO;
         }
     };
 
@@ -239,8 +239,8 @@
     template <typename T, typename Enable/* = void*/>
     struct is_nan
     {
- static bool call(T n)
- {
+ static bool call(T n)
+ {
             // NaN numbers are not equal to anything
             return (n != n) ? true : false;
         }
@@ -249,27 +249,27 @@
     template <>
     struct is_nan<float>
     {
- static bool call(float n)
- {
- return (math::fpclassify)(n) == FP_NAN;
+ static bool call(float n)
+ {
+ return (math::fpclassify)(n) == FP_NAN;
         }
     };
 
     template <>
     struct is_nan<double>
     {
- static bool call(double n)
- {
- return (math::fpclassify)(n) == FP_NAN;
+ static bool call(double n)
+ {
+ return (math::fpclassify)(n) == FP_NAN;
         }
     };
 
     template <>
     struct is_nan<long double>
     {
- static bool call(long double n)
- {
- return (math::fpclassify)(n) == FP_NAN;
+ static bool call(long double n)
+ {
+ return (math::fpclassify)(n) == FP_NAN;
         }
     };
 
@@ -283,36 +283,36 @@
     template <typename T, typename Enable/* = void*/>
     struct is_infinite
     {
- static bool call(T n)
- {
- return (n == std::numeric_limits<T>::infinity()) ? true : false;
+ static bool call(T n)
+ {
+ return (n == std::numeric_limits<T>::infinity()) ? true : false;
         }
     };
 
     template <>
     struct is_infinite<float>
     {
- static bool call(float n)
- {
- return (math::fpclassify)(n) == FP_INFINITE;
+ static bool call(float n)
+ {
+ return (math::fpclassify)(n) == FP_INFINITE;
         }
     };
 
     template <>
     struct is_infinite<double>
     {
- static bool call(double n)
- {
- return (math::fpclassify)(n) == FP_INFINITE;
+ static bool call(double n)
+ {
+ return (math::fpclassify)(n) == FP_INFINITE;
         }
     };
 
     template <>
     struct is_infinite<long double>
     {
- static bool call(long double n)
- {
- return (math::fpclassify)(n) == FP_INFINITE;
+ static bool call(long double n)
+ {
+ return (math::fpclassify)(n) == FP_INFINITE;
         }
     };
 
@@ -343,7 +343,7 @@
         template <typename T>
         static long call(T n, mpl::false_)
         {
- // allow for ADL to find the correct overload for floor and
+ // allow for ADL to find the correct overload for floor and
             // lround
             using namespace std;
             return lround(floor(n));
@@ -367,19 +367,19 @@
     {
         static long call(float n, mpl::false_)
         {
- return test_negative(n) ? static_cast<long>(std::ceil(n)) :
+ return test_negative(n) ? static_cast<long>(std::ceil(n)) :
                 static_cast<long>(std::floor(n));
         }
 
         static long call(double n, mpl::false_)
         {
- return test_negative(n) ? static_cast<long>(std::ceil(n)) :
+ return test_negative(n) ? static_cast<long>(std::ceil(n)) :
                 static_cast<long>(std::floor(n));
         }
 
         static long call(long double n, mpl::false_)
         {
- return test_negative(n) ? static_cast<long>(std::ceil(n)) :
+ return test_negative(n) ? static_cast<long>(std::ceil(n)) :
                 static_cast<long>(std::floor(n));
         }
 
@@ -408,7 +408,7 @@
     //
     // Traits class for radix specific number conversion
     //
- // Convert a digit from binary representation to character
+ // Convert a digit from binary representation to character
     // representation:
     //
     // static int call(unsigned n);
@@ -451,7 +451,7 @@
     }
 
     template <unsigned Radix, typename CharEncoding, typename Tag>
- struct convert_digit
+ struct convert_digit
       : detail::convert_digit<CharEncoding, Tag, (Radix <= 10) ? true : false>
     {};
 
@@ -469,7 +469,7 @@
         static T call(T& n, mpl::false_)
         {
             // Allow ADL to find the correct overload for floor
- using namespace std;
+ using namespace std;
             return floor(n / Radix);
         }
 
@@ -500,7 +500,7 @@
         static T call(T, T& num, int exp, mpl::false_)
         {
             // Allow ADL to find the correct overload for floor
- using namespace std;
+ using namespace std;
             return floor(num / spirit::traits::pow10<T>(exp));
         }
 
@@ -524,7 +524,7 @@
         template <typename T>
         static long call(T n, mpl::true_)
         {
- // this cast is safe since we know the result is not larger
+ // this cast is safe since we know the result is not larger
             // than Radix
             return static_cast<long>(n % Radix);
         }
@@ -533,7 +533,7 @@
         static long call(T n, mpl::false_)
         {
             // Allow ADL to find the correct overload for fmod
- using namespace std;
+ using namespace std;
             return cast_to_long::call(fmod(n, T(Radix)));
         }
 
@@ -545,16 +545,16 @@
     };
 }}}
 
-namespace boost { namespace spirit { namespace karma
-{
+namespace boost { namespace spirit { namespace karma
+{
     ///////////////////////////////////////////////////////////////////////////
     //
- // The int_inserter template takes care of the integer to string
+ // The int_inserter template takes care of the integer to string
     // conversion. If specified, the loop is unrolled for better performance.
     //
- // Set the value BOOST_KARMA_NUMERICS_LOOP_UNROLL to some integer in
- // between 0 (no unrolling) and the largest expected generated integer
- // string length (complete unrolling).
+ // Set the value BOOST_KARMA_NUMERICS_LOOP_UNROLL to some integer in
+ // between 0 (no unrolling) and the largest expected generated integer
+ // string length (complete unrolling).
     // If not specified, this value defaults to 6.
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -591,7 +591,7 @@
                 BOOST_KARMA_NUMERICS_LOOP_UNROLL,
                 BOOST_KARMA_NUMERICS_INNER_LOOP_PREFIX, _);
 
- if (!traits::test_zero(n))
+ if (!traits::test_zero(n))
                 call(sink, n, num, exp);
 
             BOOST_PP_REPEAT(
@@ -627,9 +627,9 @@
         }
 
     public:
- // Specialization for doubles and floats, falling back to long integers
+ // Specialization for doubles and floats, falling back to long integers
         // for representable values. These specializations speed up formatting
- // of floating point numbers considerably as all the required
+ // of floating point numbers considerably as all the required
         // arithmetics will be executed using integral data types.
         template <typename OutputIterator>
         static bool
@@ -671,7 +671,7 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // The uint_inserter template takes care of the conversion of any integer
+ // The uint_inserter template takes care of the conversion of any integer
     // to a string, while interpreting the number as an unsigned type.
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -697,7 +697,7 @@
     //
     // The sign_inserter template generates a sign for a given numeric value.
     //
- // The parameter forcesign allows to generate a sign even for positive
+ // The parameter forcesign allows to generate a sign even for positive
     // numbers.
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -720,9 +720,9 @@
         call_force(OutputIterator& sink, bool is_zero, bool is_negative)
         {
             // generate a sign for all numbers except zero
- if (!is_zero)
+ if (!is_zero)
                 *sink = is_negative ? '-' : '+';
- else
+ else
                 *sink = ' ';
 
             ++sink;

Modified: trunk/boost/spirit/home/karma/operator/list.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/list.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/list.hpp 2012-11-03 10:21:02 EDT (Sat, 03 Nov 2012)
@@ -47,12 +47,12 @@
         template <typename F, typename Attribute>
         bool generate_left(F f, Attribute const&, mpl::false_) const
         {
- // Failing subject generators are just skipped. This allows to
+ // Failing subject generators are just skipped. This allows to
             // selectively generate items in the provided attribute.
             while (!f.is_at_end())
             {
                 bool r = !f(left);
- if (r)
+ if (r)
                     return true;
                 if (!f.is_at_end())
                     f.next();
@@ -66,7 +66,7 @@
             return !f(left);
         }
 
- // There is no way to distinguish a failed generator from a
+ // There is no way to distinguish a failed generator from a
         // generator to be skipped. We assume the user takes responsibility
         // for ending the loop if no attribute is specified.
         template <typename F>
@@ -80,9 +80,9 @@
         typedef Right right_type;
 
         typedef mpl::int_<
- left_type::properties::value
- | right_type::properties::value
- | generator_properties::buffering
+ left_type::properties::value
+ | right_type::properties::value
+ | generator_properties::buffering
           | generator_properties::counting
> properties;
 
@@ -96,7 +96,7 @@
         {};
 
         base_list(Left const& left, Right const& right)
- : left(left), right(right)
+ : left(left), right(right)
         {}
 
         template <
@@ -113,8 +113,8 @@
                 typename add_const<Attribute>::type
>::type iterator_type;
 
- typedef
- typename traits::make_indirect_iterator<iterator_type>::type
+ typedef
+ typename traits::make_indirect_iterator<iterator_type>::type
             indirect_iterator_type;
             typedef detail::pass_container<
                 fail_function, Attribute, indirect_iterator_type, mpl::false_>
@@ -123,7 +123,7 @@
             iterator_type it = traits::begin(attr);
             iterator_type end = traits::end(attr);
 
- pass_container pass(fail_function(sink, ctx, d),
+ pass_container pass(fail_function(sink, ctx, d),
                 indirect_iterator_type(it), indirect_iterator_type(end));
 
             if (generate_left(pass, attr, Strict()))
@@ -160,7 +160,7 @@
     };
 
     template <typename Left, typename Right>
- struct list
+ struct list
       : base_list<Left, Right, mpl::false_, list<Left, Right> >
     {
         typedef base_list<Left, Right, mpl::false_, list> base_list_;
@@ -170,7 +170,7 @@
     };
 
     template <typename Left, typename Right>
- struct strict_list
+ struct strict_list
       : base_list<Left, Right, mpl::true_, strict_list<Left, Right> >
     {
         typedef base_list<Left, Right, mpl::true_, strict_list> base_list_;
@@ -185,12 +185,12 @@
     namespace detail
     {
         template <typename Subject, bool strict_mode = false>
- struct make_list
+ struct make_list
           : make_binary_composite<Subject, list>
         {};
 
         template <typename Subject>
- struct make_list<Subject, true>
+ struct make_list<Subject, true>
           : make_binary_composite<Subject, strict_list>
         {};
     }
@@ -216,13 +216,13 @@
     template <typename Left, typename Right, typename Attribute
       , typename Context, typename Iterator>
     struct handles_container<karma::list<Left, Right>, Attribute
- , Context, Iterator>
+ , Context, Iterator>
       : mpl::true_ {};
 
     template <typename Left, typename Right, typename Attribute
       , typename Context, typename Iterator>
     struct handles_container<karma::strict_list<Left, Right>, Attribute
- , Context, Iterator>
+ , Context, Iterator>
       : mpl::true_ {};
 }}}
 


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