Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54013 - trunk/boost/spirit/home/lex/lexer/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2009-06-17 11:18:34


Author: hkaiser
Date: 2009-06-17 11:18:34 EDT (Wed, 17 Jun 2009)
New Revision: 54013
URL: http://svn.boost.org/trac/boost/changeset/54013

Log:
Spirit: Made dummy token constructor explicit
Text files modified:
   trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp 2009-06-17 11:18:34 EDT (Wed, 17 Jun 2009)
@@ -118,7 +118,7 @@
         token() : id_(boost::lexer::npos) {}
 
         // construct an invalid token
- token(int) : id_(0) {}
+ explicit token(int) : id_(0) {}
 
         token(id_type id, std::size_t) : id_(id) {}
 
@@ -149,7 +149,7 @@
         operator typename safe_bool<token>::result_type() const
         {
             return safe_bool<token>()(
- 0 != id_ && std::size_t(boost::lexer::npos) != id_);
+ 0 != id_ && id_type(boost::lexer::npos) != id_);
         }
 
     protected:
@@ -195,7 +195,7 @@
         token() : state_(boost::lexer::npos) {}
 
         // construct an invalid token
- token(int) : base_type(0), state_(boost::lexer::npos) {}
+ explicit token(int) : base_type(0), state_(boost::lexer::npos) {}
 
         token(id_type id, std::size_t state)
           : base_type(id, boost::lexer::npos), state_(state) {}
@@ -299,7 +299,7 @@
         token() : value_(iterpair_type(iterator_type(), iterator_type())) {}
 
         // construct an invalid token
- token(int)
+ explicit token(int)
           : base_type(0)
           , value_(iterpair_type(iterator_type(), iterator_type())) {}
 


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