Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70380 - in sandbox/assign_v2: boost/assign/v2/optional libs/assign/v2/test/optional libs/assign/v2/test/put/pipe/optional
From: erwann.rogard_at_[hidden]
Date: 2011-03-21 18:37:44


Author: e_r
Date: 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
New Revision: 70380
URL: http://svn.boost.org/trac/boost/changeset/70380

Log:
assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/optional/mapped.hpp
      - copied unchanged from r70379, /sandbox/assign_v2/boost/assign/v2/optional/lookup.hpp
   sandbox/assign_v2/libs/assign/v2/test/optional/mapped.cpp
      - copied unchanged from r70379, /sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp
   sandbox/assign_v2/libs/assign/v2/test/optional/mapped.h
      - copied unchanged from r70379, /sandbox/assign_v2/libs/assign/v2/test/optional/lookup.h
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/mapped.cpp
      - copied unchanged from r70379, /sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.cpp
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/mapped.h
      - copied unchanged from r70379, /sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.h
Removed:
   sandbox/assign_v2/boost/assign/v2/optional/lookup.hpp
   sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp
   sandbox/assign_v2/libs/assign/v2/test/optional/lookup.h
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.cpp
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.h

Deleted: sandbox/assign_v2/boost/assign/v2/optional/lookup.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/optional/lookup.hpp 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
+++ (empty file)
@@ -1,78 +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_OPTIONAL_LOOKUP_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTIONAL_LOOKUP_ER_2010_HPP
-#include <boost/assign/v2/detail/keyword/ignore.hpp>
-#include <boost/assign/v2/detail/pp/ignore.hpp>
-//#include <boost/assign/v2/interpreter/modifier.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/shared_ptr.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-namespace modifier_tag{
-
- template<typename Arg> struct mapped;
-
-}// modifier_tag
-namespace aux{
-
- template<typename Arg>
- class adapter_modifier<modifier_tag::mapped<Arg> >
- {
-
- typedef Arg arg_;
- // storing a copy of lambda::something has caused pbs, hence ptr
- typedef boost::shared_ptr<arg_> ptr_;
- typedef keyword_aux::ignore ignore_;
-
- public:
-
- adapter_modifier() : ptr( new arg_() ){}
- explicit adapter_modifier(
- ignore_,
- typename boost::call_traits<arg_>::param_type arg
- ) : ptr( new arg_( arg ) )
- {}
-
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
- template<typename C, typename T>
- void impl(C& cont, T&& key )const
- {
- cont[ key ] = (*this->ptr)( cont[ std::forward<T>( key ) ] );
- }
-
-#else
-
- template<typename C, typename T>
- void impl(C& cont, T& key )const{
- cont[ key ] = (*this->ptr)( cont[ key ] );
- }
-
-#endif
-
- private:
- ptr_ ptr;
- };
-
-}// aux
-}// v2
-}// assign
-}// boost
-
-#include <boost/assign/v2/optional/modifier.hpp>
-BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_KEYWORD(mapped)
-#define BOOST_ASSIGN_V2_TAG modifier_tag::mapped<Arg>
-BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_META_MODIFIER_TAG(mapped, BOOST_ASSIGN_V2_TAG)
-#undef BOOST_ASSIGN_V2_TAG
-
-#endif // BOOST_ASSIGN_V2_OPTIONAL_LOOKUP_ER_2010_HPP

