Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70591 - in sandbox/assign_v2/boost/assign/v2/option: . data_generator modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-26 16:24:43


Author: e_r
Date: 2011-03-26 16:24:43 EDT (Sat, 26 Mar 2011)
New Revision: 70591
URL: http://svn.boost.org/trac/boost/changeset/70591

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/option/data_generator/framework.hpp
      - copied unchanged from r70589, /sandbox/assign_v2/boost/assign/v2/option/data_generator/data.hpp
   sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp
      - copied unchanged from r70589, /sandbox/assign_v2/boost/assign/v2/option/modifier.hpp
Removed:
   sandbox/assign_v2/boost/assign/v2/option/data_generator/data.hpp
   sandbox/assign_v2/boost/assign/v2/option/modifier.hpp

Deleted: sandbox/assign_v2/boost/assign/v2/option/data_generator/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/data_generator/data.hpp 2011-03-26 16:24:43 EDT (Sat, 26 Mar 2011)
+++ (empty file)
@@ -1,139 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to 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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_ASSIGN_V2_OPTION_DATA_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_DATA_ER_2010_HPP
-#include <boost/assign/v2/detail/keyword/ignore.hpp>
-#include <boost/assign/v2/detail/pp/ignore.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/assign/v2/interpreter/replace.hpp>
-#include <boost/mpl/apply.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-//[syntax_option_data
-namespace interpreter_aux{
-namespace result_of{
-
- template<typename D>
- struct option_data_generator/*<-*/{
-
- typedef interpreter_aux::replace_data_generator<D> meta_;
-
- template<
- typename F // Data generator to replace D with
- >
- struct apply/*<-*/ : ::boost::mpl::apply1<meta_, F>{}/*->*/;
-
- };
-
-}// result_of
-
- template<typename F/*<-*/= keyword_aux::ignore/*->*/>
- struct option_data_generator/*<-*/
- {
- option_data_generator(){}
- option_data_generator(F f) : f_( f ){}
-
- F const& fun()const{ return this->f_; }
-
- private:
- F f_;
- }/*->*/;
-
- // Overrides data generator
- template<typename C, typename F, typename Tag, typename D, typename F1>
- typename ::boost::mpl::apply1<result_of::option_data_generator<D>, F1>::type
- operator%(
- interpreter_crtp<C, F, Tag, D> const& lhs,
- option_data_generator<F1> const& rhs
- )/*<-*/
- {
- typedef result_of::option_data_generator<D> meta_;
- typedef typename ::boost::mpl::apply1<meta_, F1>::type result_;
- return result_( lhs.container(), rhs.fun(), lhs.modifier );
- }/*<-*/BOOST_ASSIGN_V2_IGNORE(/*<-*/;/*->*/)/*->*/
-
- struct keyword_data_generator
- /*<-*/{
-
- template<typename F>
- option_data_generator<F> operator=(F const& f)const{
- return option_data_generator<F>( f );
- }
-
- }/*->*/;
-
-}// interpreter_aux
-namespace{
- const interpreter_aux::keyword_data_generator _data/*<-*/
- = interpreter_aux::keyword_data_generator()/*->*/;
-}
-namespace result_of{
-
- template<typename D>
- struct option_data_generator/*<-*/
- : interpreter_aux::result_of::option_data_generator<D>
- {}/*->*/;
-
-}// result_of
-//]
-
-
-}// v2
-}// assign
-}// boost
-
-#include <boost/preprocessor/cat.hpp>
-
-#define BOOST_ASSIGN_V2_OPTION_DATA_GENERATE(NAME, FUN)\
-namespace boost{\
-namespace assign{\
-namespace v2{\
-namespace interpreter_aux{\
-\
- template<typename T>\
- option_data_generator< FUN > NAME()\
- {\
- return ( v2::_data = FUN() );\
- }\
-\
-}\
-using interpreter_aux::NAME;\
-}\
-}\
-}\
-/**/
-
-#include <boost/assign/v2/detail/functor/constructor.hpp>
-BOOST_ASSIGN_V2_OPTION_DATA_GENERATE(constructor, v2::functor_aux::constructor<T>)
-
-#include <boost/assign/v2/detail/functor/new.hpp>
-BOOST_ASSIGN_V2_OPTION_DATA_GENERATE(new_ptr, v2::functor_aux::new_<T>)
-
-#include <boost/typeof/typeof.hpp>
-#include <boost/type_traits/add_const.hpp>
-#define BOOST_ASSIGN_V2_OPTION_DATA_KEYWORD(NAME, EXPR)\
-namespace boost{\
-namespace assign{\
-namespace v2{\
- typedef BOOST_TYPEOF( ( _data = EXPR ) ) BOOST_PP_CAT(type_of,NAME);\
-namespace{\
-\
- boost::add_const<BOOST_PP_CAT(type_of,NAME)>::type BOOST_PP_CAT(_,NAME) = ( _data = EXPR );\
-}\
-}\
-}\
-}\
-
-#include <boost/lambda/lambda.hpp>
-BOOST_ASSIGN_V2_OPTION_DATA_KEYWORD(identity, ::boost::lambda::_1)
-
-#endif // BOOST_ASSIGN_V2_OPTION_DATA_ER_2010_HPP

