Boost logo

Boost-Commit :

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


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

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

Deleted: sandbox/assign_v2/boost/assign/v2/option/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/data.hpp 2011-03-26 16:16:55 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/key.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/key.hpp 2011-03-26 16:16:55 EDT (Sat, 26 Mar 2011)
+++ (empty file)
@@ -1,88 +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_KEY_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_KEY_ER_2010_HPP
-#include <boost/assign/v2/detail/traits/ptr_container/meta.hpp>
-#include <boost/assign/v2/detail/traits/value_container/category.hpp>
-#include <boost/assign/v2/interpreter/data.hpp>
-#include <boost/assign/v2/option/data.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-//[syntax_option_key
-namespace interpreter_aux{
-
- template<typename C>
- struct container_key{ typedef typename C::key_type type; };
-
- template<
- typename C // Value or pointer-container
- >
- struct deduce_key_generator/*<-*/
- : boost::mpl::eval_if<
- container_aux::is_ptr_container<C>,
- deduce_ptr_generator<C, container_key>,
- deduce_value_generator<C, container_key>
- >
- {}/*->*/;
-
- struct option_key{};
-
-
-namespace result_of{
-
- template<typename C, typename D>
- struct option_key :
- ::boost::mpl::apply1<
- interpreter_aux::result_of::option_data_generator<D>,
- typename deduce_key_generator<C>::type
- >{};
-
-}//result_of
-
- // Overrides data generator with a constructor for C::key_type
- template<
- typename C // Associative container
- , typename F, typename Tag, typename D
- >
- typename /*<-*/boost::lazy_enable_if<
- ::boost::mpl::apply1<
- container_aux::through_value_container<
- container_aux::is_sorted
- >,
- C
- >,/*->*/
- result_of::option_key<C, D>/*<-*/
- >::/*->*/type
- operator%(
- interpreter_crtp<C, F, Tag, D> const& lhs,
- option_key rhs
- )/*<-*/
- {
- typedef typename deduce_key_generator<C>::type gen_;
- return lhs % ( _data = gen_() );
- }/*<-*/BOOST_ASSIGN_V2_IGNORE(/*<-*/;/*->*/)/*->*/
-
-
-}// interpreter_aux
-//<-
-namespace{
-//->
- interpreter_aux::option_key const _key/*<-*/= interpreter_aux::option_key()/*->*/;
-//]
-}
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_OPTION_KEY_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