Deleted: sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
+++ (empty file)
@@ -1,98 +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) //
-//////////////////////////////////////////////////////////////////////////////
-#include <map>
-#include <string>
-#include <cmath>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/put.hpp>
-#include <boost/assign/v2/deque.hpp>
-// Options come next
-#include <boost/assign/v2/optional/data.hpp>
-#include <boost/assign/v2/optional/mapped.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <libs/assign/v2/test/optional/mapped.h>
-
-namespace test_assign_v2{
-namespace xxx_optional{
-namespace xxx_mapped{
-
- void test()
- {
-
- using namespace boost;
- namespace as2 = assign::v2;
- {
- //[test_optional_mapped_meta
- using namespace lambda;
- typedef BOOST_TYPEOF(_1) arg_;
- typedef as2::aux::keyword_mapped keyword_;
- typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
- typedef std::map<std::string, int> cont_;
- typedef as2::result_of::put<cont_>::type put_;
- typedef as2::result_of::optional_modifier<put_> meta1_;
- typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
- typedef as2::modifier_tag::mapped<arg_> tag1_;
- typedef as2::aux::replace_modifier_tag<put_> meta2_;
- typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
- BOOST_MPL_ASSERT((boost::is_same<result1_, result2_>));
- //]
- }
- {
- //[test_optional_mapped_map
- using namespace lambda;
- typedef std::string str_; typedef std::map<str_, int> C; C year;
- (
- as2::put( year )( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )
- % ( as2::_data = _1 ) % ( as2::_mapped = ( _1 = 31 ) )
- )/*<<Calls `year["jan"] = 31` etc.>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
-
- BOOST_ASSIGN_V2_CHECK( year["jan"] == 31 );
- BOOST_ASSIGN_V2_CHECK( year["dec"] == 31 );
- //]
- }
- {
- //[test_optional_mapped_meta_deque
- using namespace lambda;
- typedef BOOST_TYPEOF(_1) arg_;
- typedef as2::aux::keyword_mapped keyword_;
- typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
- typedef as2::result_of::deque<int>::type put_;
- typedef as2::result_of::optional_modifier<put_> meta1_;
- typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
- typedef as2::modifier_tag::mapped<arg_> tag1_;
- typedef as2::aux::replace_modifier_tag<put_> meta2_;
- typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
- BOOST_MPL_ASSERT((boost::is_same<result1_, result2_>));
- //]
- }
- {
- //[test_optional_mapped_map_deque
- using namespace lambda;
- BOOST_AUTO(
- days_in_first_quater,
- (
- as2::deque<int>( 31 )( 31 )( 31 ) % ( as2::_mapped = ( _1 -= 3 ) )
- )( 1 )
- );
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[0] == 31 );
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[1] == 28 );
- BOOST_ASSIGN_V2_CHECK( days_in_first_quater[2] == 31 );
- //]
- }
- }
-
-}// xxx_mapped
-}// xxx_optional
-}// test_assign_v2

Deleted: sandbox/assign_v2/libs/assign/v2/test/optional/lookup.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/optional/lookup.h 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
+++ (empty file)
@@ -1,23 +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 LIBS_ASSIGN_V2_TEST_OPTIONAL_LOOKUP_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_OPTIONAL_LOOKUP_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_optional{
-namespace xxx_mapped{
-
- void test();
-
-}// xxx_mapped
-}// xxx_optional
-}// xxx_test_assign
-
-#endif // LIBS_ASSIGN_V2_TEST_OPTIONAL_LOOKUP_ER_2010_H

Deleted: sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.cpp 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
+++ (empty file)
@@ -1,55 +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) //
-//////////////////////////////////////////////////////////////////////////////
-#include <map>
-#include <string>
-#include <boost/lambda/lambda.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/pipe/csv_put.hpp>
-// Options come next
-#include <boost/assign/v2/optional/data.hpp>
-#include <boost/assign/v2/optional/mapped.hpp>
-#include <libs/assign/v2/test/put/pipe/optional/mapped.h>
-
-namespace test_assign_v2{
-namespace xxx_put{
-namespace xxx_pipe{
-namespace xxx_optional{
-namespace xxx_mapped{
-
- void test()
- {
- using namespace boost;
- namespace as2 = assign::v2;
- {
- //[test_put_pipe_modifier_mapped
- using namespace lambda;
- typedef std::map<std::string, int> C; C cal;
- BOOST_AUTO( _local, ( as2::_data = _1 ) );
- BOOST_ASSIGN_V2_CHECK(
- (
- cal
- | as2::_csv_put( C::value_type( "feb", 28 ) )
- | ( as2::_csv_put % _local % ( as2::_mapped = (_1 = 30) ) )( "apr", "jun", "sep", "nov" )
- | ( as2::_csv_put % _local % ( as2::_mapped = (_1 = 31) ) )( "jan", "mar", "may", "jul", "aug", "oct", "dec" )
-
- )["feb"] == 28
- );
- BOOST_ASSIGN_V2_CHECK( cal["jun"] == 30 );
- BOOST_ASSIGN_V2_CHECK( cal["mar"] == 31 );
- //]
- }
- }
-
-}// xxx_mapped
-}// xxx_optional
-}// xxx_pipe
-}// xxx_put
-}// test_assign_v2

Deleted: sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/optional/lookup.h 2011-03-21 18:37:43 EDT (Mon, 21 Mar 2011)
+++ (empty file)
@@ -1,27 +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 LIBS_ASSIGN_V2_TEST_PUT_PIPE_OPTIONAL_LOOKUP_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_OPTIONAL_LOOKUP_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_put{
-namespace xxx_pipe{
-namespace xxx_optional{
-namespace xxx_mapped{
-
- void test();
-
-}// xxx_mapped
-}// xxx_optional
-}// xxx_pipe
-}// xxx_put
-}// xxx_test_assign
-
-#endif // LIBS_ASSIGN_V2_TEST_PUT_PIPE_OPTIONAL_LOOKUP_ER_2010_H


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