Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67135 - in sandbox/configurator/boost/configurator: . detail
From: for.dshevchenko_at_[hidden]
Date: 2010-12-09 12:11:24


Author: dshevchenko
Date: 2010-12-09 12:11:22 EST (Thu, 09 Dec 2010)
New Revision: 67135
URL: http://svn.boost.org/trac/boost/changeset/67135

Log:
typeid.name() for Windows corrections.

Text files modified:
   sandbox/configurator/boost/configurator/configurator.hpp | 15 +++++++++++----
   sandbox/configurator/boost/configurator/detail/misc.hpp | 2 +-
   2 files changed, 12 insertions(+), 5 deletions(-)

Modified: sandbox/configurator/boost/configurator/configurator.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/configurator.hpp (original)
+++ sandbox/configurator/boost/configurator/configurator.hpp 2010-12-09 12:11:22 EST (Thu, 09 Dec 2010)
@@ -175,12 +175,19 @@
         using boost::spirit::qi::_1;
         using boost::phoenix::ref;
         using boost::phoenix::push_back;
-
+ using boost::spirit::qi::rule;
+
         std::string pure_name = typeid( Option ).name();
         std::string name;
- parse( pure_name.begin()
- , pure_name.end()
- , int_ >> +( char_[ push_back( ref(name), _1 ) ] ) );
+
+ rule< detail::string_it > name_extractor = +( char_[ push_back( ref(name), _1 ) ] );
+ rule< detail::string_it > unnecessary_prefix;
+ #ifdef WIN_32
+ unnecessary_prefix = *( char_ - ' ' ) >> ' ';
+ #else
+ unnecessary_prefix = int_;
+ #endif
+ parse( pure_name.begin(), pure_name.end(), unnecessary_prefix >> name_extractor );
         return name;
     }
 private:

Modified: sandbox/configurator/boost/configurator/detail/misc.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/detail/misc.hpp (original)
+++ sandbox/configurator/boost/configurator/detail/misc.hpp 2010-12-09 12:11:22 EST (Thu, 09 Dec 2010)
@@ -109,7 +109,7 @@
                    , strings.end() );
 }
 
-inline trim_all( str_storage& storage ) {
+inline void trim_all( str_storage& storage ) {
     BOOST_FOREACH ( std::string& s, storage ) {
         boost::trim( s );
     }


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