Deleted: sandbox/assign_v2/boost/assign/v2/option/modifier.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier.hpp 2011-03-26 16:24:43 EDT (Sat, 26 Mar 2011)
+++ (empty file)
@@ -1,178 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to 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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
-#include <boost/assign/v2/detail/keyword/ignore.hpp>
-#include <boost/assign/v2/detail/pp/ignore.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/assign/v2/interpreter/modifier.hpp>
-#include <boost/assign/v2/interpreter/replace.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/preprocessor/cat.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-//[syntax_option_modifier
-namespace interpreter_aux{
-
- template<
- typename Keyword // A class of modifiers
- , typename Arg /*<-*/= keyword_aux::ignore/*->*/ // Specifies an aspect of the implementation
- >
- struct option_modifier
- {
-
- option_modifier(){}
- option_modifier(Arg arg)/*<-*/
- :arg_( arg )
- {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
- Arg const& arg()const/*<-*/
- {
- return this->arg_;
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
- template<typename Arg1>
- option_modifier<Keyword, Arg1>
- operator=(const Arg1& arg1)const/*<-*/{
- return option_modifier<Keyword, Arg1>( arg1 );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
-//<-
- protected:
- Arg arg_;
-//->
- };
-
- // Specialize on Keyword
- template<typename Keyword, typename Arg>
- struct meta_modifier_tag
- {
- template<
- typename D // Inherits interpreter_crtp<>
- >
- struct apply;
- };
-
-namespace result_of{
-
- template<typename D>
- struct option_modifier{
-
-//<-
- typedef interpreter_aux::replace_modifier_tag<D> meta_;
-//->
-
- template<typename Keyword, typename Arg>
- struct apply
-//<-
- : ::boost::mpl::apply1<
- meta_,
- typename ::boost::mpl::apply1<
- interpreter_aux::meta_modifier_tag<Keyword, Arg>,
- D
- >::type
- >
-//->
- {};
-
- };
-
-}// result_of
-
- template<typename C, typename F, typename Tag, typename D,
- typename Keyword, typename Arg>
- typename ::boost::mpl::apply2<
- result_of::option_modifier<D>, Keyword, Arg
- >::type
- operator%(
- interpreter_crtp<C, F, Tag, D> const& lhs,
- option_modifier<Keyword, Arg> const& rhs
- )/*<-*/
- {
- typedef interpreter_aux::meta_modifier_tag<Keyword, Arg> meta_;
- typedef typename ::boost::mpl::apply1<meta_, D>::type modifier_tag;
- typedef interpreter_aux::interpreter_modifier<modifier_tag> modifier_;
-
- typedef typename ::boost::mpl::apply2<
- result_of::option_modifier<D>,
- Keyword, Arg
- >::type result_;
-
- return result_(
- lhs.container(),
- lhs.fun,
- modifier_( lhs.modifier, rhs.arg() )
- );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
-}// interpreter_aux
-
- /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/#define BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(NAME) unspecified/*<-*/)/*->*/
- /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/#define BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(NAME, Result) unspecified/*<-*/)/*->*/
-
-//]
-namespace result_of{
-
- template<typename D>
- struct option_modifier
- : interpreter_aux::result_of::option_modifier<D>
- {};
-
-}// result_of
-
-#ifdef BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG
-#error
-#else
-#define BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(NAME, Result)\
-namespace interpreter_aux{\
-\
- template<typename Arg>\
- struct meta_modifier_tag<BOOST_PP_CAT(keyword_,NAME), Arg>\
- {\
- template<typename D>\
- struct apply{ typedef Result type; };\
- };\
-}\
-/**/
-#endif
-
-#ifdef BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE
-#error
-#else
-#define BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME)\
- interpreter_aux::option_modifier<interpreter_aux::BOOST_PP_CAT(keyword_,NAME)>\
-/**/
-#endif
-
-#ifdef BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD
-#error
-#else
-#define BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(NAME)\
-namespace interpreter_aux{\
- struct BOOST_PP_CAT(keyword_,NAME){\
-\
- BOOST_PP_CAT(keyword_,NAME)(){}\
-\
- };\
-}\
-namespace {\
- BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME) const BOOST_PP_CAT(_,NAME)\
- = BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME)();\
-}\
-/**/
-#endif
-
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP


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