Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50354 - in trunk/boost/test/utils/runtime: cla cla/detail cla/iface file
From: gennadiy.rozental_at_[hidden]
Date: 2008-12-22 02:54:37


Author: rogeeff
Date: 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
New Revision: 50354
URL: http://svn.boost.org/trac/boost/changeset/50354

Log:
Update to the Runtime.Param component
Text files modified:
   trunk/boost/test/utils/runtime/cla/argument_factory.hpp | 2
   trunk/boost/test/utils/runtime/cla/basic_parameter.hpp | 13 ++++++-----
   trunk/boost/test/utils/runtime/cla/char_parameter.hpp | 2
   trunk/boost/test/utils/runtime/cla/char_parameter.ipp | 4 +-
   trunk/boost/test/utils/runtime/cla/detail/argument_value_usage.hpp | 4 +-
   trunk/boost/test/utils/runtime/cla/dual_name_parameter.hpp | 16 +++++++++++---
   trunk/boost/test/utils/runtime/cla/id_policy.hpp | 34 ++++++++++++++++++++------------
   trunk/boost/test/utils/runtime/cla/id_policy.ipp | 30 +++++++++++++++++-----------
   trunk/boost/test/utils/runtime/cla/iface/argument_factory.hpp | 2
   trunk/boost/test/utils/runtime/cla/modifier.hpp | 12 +++++-----
   trunk/boost/test/utils/runtime/cla/named_parameter.ipp | 42 +++++++++++++++++++++------------------
   trunk/boost/test/utils/runtime/cla/parameter.hpp | 8 +++---
   trunk/boost/test/utils/runtime/cla/parser.hpp | 2
   trunk/boost/test/utils/runtime/cla/parser.ipp | 3 -
   trunk/boost/test/utils/runtime/cla/positional_parameter.hpp | 2
   trunk/boost/test/utils/runtime/cla/typed_parameter.hpp | 6 +++-
   trunk/boost/test/utils/runtime/file/config_file_iterator.cpp | 2
   17 files changed, 106 insertions(+), 78 deletions(-)

Modified: trunk/boost/test/utils/runtime/cla/argument_factory.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/argument_factory.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/argument_factory.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -147,7 +147,7 @@
         m_value_handler( p, *value );
 
     if( !p.p_multiplicable )
