|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60703 - in sandbox/statistics/detail/assign/boost/assign/auto_size: check detail
From: erwann.rogard_at_[hidden]
Date: 2010-03-19 00:23:37
Author: e_r
Date: 2010-03-19 00:23:35 EDT (Fri, 19 Mar 2010)
New Revision: 60703
URL: http://svn.boost.org/trac/boost/changeset/60703
Log:
m
Added:
sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp (contents, props changed)
sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp (contents, props changed)
sandbox/statistics/detail/assign/boost/assign/auto_size/detail/fwd_expr.hpp (contents, props changed)
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/all.hpp 2010-03-19 00:23:35 EDT (Fri, 19 Mar 2010)
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::auto_size::check_all.hpp //
+// //
+// (C) Copyright 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_DETAIL_AUTO_SIZE_CHECK_ALL_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_ALL_ER_2010_HPP
+#include <vector>
+#include <set>
+#include <list>
+#include <stack>
+#include <queue>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/array.hpp>
+#include <boost/range/algorithm/max_element.hpp>
+
+//#include <boost/assign/auto_size/chain/mpl_check.hpp>
+
+#include <boost/assign/auto_size/check/array.hpp>
+//#include <boost/assign/auto_size/check/chain.hpp>
+#include <boost/assign/auto_size/check/converter.hpp>
+#include <boost/assign/auto_size/check/copy_array.hpp>
+#include <boost/assign/auto_size/check/copy_iterator.hpp>
+//#include <boost/assign/auto_size/check/example1.hpp>
+#include <boost/assign/auto_size/check/fifo.hpp>
+#include <boost/assign/auto_size/check/iterator.hpp>
+#include <boost/assign/auto_size/check/lifo.hpp>
+#include <boost/assign/auto_size/check/rebind_array.hpp>
+//#include <boost/assign/auto_size/check/ref_list_of_caller.hpp>
+
+#define BOOST_ASSIGN_AS_CHECK_all(fun) \
+namespace boost{ \
+namespace assign{ \
+namespace detail{ \
+namespace auto_size{ \
+ \
+template<typename T> \
+void fun(){ \
+ BOOST_ASSIGN_AS_CHECK_iterator \
+ BOOST_ASSIGN_AS_CHECK_array \
+ BOOST_ASSIGN_AS_CHECK_copy_iterator \
+ BOOST_ASSIGN_AS_CHECK_copy_array \
+ BOOST_ASSIGN_AS_CHECK_rebind_array \
+ BOOST_ASSIGN_AS_CHECK_converter(std::list<T>) \
+ BOOST_ASSIGN_AS_CHECK_converter(std::vector<T>) \
+ typedef boost::array<T,8> ar8_; \
+ BOOST_ASSIGN_AS_CHECK_converter(ar8_) \
+ BOOST_ASSIGN_AS_CHECK_converter_sorted(std::set<T>) \
+ BOOST_ASSIGN_AS_CHECK_adapter_lifo(std::stack<T>) \
+ BOOST_ASSIGN_AS_CHECK_adapter_fifo(std::queue<T>) \
+} \
+void fun(){ fun<int>(); } \
+} \
+} \
+} \
+} \
+/**/
+
+/*
+ boost::assign::detail::chain_mpl_check::compound();
+ {
+ val_ a, b, c, d, e, f, g, h;
+ BOOST_AUTO(tmp1,ref_list_of(a)(b)(c)(d));
+ check_chain(
+ tmp1,
+ cref_list_of(e)(f)(g)(h),
+ a,b,c,d,e,f,g,h);
+ }
+ // TODO comparison operators
+}
+
+*/
+
+
+#endif
+
+
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/example1.hpp 2010-03-19 00:23:35 EDT (Fri, 19 Mar 2010)
@@ -0,0 +1,50 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::auto_size::check_example1.hpp //
+// //
+// (C) Copyright 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_DETAIL_AUTO_SIZE_CHECK_EXAMPLE1_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_EXAMPLE1_ER_2010_HPP
+#include <boost/range/algorithm/max_element.hpp>
+#include <boost/range/algorithm/copy.hpp> // tmp
+#include <iostream>
+
+namespace boost{
+namespace assign{
+namespace detail{
+namespace auto_size{
+
+template<typename Caller>
+void check_example1()
+{
+ typedef typename Caller::value_type val_;
+ typedef typename Caller::template apply<false>::type caller_l_;
+ typedef typename Caller::template apply<true>::type caller_r_;
+ using namespace boost::assign;
+
+ using namespace check_constants;
+ val_ a1 = a, b1 = b, c1 = c, d1 = d,
+ e1 = e, f1 = f, g1 = g, h1 = h;
+
+ val_& max = *boost::max_element(
+ caller_l_::call(a1, b1, c1, d1, e1, f1, g1, h1) );
+ BOOST_ASSIGN_CHECK_EQUAL( max , f1 );
+ max = 8;
+ //BOOST_ASSIGN_CHECK_EQUAL( f1 , 8 );
+ const val_& const_max = *boost::max_element(
+ caller_r_::call(a, b, c, d1, e1, f1, g1, h1) );
+ //BOOST_ASSIGN_CHECK_EQUAL( max , const_max );
+
+}
+
+}// auto_size
+}// detail
+}// assign
+}// boost
+
+#endif
+
+
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/fwd_expr.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/fwd_expr.hpp 2010-03-19 00:23:35 EDT (Fri, 19 Mar 2010)
@@ -0,0 +1,42 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::fwd_expr.hpp //
+// //
+// (C) Copyright 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_AUTO_SIZE_DETAIL_FWD_EXPR_ER_2010_HPP
+#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_FWD_EXPR_ER_2010_HPP
+#include <boost/assign/auto_size/detail/types.hpp>
+
+namespace boost{
+namespace assign{
+namespace detail{
+namespace auto_size{
+
+ // ---- fwd declare ---- //
+
+ template<typename E,typename T,int N,
+ template<typename> class R,typename P>
+ class expr;
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e,false_ /*exit*/);
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e,true_ /*exit*/);
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e);
+
+}// auto_size
+}// detail
+}// assign
+}// boost
+
+#endif
+
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