Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81021 - trunk/boost/test/data/monomorphic/generators
From: gennadiy.rozental_at_[hidden]
Date: 2012-10-20 05:35:59


Author: rogeeff
Date: 2012-10-20 05:35:58 EDT (Sat, 20 Oct 2012)
New Revision: 81021
URL: http://svn.boost.org/trac/boost/changeset/81021

Log:
moved keywords
Text files modified:
   trunk/boost/test/data/monomorphic/generators/xrange.hpp | 26 ++++++++------------------
   1 files changed, 8 insertions(+), 18 deletions(-)

Modified: trunk/boost/test/data/monomorphic/generators/xrange.hpp
==============================================================================
--- trunk/boost/test/data/monomorphic/generators/xrange.hpp (original)
+++ trunk/boost/test/data/monomorphic/generators/xrange.hpp 2012-10-20 05:35:58 EDT (Sat, 20 Oct 2012)
@@ -17,12 +17,10 @@
 
 // Boost.Test
 #include <boost/test/data/config.hpp>
-#include <boost/test/data/size.hpp>
 
+#include <boost/test/data/monomorphic/generators/keywords.hpp>
 #include <boost/test/data/monomorphic/generate.hpp>
 
-#include <boost/test/utils/named_params.hpp>
-
 // Boost
 #include <boost/optional.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -77,14 +75,6 @@
 
 //____________________________________________________________________________//
 
-namespace {
-nfp::keyword<struct begin_t > begin;
-nfp::keyword<struct end_t > end;
-nfp::keyword<struct step_t > step;
-}
-
-//____________________________________________________________________________//
-
 namespace ds_detail {
 
 template<typename SampleType, typename StepType=SampleType>
@@ -98,9 +88,9 @@
     static generated_by<range_gen>
     _( Params const& params )
     {
- SampleType begin_val = params.has( monomorphic::begin ) ? params[monomorphic::begin] : SampleType();
- optional<SampleType> end_val = params.has( monomorphic::end ) ? params[monomorphic::end] : optional<SampleType>();
- StepType step_val = params.has( monomorphic::step ) ? params[monomorphic::step] : 1;
+ SampleType begin_val = params.has( data::begin ) ? params[data::begin] : SampleType();
+ optional<SampleType> end_val = params.has( data::end ) ? params[data::end] : optional<SampleType>();
+ StepType step_val = params.has( data::step ) ? params[data::step] : 1;
 
         BOOST_TEST_DS_ASSERT( step_val != 0, "Range step can't be zero" );
 
@@ -142,7 +132,7 @@
 inline monomorphic::generated_by<monomorphic::xrange_t<SampleType> >
 xrange( SampleType const& end_val )
 {
- return monomorphic::ds_detail::make_xrange<SampleType>::_( monomorphic::end=end_val );
+ return monomorphic::ds_detail::make_xrange<SampleType>::_( data::end=end_val );
 }
 
 //____________________________________________________________________________//
@@ -152,7 +142,7 @@
 xrange( SampleType const& end_val, Params const& params )
 {
     return monomorphic::ds_detail::make_xrange<SampleType>::
- _(( params, monomorphic::end=end_val ));
+ _(( params, data::end=end_val ));
 }
 
 //____________________________________________________________________________//
@@ -162,7 +152,7 @@
 xrange( SampleType const& begin_val, SampleType const& end_val )
 {
     return monomorphic::ds_detail::make_xrange<SampleType>::
- _(( monomorphic::begin=begin_val, monomorphic::end=end_val ));
+ _(( data::begin=begin_val, data::end=end_val ));
 }
 
 //____________________________________________________________________________//
@@ -172,7 +162,7 @@
 xrange( SampleType const& begin_val, SampleType const& end_val, StepType const& step_val )
 {
     return monomorphic::ds_detail::make_xrange<SampleType,StepType>::
- _(( monomorphic::begin=begin_val, monomorphic::end=end_val, monomorphic::step=step_val ));
+ _(( data::begin=begin_val, data::end=end_val, data::step=step_val ));
 }
 
 //____________________________________________________________________________//


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