- arg.reset( p.p_optional_value
+ arg.reset( p.p_optional_value && (rtti::type_id<T>() != rtti::type_id<bool>())
             ? (argument*)new typed_argument<boost::optional<T> >( p, value )
             : (argument*)new typed_argument<T>( p, *value ) );
     else {

Modified: trunk/boost/test/utils/runtime/cla/basic_parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/basic_parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/basic_parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -23,6 +23,9 @@
 // Boost.Test
 #include <boost/test/utils/rtti.hpp>
 
+// Boost
+#include <boost/utility/base_from_member.hpp>
+
 namespace boost {
 
 namespace BOOST_RT_PARAM_NAMESPACE {
@@ -34,11 +37,12 @@
 // ************************************************************************** //
 
 template<typename T, typename IdPolicy>
-class basic_parameter : public typed_parameter<T> {
+class basic_parameter : private base_from_member<IdPolicy>, public typed_parameter<T> {
 public:
     // Constructors
     explicit basic_parameter( cstring n )
- : typed_parameter<T>( m_id_policy )
+ : base_from_member<IdPolicy>()
+ , typed_parameter<T>( base_from_member<IdPolicy>::member )
     {
         this->accept_modifier( name = n );
     }
@@ -49,11 +53,8 @@
     {
         typed_parameter<T>::accept_modifier( m );
 
- m_id_policy.accept_modifier( m );
+ base_from_member<IdPolicy>::member.accept_modifier( m );
     }
-
-private:
- IdPolicy m_id_policy;
 };
 
 //____________________________________________________________________________//

Modified: trunk/boost/test/utils/runtime/cla/char_parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/char_parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/char_parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -47,7 +47,7 @@
     {
         basic_naming_policy::accept_modifier( m );
 
- BOOST_RT_PARAM_VALIDATE_LOGIC( m_name.size() <= 1, "Invalid parameter name " << m_name );
+ BOOST_RT_PARAM_VALIDATE_LOGIC( p_name->size() <= 1, "Invalid parameter name " << p_name );
     }
 };
 

Modified: trunk/boost/test/utils/runtime/cla/char_parameter.ipp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/char_parameter.ipp (original)
+++ trunk/boost/test/utils/runtime/cla/char_parameter.ipp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -34,7 +34,7 @@
 char_name_policy::char_name_policy()
 : basic_naming_policy( rtti::type_id<char_name_policy>() )
 {
- assign_op( m_prefix, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+ assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
 }
 
 //____________________________________________________________________________//
@@ -43,7 +43,7 @@
 char_name_policy::conflict_with( identification_policy const& id ) const
 {
     return id.p_type_id == p_type_id &&
- m_name == static_cast<char_name_policy const&>( id ).m_name;
+ p_name == static_cast<char_name_policy const&>( id ).p_name;
 }
 
 //____________________________________________________________________________//

Modified: trunk/boost/test/utils/runtime/cla/detail/argument_value_usage.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/detail/argument_value_usage.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/detail/argument_value_usage.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -27,7 +27,7 @@
 #include <boost/lexical_cast.hpp>
 
 // STL
-// !! could we eliminate these includes?
+// !! can we eliminate these includes?
 #include <list>
 
 namespace boost {
@@ -66,7 +66,7 @@
 inline void
 argument_value_usage( format_stream& fs, int, bool* = 0 )
 {
- fs << BOOST_RT_PARAM_CSTRING_LITERAL( "[yes|y|no|n]" );
+ fs << BOOST_RT_PARAM_CSTRING_LITERAL( "yes|y|no|n" );
 }
 
 //____________________________________________________________________________//

Modified: trunk/boost/test/utils/runtime/cla/dual_name_parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/dual_name_parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/dual_name_parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -35,18 +35,26 @@
 public:
     dual_name_policy();
 
- // Accept modifer
+ // Accept modifier
     template<typename Modifier>
     void accept_modifier( Modifier const& m )
     {
- if( m.has( prefix ) )
+ if( m.has( prefix ) ) {
             set_prefix( m[prefix] );
+ m.erase( prefix );
+ }
 
- if( m.has( name ) )
+ if( m.has( name ) ) {
             set_name( m[name] );
+ m.erase( name );
+ }
 
- if( m.has( separator ) )
+ if( m.has( separator ) ) {
             set_separator( m[separator] );
+ m.erase( separator );
+ }
+
+ dual_id_policy<dual_name_policy,string_name_policy,char_name_policy>::accept_modifier( m );
     }
 private:
     void set_prefix( cstring );

Modified: trunk/boost/test/utils/runtime/cla/id_policy.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/id_policy.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/id_policy.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -41,19 +41,24 @@
 
 class basic_naming_policy : public identification_policy {
 public:
+ // Public properties
+ unit_test::readwrite_property<dstring> p_prefix;
+ unit_test::readwrite_property<dstring> p_name;
+ unit_test::readwrite_property<dstring> p_separator;
+
     // Policy interface
- virtual bool responds_to( cstring name ) const { return m_name == name; }
- virtual cstring id_2_report() const { return m_name; }
+ virtual bool responds_to( cstring name ) const { return p_name == name; }
+ virtual cstring id_2_report() const { return p_name.get(); }
     virtual void usage_info( format_stream& fs ) const;
     virtual bool matching( parameter const& p, argv_traverser& tr, bool primary ) const;
 
- // Accept modifer
+ // Accept modifier
     template<typename Modifier>
     void accept_modifier( Modifier const& m )
     {
- nfp::optionally_assign( m_prefix, m, prefix );
- nfp::optionally_assign( m_name, m, name );
- nfp::optionally_assign( m_separator, m, separator );
+ nfp::optionally_assign( p_prefix.value, m, prefix );
+ nfp::optionally_assign( p_name.value, m, name );
+ nfp::optionally_assign( p_separator.value, m, separator );
     }
 
 protected:
@@ -65,12 +70,7 @@
     // Naming policy interface
     virtual bool match_prefix( argv_traverser& tr ) const;
     virtual bool match_name( argv_traverser& tr ) const;
- virtual bool match_separator( argv_traverser& tr ) const;
-
- // Data members
- dstring m_prefix;
- dstring m_name;
- dstring m_separator;
+ virtual bool match_separator( argv_traverser& tr, bool optional_value ) const;
 };
 
 // ************************************************************************** //
@@ -94,7 +94,7 @@
     }
     virtual bool conflict_with( identification_policy const& id_p ) const
     {
- return m_primary.conflict_with( id_p ) || m_secondary.conflict_with( id_p );
+ return id_p.conflict_with( m_primary ) || id_p.conflict_with( m_secondary );
     }
     virtual cstring id_2_report() const
     {
@@ -113,6 +113,14 @@
         return m_primary.matching( p, tr, primary ) || m_secondary.matching( p, tr, primary );
     }
 
+ // Accept modifier
+ template<typename Modifier>
+ void accept_modifier( Modifier const& m )
+ {
+ m_primary.accept_modifier( m );
+ m_secondary.accept_modifier( m );
+ }
+
 protected:
     BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~dual_id_policy() {}
 

Modified: trunk/boost/test/utils/runtime/cla/id_policy.ipp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/id_policy.ipp (original)
+++ trunk/boost/test/utils/runtime/cla/id_policy.ipp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -19,6 +19,7 @@
 #include <boost/test/utils/runtime/config.hpp>
 
 #include <boost/test/utils/runtime/cla/id_policy.hpp>
+#include <boost/test/utils/runtime/cla/parameter.hpp>
 
 namespace boost {
 
@@ -33,9 +34,9 @@
 BOOST_RT_PARAM_INLINE void
 basic_naming_policy::usage_info( format_stream& fs ) const
 {
- fs << m_prefix << m_name << m_separator;
+ fs << p_prefix << p_name << p_separator;
 
- if( m_separator.empty() )
+ if( p_separator->empty() )
         fs << BOOST_RT_PARAM_LITERAL( ' ' );
 }
 
@@ -44,10 +45,10 @@
 BOOST_RT_PARAM_INLINE bool
 basic_naming_policy::match_prefix( argv_traverser& tr ) const
 {
- if( !tr.match_front( m_prefix ) )
+ if( !tr.match_front( p_prefix.get() ) )
         return false;
 
- tr.trim( m_prefix.size() );
+ tr.trim( p_prefix->size() );
     return true;
 }
 
@@ -56,29 +57,34 @@
 BOOST_RT_PARAM_INLINE bool
 basic_naming_policy::match_name( argv_traverser& tr ) const
 {
- if( !tr.match_front( m_name ) )
+ if( !tr.match_front( p_name.get() ) )
         return false;
 
- tr.trim( m_name.size() );
+ tr.trim( p_name->size() );
     return true;
 }
 
 //____________________________________________________________________________//
     
 BOOST_RT_PARAM_INLINE bool
-basic_naming_policy::match_separator( argv_traverser& tr ) const
+basic_naming_policy::match_separator( argv_traverser& tr, bool optional_value ) const
 {
- if( m_separator.empty() ) {
+ if( p_separator->empty() ) {
         if( !tr.token().is_empty() )
             return false;
 
         tr.trim( 1 );
     }
     else {
- if( !tr.match_front( m_separator ) )
+ if( !tr.match_front( p_separator.get() ) ) {
+ // if parameter has optional value separator is optional as well
+ if( optional_value && ( tr.eoi() || tr.match_front( ' ' ) ) ) {
+ return true;
+ }
             return false;
+ }
 
- tr.trim( m_separator.size() );
+ tr.trim( p_separator->size() );
     }
 
     return true;
@@ -87,7 +93,7 @@
 //____________________________________________________________________________//
 
 BOOST_RT_PARAM_INLINE bool
-basic_naming_policy::matching( parameter const&, argv_traverser& tr, bool ) const
+basic_naming_policy::matching( parameter const& p, argv_traverser& tr, bool ) const
 {
     if( !match_prefix( tr ) )
         return false;
@@ -95,7 +101,7 @@
     if( !match_name( tr ) )
         return false;
 
- if( !match_separator( tr ) )
+ if( !match_separator( tr, p.p_optional_value ) )
         return false;
 
     return true;

Modified: trunk/boost/test/utils/runtime/cla/iface/argument_factory.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/iface/argument_factory.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/iface/argument_factory.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -30,7 +30,7 @@
 // ************************************************************************** //
 // ************** argument_factory ************** //
 // ************************************************************************** //
-// another name could be argument production policy
+// another name can be argument production policy
 
 class argument_factory {
 public:

Modified: trunk/boost/test/utils/runtime/cla/modifier.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/modifier.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/modifier.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -34,17 +34,17 @@
 namespace {
 
 nfp::typed_keyword<bool,struct optional_t> optional_m;
-nfp::named_parameter<bool const,optional_t> optional( true );
+nfp::named_parameter<bool,optional_t,bool> optional( true );
 nfp::typed_keyword<bool,struct required_t> required_m;
-nfp::named_parameter<bool const,required_t> required( true );
+nfp::named_parameter<bool,required_t,bool> required( true );
 nfp::typed_keyword<bool,struct multiplicable_t> multiplicable_m;
-nfp::named_parameter<bool const,multiplicable_t> multiplicable( true );
+nfp::named_parameter<bool,multiplicable_t,bool> multiplicable( true );
 nfp::typed_keyword<bool,struct guess_name_t> guess_name_m;
-nfp::named_parameter<bool const,guess_name_t> guess_name( true );
+nfp::named_parameter<bool,guess_name_t,bool> guess_name( true );
 nfp::typed_keyword<bool,struct ignore_mismatch_t> ignore_mismatch_m;
-nfp::named_parameter<bool const,ignore_mismatch_t> ignore_mismatch( true );
+nfp::named_parameter<bool,ignore_mismatch_t,bool> ignore_mismatch( true );
 nfp::typed_keyword<bool,struct optional_value_t> optional_value_m;
-nfp::named_parameter<bool const,optional_value_t> optional_value( true );
+nfp::named_parameter<bool,optional_value_t,bool> optional_value( true );
 
 nfp::typed_keyword<char_type,struct input_separator_t> input_separator;
 nfp::typed_keyword<cstring,struct prefix_t> prefix;

Modified: trunk/boost/test/utils/runtime/cla/named_parameter.ipp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/named_parameter.ipp (original)
+++ trunk/boost/test/utils/runtime/cla/named_parameter.ipp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -39,7 +39,7 @@
 : basic_naming_policy( rtti::type_id<string_name_policy>() )
 , m_guess_name( false )
 {
- assign_op( m_prefix, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+ assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
 }
 
 //____________________________________________________________________________//
@@ -49,9 +49,9 @@
 {
     std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
 
- mm_pos = unit_test::mismatch( name.begin(), name.end(), m_name.begin(), m_name.end() );
+ mm_pos = unit_test::mismatch( name.begin(), name.end(), p_name->begin(), p_name->end() );
 
- return mm_pos.first == name.end() && (m_guess_name || (mm_pos.second == m_name.end()) );
+ return mm_pos.first == name.end() && (m_guess_name || (mm_pos.second == p_name->end()) );
 }
 
 //____________________________________________________________________________//
@@ -62,21 +62,26 @@
     if( id.p_type_id == p_type_id ) {
         string_name_policy const& snp = static_cast<string_name_policy const&>( id );
 
- if( m_name.empty() || snp.m_name.empty() )
+ if( p_name->empty() || snp.p_name->empty() )
+ return false;
+
+ if( p_prefix != snp.p_prefix )
             return false;
 
         std::pair<dstring::const_iterator,dstring::const_iterator> mm_pos =
- unit_test::mismatch( m_name.begin(), m_name.end(), snp.m_name.begin(), snp.m_name.end() );
+ unit_test::mismatch( p_name->begin(), p_name->end(), snp.p_name->begin(), snp.p_name->end() );
 
- return mm_pos.first != m_name.begin() && // there is common substring
- (m_guess_name || (mm_pos.first == m_name.end()) ) && // that match me
- (snp.m_guess_name || (mm_pos.second == snp.m_name.end()) ); // and snp
+ return mm_pos.first != p_name->begin() && // there is common substring
+ ((m_guess_name && (mm_pos.second == snp.p_name->end()) ) || // that match other guy and I am guessing
+ (snp.m_guess_name && (mm_pos.first == p_name->end()) )); // or me and the other guy is
     }
     
     if( id.p_type_id == rtti::type_id<char_name_policy>() ) {
         char_name_policy const& cnp = static_cast<char_name_policy const&>( id );
-
- return m_guess_name && unit_test::first_char( cstring( m_name ) ) == unit_test::first_char( cnp.id_2_report() );
+
+ return m_guess_name &&
+ (p_prefix == cnp.p_prefix) &&
+ unit_test::first_char( cstring( p_name ) ) == unit_test::first_char( cstring( cnp.p_name ) );
     }
     
     return false;
@@ -89,18 +94,17 @@
 {
     if( !m_guess_name )
         return basic_naming_policy::match_name( tr );
- else {
- cstring in = tr.input();
 
- std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
-
- mm_pos = unit_test::mismatch( in.begin(), in.end(), m_name.begin(), m_name.end() );
+ cstring in = tr.input();
 
- if( mm_pos.first == in.begin() )
- return false;
+ std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
+
+ mm_pos = unit_test::mismatch( in.begin(), in.end(), p_name->begin(), p_name->end() );
 
- tr.trim( mm_pos.first - in.begin() );
- }
+ if( mm_pos.first == in.begin() )
+ return false;
+
+ tr.trim( mm_pos.first - in.begin() );
 
     return true;
 }

Modified: trunk/boost/test/utils/runtime/cla/parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -42,10 +42,10 @@
 
 class parameter : public BOOST_RT_PARAM_NAMESPACE::parameter {
 public:
- parameter( identification_policy& ID, argument_factory& F )
+ parameter( identification_policy& ID, argument_factory& F, bool optional_value = false )
     : p_optional( false )
     , p_multiplicable( false )
- , p_optional_value( false )
+ , p_optional_value( optional_value )
     , m_id_policy( ID )
     , m_arg_factory( F )
     {}
@@ -89,7 +89,7 @@
     {
         return (id_2_report() == p.id_2_report() && !id_2_report().is_empty()) ||
                m_id_policy.conflict_with( p.m_id_policy ) ||
- p.m_id_policy.conflict_with( m_id_policy );
+ (m_id_policy.p_type_id != p.m_id_policy.p_type_id) && p.m_id_policy.conflict_with( m_id_policy );
     }
     cstring id_2_report() const { return m_id_policy.id_2_report(); }
     void usage_info( format_stream& fs ) const
@@ -113,7 +113,7 @@
     // argument production based on different source
     void produce_argument( argv_traverser& tr )
     {
- m_id_policy.matching( *this, tr, true ); // !! could we save this position somehow
+ m_id_policy.matching( *this, tr, true ); // !! can we save this position somehow
         m_actual_argument = m_arg_factory.produce_using( *this, tr );
     }
     void produce_argument( parser const& p )

Modified: trunk/boost/test/utils/runtime/cla/parser.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/parser.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/parser.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -64,7 +64,7 @@
 private:
     // Data members;
     parser& m_parser;
- Modifier const& m_modifiers;
+ Modifier const& m_modifiers;
 };
 
 }

Modified: trunk/boost/test/utils/runtime/cla/parser.ipp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/parser.ipp (original)
+++ trunk/boost/test/utils/runtime/cla/parser.ipp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -83,8 +83,7 @@
 parser::operator<<( parameter_ptr new_param )
 {
     BOOST_TEST_FOREACH( parameter_ptr, old_param, m_parameters ) {
- BOOST_RT_PARAM_VALIDATE_LOGIC( !old_param->conflict_with( *new_param ) &&
- !new_param->conflict_with( *old_param ),
+ BOOST_RT_PARAM_VALIDATE_LOGIC( !old_param->conflict_with( *new_param ),
             BOOST_RT_PARAM_LITERAL( "Definition of parameter " ) << new_param->id_2_report() <<
             BOOST_RT_PARAM_LITERAL( " conflicts with defintion of parameter " ) << old_param->id_2_report() );
     }

Modified: trunk/boost/test/utils/runtime/cla/positional_parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/positional_parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/positional_parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -27,7 +27,7 @@
 namespace cla {
 
 // ************************************************************************** //
-// ************** single_name_policy ************** //
+// ************** trivial_id_policy ************** //
 // ************************************************************************** //
 
 class trivial_id_policy : public identification_policy {

Modified: trunk/boost/test/utils/runtime/cla/typed_parameter.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/typed_parameter.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/typed_parameter.hpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -40,7 +40,9 @@
 template<typename T>
 class typed_parameter : public cla::parameter {
 public:
- explicit typed_parameter( identification_policy& ID ) : cla::parameter( ID, m_arg_factory ) {}
+ explicit typed_parameter( identification_policy& ID )
+ : cla::parameter( ID, m_arg_factory, rtti::type_id<T>() == rtti::type_id<bool>() )
+ {}
 
     // parameter properties modification
     template<typename Modifier>
@@ -51,7 +53,7 @@
         m_arg_factory.accept_modifier( m );
 
         BOOST_RT_PARAM_VALIDATE_LOGIC( !p_optional || !m_arg_factory.m_value_generator,
- BOOST_RT_PARAM_LITERAL( "couldn't define a value generator for optional parameter " ) << id_2_report() );
+ BOOST_RT_PARAM_LITERAL( "can't define a value generator for optional parameter " ) << id_2_report() );
     }
 
 private:

Modified: trunk/boost/test/utils/runtime/file/config_file_iterator.cpp
==============================================================================
--- trunk/boost/test/utils/runtime/file/config_file_iterator.cpp (original)
+++ trunk/boost/test/utils/runtime/file/config_file_iterator.cpp 2008-12-22 02:54:35 EST (Mon, 22 Dec 2008)
@@ -155,7 +155,7 @@
         }
     }
 
- BOOST_RT_PARAM_VALIDATE_LOGIC( m_stream.is_open(), BOOST_RT_PARAM_LITERAL( "couldn't open file " ) << file_name );
+ BOOST_RT_PARAM_VALIDATE_LOGIC( m_stream.is_open(), BOOST_RT_PARAM_LITERAL( "can't open file " ) << file_name );
 }
 
 //____________________________________________________________________________//


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