From: Wolfgang Bangerth Date: Tue, 13 Jan 2009 03:41:28 +0000 (+0000) Subject: Use a namespace std_cxx0x and import into it elements from BOOST. If a compiler at... X-Git-Tag: v8.0.0~8136 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28008276c62a5d4e7cef24d0baf0151d807a6b19;p=dealii.git Use a namespace std_cxx0x and import into it elements from BOOST. If a compiler at a later time supports C++0x we can make things easier on us because we only have to modify this one place, rather than all throughout the code. git-svn-id: https://svn.dealii.org/trunk@18194 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index 1a6d03805b..facb0d59c0 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -18,8 +18,7 @@ #include #include #include - -#include +#include #include #include @@ -1405,7 +1404,7 @@ class DataOutBase template static void write_dx (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const DXFlags &flags, std::ostream &out); @@ -1457,7 +1456,7 @@ class DataOutBase template static void write_eps (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const EpsFlags &flags, std::ostream &out); @@ -1474,7 +1473,7 @@ class DataOutBase template static void write_gmv (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const GmvFlags &flags, std::ostream &out); @@ -1541,7 +1540,7 @@ class DataOutBase template static void write_gnuplot (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const GnuplotFlags &flags, std::ostream &out); @@ -1595,7 +1594,7 @@ class DataOutBase template static void write_povray (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const PovrayFlags &flags, std::ostream &out); @@ -1609,7 +1608,7 @@ class DataOutBase template static void write_tecplot (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const TecplotFlags &flags, std::ostream &out); @@ -1638,7 +1637,7 @@ class DataOutBase static void write_tecplot_binary ( const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const TecplotFlags &flags, std::ostream &out); @@ -1660,7 +1659,7 @@ class DataOutBase template static void write_ucd (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const UcdFlags &flags, std::ostream &out); @@ -1681,7 +1680,7 @@ class DataOutBase template static void write_vtk (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const VtkFlags &flags, std::ostream &out); @@ -1729,7 +1728,7 @@ class DataOutBase static void write_deal_II_intermediate ( const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const Deal_II_IntermediateFlags &flags, std::ostream &out); @@ -2426,7 +2425,7 @@ class DataOutInterface : private DataOutBase * collection of scalar fields. */ virtual - std::vector > + std::vector > get_vector_data_ranges () const; /** @@ -2729,7 +2728,7 @@ class DataOutReader : public DataOutInterface * collection of scalar fields. */ virtual - std::vector > + std::vector > get_vector_data_ranges () const; private: @@ -2749,7 +2748,7 @@ class DataOutReader : public DataOutInterface * output field are to be * considered vectors. */ - std::vector > + std::vector > vector_data_ranges; }; diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index 4515e8a065..4b446c9451 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -16,12 +16,12 @@ #include #include +#include #include #include #include #include -#include DEAL_II_NAMESPACE_OPEN // we only need output streams, but older compilers did not provide @@ -421,7 +421,7 @@ class LogStream /** * Type of the stream map */ - typedef std::map > stream_map_type; + typedef std::map > stream_map_type; /** * We generate a stringstream for diff --git a/deal.II/base/include/base/memory_consumption.h b/deal.II/base/include/base/memory_consumption.h index 4c27e57a64..0e1224d03d 100644 --- a/deal.II/base/include/base/memory_consumption.h +++ b/deal.II/base/include/base/memory_consumption.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -15,7 +15,7 @@ #include -#include +#include #include #include #include @@ -371,7 +371,7 @@ namespace MemoryConsumption /** * Return the amount of memory used - * by a boost shared pointer. Make + * by a shared pointer. Make * sure that you are really * interested in this, and not the * amount of memory required by the @@ -379,7 +379,7 @@ namespace MemoryConsumption */ template inline - unsigned int memory_consumption (const boost::shared_ptr &); + unsigned int memory_consumption (const std_cxx0x::shared_ptr &); /** * For all other types which are @@ -604,7 +604,7 @@ namespace MemoryConsumption template inline unsigned int - memory_consumption (const boost::shared_ptr &ptr) + memory_consumption (const std_cxx0x::shared_ptr &ptr) { return sizeof(ptr); } diff --git a/deal.II/base/include/base/std_cxx0x/bind.h b/deal.II/base/include/base/std_cxx0x/bind.h new file mode 100644 index 0000000000..baf313a724 --- /dev/null +++ b/deal.II/base/include/base/std_cxx0x/bind.h @@ -0,0 +1,34 @@ +//--------------------------------------------------------------------------- +// $Id: std_cxx0x_tuple.h 16094 2008-05-14 19:18:25Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- +#ifndef __deal2__std_cxx0x_bin_h +#define __deal2__std_cxx0x_bind_h + + +#include +#include + + +DEAL_II_NAMESPACE_OPEN + +namespace std_cxx0x +{ + using boost::bind; + using boost::ref; + using boost::cref; + using boost::reference_wrapper; +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/base/include/base/std_cxx0x/function.h b/deal.II/base/include/base/std_cxx0x/function.h new file mode 100644 index 0000000000..e17704a4b1 --- /dev/null +++ b/deal.II/base/include/base/std_cxx0x/function.h @@ -0,0 +1,31 @@ +//--------------------------------------------------------------------------- +// $Id: std_cxx0x_tuple.h 16094 2008-05-14 19:18:25Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- +#ifndef __deal2__std_cxx0x_function_h +#define __deal2__std_cxx0x_function_h + + +#include +#include + + +DEAL_II_NAMESPACE_OPEN + +namespace std_cxx0x +{ + using boost::function; +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/base/include/base/std_cxx0x/shared_ptr.h b/deal.II/base/include/base/std_cxx0x/shared_ptr.h new file mode 100644 index 0000000000..0c5e032f83 --- /dev/null +++ b/deal.II/base/include/base/std_cxx0x/shared_ptr.h @@ -0,0 +1,31 @@ +//--------------------------------------------------------------------------- +// $Id: std_cxx0x_tuple.h 16094 2008-05-14 19:18:25Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- +#ifndef __deal2__std_cxx0x_shared_ptr_h +#define __deal2__std_cxx0x_shared_ptr_h + + +#include +#include + + +DEAL_II_NAMESPACE_OPEN + +namespace std_cxx0x +{ + using boost::shared_ptr; +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/base/include/base/std_cxx0x/tuple.h b/deal.II/base/include/base/std_cxx0x/tuple.h new file mode 100644 index 0000000000..20cd02976b --- /dev/null +++ b/deal.II/base/include/base/std_cxx0x/tuple.h @@ -0,0 +1,35 @@ +//--------------------------------------------------------------------------- +// $Id: std_cxx0x_tuple.h 16094 2008-05-14 19:18:25Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- +#ifndef __deal2__std_cxx0x_tuple_h +#define __deal2__std_cxx0x_tuple_h + + +#include +#include + + +DEAL_II_NAMESPACE_OPEN + +namespace std_cxx0x +{ + using boost::tuple; + namespace tuples + { + using namespace boost::tuples; + } +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/base/include/base/thread_management.h b/deal.II/base/include/base/thread_management.h index 17bd6b36b6..f1696b0a13 100644 --- a/deal.II/base/include/base/thread_management.h +++ b/deal.II/base/include/base/thread_management.h @@ -16,17 +16,16 @@ #include #include +#include +#include +#include +#include #include #include +#include #include -#include -#include -#include -#include -#include -#include #if DEAL_II_USE_MT == 1 # if defined(DEAL_II_USE_MT_POSIX) @@ -922,14 +921,14 @@ namespace Threads namespace internal { template - inline void call (const boost::function &function, + inline void call (const std_cxx0x::function &function, internal::return_value &ret_val) { ret_val.set (function()); } - inline void call (const boost::function &function, + inline void call (const std_cxx0x::function &function, internal::return_value &) { function(); @@ -954,7 +953,7 @@ namespace Threads * for each number of arguments. */ template ::value> + int length = std_cxx0x::tuples::length::value> struct fun_ptr_helper; @@ -982,7 +981,7 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type); }; @@ -996,8 +995,8 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type); }; @@ -1011,9 +1010,9 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type); }; @@ -1027,10 +1026,10 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type); }; @@ -1044,11 +1043,11 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type); }; @@ -1062,12 +1061,12 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type, - typename boost::tuples::element<5,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type, + typename std_cxx0x::tuples::element<5,ArgList>::type); }; @@ -1081,13 +1080,13 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type, - typename boost::tuples::element<5,ArgList>::type, - typename boost::tuples::element<6,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type, + typename std_cxx0x::tuples::element<5,ArgList>::type, + typename std_cxx0x::tuples::element<6,ArgList>::type); }; @@ -1101,14 +1100,14 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type, - typename boost::tuples::element<5,ArgList>::type, - typename boost::tuples::element<6,ArgList>::type, - typename boost::tuples::element<7,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type, + typename std_cxx0x::tuples::element<5,ArgList>::type, + typename std_cxx0x::tuples::element<6,ArgList>::type, + typename std_cxx0x::tuples::element<7,ArgList>::type); }; @@ -1122,15 +1121,15 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type, - typename boost::tuples::element<5,ArgList>::type, - typename boost::tuples::element<6,ArgList>::type, - typename boost::tuples::element<7,ArgList>::type, - typename boost::tuples::element<8,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type, + typename std_cxx0x::tuples::element<5,ArgList>::type, + typename std_cxx0x::tuples::element<6,ArgList>::type, + typename std_cxx0x::tuples::element<7,ArgList>::type, + typename std_cxx0x::tuples::element<8,ArgList>::type); }; @@ -1145,16 +1144,16 @@ namespace Threads template struct fun_ptr_helper { - typedef RT (type) (typename boost::tuples::element<0,ArgList>::type, - typename boost::tuples::element<1,ArgList>::type, - typename boost::tuples::element<2,ArgList>::type, - typename boost::tuples::element<3,ArgList>::type, - typename boost::tuples::element<4,ArgList>::type, - typename boost::tuples::element<5,ArgList>::type, - typename boost::tuples::element<6,ArgList>::type, - typename boost::tuples::element<7,ArgList>::type, - typename boost::tuples::element<8,ArgList>::type, - typename boost::tuples::element<9,ArgList>::type); + typedef RT (type) (typename std_cxx0x::tuples::element<0,ArgList>::type, + typename std_cxx0x::tuples::element<1,ArgList>::type, + typename std_cxx0x::tuples::element<2,ArgList>::type, + typename std_cxx0x::tuples::element<3,ArgList>::type, + typename std_cxx0x::tuples::element<4,ArgList>::type, + typename std_cxx0x::tuples::element<5,ArgList>::type, + typename std_cxx0x::tuples::element<6,ArgList>::type, + typename std_cxx0x::tuples::element<7,ArgList>::type, + typename std_cxx0x::tuples::element<8,ArgList>::type, + typename std_cxx0x::tuples::element<9,ArgList>::type); }; @@ -1371,7 +1370,7 @@ namespace Threads #if defined(DEAL_II_NAMESP_TEMPL_FRIEND_BUG2) || defined(DEAL_II_NAMESP_TEMPL_FRIEND_BUG) public: #endif - Thread (const boost::shared_ptr > &td) + Thread (const std_cxx0x::shared_ptr > &td) : thread_descriptor (td) {} public: @@ -1452,7 +1451,7 @@ namespace Threads * as long as there is at least * one subscriber to it. */ - boost::shared_ptr > thread_descriptor; + std_cxx0x::shared_ptr > thread_descriptor; #if !defined(DEAL_II_NAMESP_TEMPL_FRIEND_BUG2) && !defined(DEAL_II_NAMESP_TEMPL_FRIEND_BUG) template friend struct internal::ThreadStarter; @@ -1489,11 +1488,11 @@ namespace Threads * simply call the function. */ static - Thread start_thread (const boost::function &function) + Thread start_thread (const std_cxx0x::function &function) { ThreadStarter wrapper (function); wrapper.thread_descriptor = - boost::shared_ptr > + std_cxx0x::shared_ptr > (new internal::thread_description()); #if (DEAL_II_USE_MT == 1) @@ -1544,7 +1543,7 @@ namespace Threads * their knowledge of the * types involved. */ - ThreadStarter (const boost::function &function) + ThreadStarter (const std_cxx0x::function &function) : function (function), data_has_been_copied (false) @@ -1555,7 +1554,7 @@ namespace Threads * unique object describing a * thread on the OS level. */ - boost::shared_ptr > + std_cxx0x::shared_ptr > thread_descriptor; /** @@ -1577,7 +1576,7 @@ namespace Threads * because of the way the creation of * threads is staged. */ - const boost::function &function; + const std_cxx0x::function &function; /** * A variable that indicates whether @@ -1599,9 +1598,9 @@ namespace Threads // copy information from // the stack of the // calling thread - boost::function function = wrapper->function; + std_cxx0x::function function = wrapper->function; - boost::shared_ptr > + std_cxx0x::shared_ptr > thread_descriptor = wrapper->thread_descriptor; // signal the fact that @@ -1660,7 +1659,7 @@ namespace Threads { /** * A general template that returns - * boost::ref(t) if t is of reference + * std_cxx0x::ref(t) if t is of reference * type, and t otherwise. * * The case that t is of reference type @@ -1668,7 +1667,7 @@ namespace Threads * declared below. */ template - struct maybe_make_boost_ref + struct maybe_make_ref { static T act (T &t) { @@ -1680,7 +1679,7 @@ namespace Threads /** * A general template that returns - * boost::ref(t) if t is of reference + * std_cxx0x::ref(t) if t is of reference * type, and t otherwise. * * The case that t is of reference type @@ -1688,11 +1687,11 @@ namespace Threads * specialization. */ template - struct maybe_make_boost_ref + struct maybe_make_ref { - static boost::reference_wrapper act (T &t) + static std_cxx0x::reference_wrapper act (T &t) { - return boost::ref(t); + return std_cxx0x::ref(t); } }; } @@ -1744,7 +1743,7 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} @@ -1756,7 +1755,7 @@ namespace Threads } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1772,22 +1771,22 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1803,24 +1802,24 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1836,26 +1835,26 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1871,28 +1870,28 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1908,30 +1907,30 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4, - typename boost::tuples::element<4,ArgList>::type arg5) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4, + typename std_cxx0x::tuples::element<4,ArgList>::type arg5) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4), - internal::maybe_make_boost_ref::type>::act(arg5))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4), + internal::maybe_make_ref::type>::act(arg5))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1947,32 +1946,32 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4, - typename boost::tuples::element<4,ArgList>::type arg5, - typename boost::tuples::element<5,ArgList>::type arg6) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4, + typename std_cxx0x::tuples::element<4,ArgList>::type arg5, + typename std_cxx0x::tuples::element<5,ArgList>::type arg6) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4), - internal::maybe_make_boost_ref::type>::act(arg5), - internal::maybe_make_boost_ref::type>::act(arg6))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4), + internal::maybe_make_ref::type>::act(arg5), + internal::maybe_make_ref::type>::act(arg6))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -1988,34 +1987,34 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4, - typename boost::tuples::element<4,ArgList>::type arg5, - typename boost::tuples::element<5,ArgList>::type arg6, - typename boost::tuples::element<6,ArgList>::type arg7) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4, + typename std_cxx0x::tuples::element<4,ArgList>::type arg5, + typename std_cxx0x::tuples::element<5,ArgList>::type arg6, + typename std_cxx0x::tuples::element<6,ArgList>::type arg7) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4), - internal::maybe_make_boost_ref::type>::act(arg5), - internal::maybe_make_boost_ref::type>::act(arg6), - internal::maybe_make_boost_ref::type>::act(arg7))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4), + internal::maybe_make_ref::type>::act(arg5), + internal::maybe_make_ref::type>::act(arg6), + internal::maybe_make_ref::type>::act(arg7))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -2031,36 +2030,36 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4, - typename boost::tuples::element<4,ArgList>::type arg5, - typename boost::tuples::element<5,ArgList>::type arg6, - typename boost::tuples::element<6,ArgList>::type arg7, - typename boost::tuples::element<7,ArgList>::type arg8) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4, + typename std_cxx0x::tuples::element<4,ArgList>::type arg5, + typename std_cxx0x::tuples::element<5,ArgList>::type arg6, + typename std_cxx0x::tuples::element<6,ArgList>::type arg7, + typename std_cxx0x::tuples::element<7,ArgList>::type arg8) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4), - internal::maybe_make_boost_ref::type>::act(arg5), - internal::maybe_make_boost_ref::type>::act(arg6), - internal::maybe_make_boost_ref::type>::act(arg7), - internal::maybe_make_boost_ref::type>::act(arg8))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4), + internal::maybe_make_ref::type>::act(arg5), + internal::maybe_make_ref::type>::act(arg6), + internal::maybe_make_ref::type>::act(arg7), + internal::maybe_make_ref::type>::act(arg8))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; /** @@ -2076,38 +2075,38 @@ namespace Threads : function (*function) {} - fun_encapsulator (const boost::function::type> &function) + fun_encapsulator (const std_cxx0x::function::type> &function) : function (function) {} inline Thread - operator() (typename boost::tuples::element<0,ArgList>::type arg1, - typename boost::tuples::element<1,ArgList>::type arg2, - typename boost::tuples::element<2,ArgList>::type arg3, - typename boost::tuples::element<3,ArgList>::type arg4, - typename boost::tuples::element<4,ArgList>::type arg5, - typename boost::tuples::element<5,ArgList>::type arg6, - typename boost::tuples::element<6,ArgList>::type arg7, - typename boost::tuples::element<7,ArgList>::type arg8, - typename boost::tuples::element<8,ArgList>::type arg9) + operator() (typename std_cxx0x::tuples::element<0,ArgList>::type arg1, + typename std_cxx0x::tuples::element<1,ArgList>::type arg2, + typename std_cxx0x::tuples::element<2,ArgList>::type arg3, + typename std_cxx0x::tuples::element<3,ArgList>::type arg4, + typename std_cxx0x::tuples::element<4,ArgList>::type arg5, + typename std_cxx0x::tuples::element<5,ArgList>::type arg6, + typename std_cxx0x::tuples::element<6,ArgList>::type arg7, + typename std_cxx0x::tuples::element<7,ArgList>::type arg8, + typename std_cxx0x::tuples::element<8,ArgList>::type arg9) { return ThreadStarter::start_thread - (boost::bind (function, - internal::maybe_make_boost_ref::type>::act(arg1), - internal::maybe_make_boost_ref::type>::act(arg2), - internal::maybe_make_boost_ref::type>::act(arg3), - internal::maybe_make_boost_ref::type>::act(arg4), - internal::maybe_make_boost_ref::type>::act(arg5), - internal::maybe_make_boost_ref::type>::act(arg6), - internal::maybe_make_boost_ref::type>::act(arg7), - internal::maybe_make_boost_ref::type>::act(arg8), - internal::maybe_make_boost_ref::type>::act(arg9))); + (std_cxx0x::bind (function, + internal::maybe_make_ref::type>::act(arg1), + internal::maybe_make_ref::type>::act(arg2), + internal::maybe_make_ref::type>::act(arg3), + internal::maybe_make_ref::type>::act(arg4), + internal::maybe_make_ref::type>::act(arg5), + internal::maybe_make_ref::type>::act(arg6), + internal::maybe_make_ref::type>::act(arg7), + internal::maybe_make_ref::type>::act(arg8), + internal::maybe_make_ref::type>::act(arg9))); } private: - boost::function::type> function; + std_cxx0x::function::type> function; }; } @@ -2123,7 +2122,7 @@ namespace Threads */ template inline - internal::fun_encapsulator,0> + internal::fun_encapsulator,0> spawn (RT (*fun_ptr)()) { return fun_ptr; @@ -2137,12 +2136,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,0> + internal::fun_encapsulator,0> spawn (C &c, RT (C::*fun_ptr)()) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c))); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c))); } /** @@ -2152,12 +2151,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,0> + internal::fun_encapsulator,0> spawn (const C &c, RT (C::*fun_ptr)() const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c))); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c))); } @@ -2172,7 +2171,7 @@ namespace Threads */ template inline - internal::fun_encapsulator,1> + internal::fun_encapsulator,1> spawn (RT (*fun_ptr)(Arg1)) { return fun_ptr; @@ -2187,12 +2186,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,1> + internal::fun_encapsulator,1> spawn (C &c, RT (C::*fun_ptr)(Arg1)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1)); } /** @@ -2202,12 +2201,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,1> + internal::fun_encapsulator,1> spawn (const C &c, RT (C::*fun_ptr)(Arg1) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1)); } @@ -2220,7 +2219,7 @@ namespace Threads */ template inline - internal::fun_encapsulator,2> + internal::fun_encapsulator,2> spawn (RT (*fun_ptr)(Arg1,Arg2)) { return fun_ptr; @@ -2235,12 +2234,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,2> + internal::fun_encapsulator,2> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2)); } /** @@ -2250,12 +2249,12 @@ namespace Threads */ template inline - internal::fun_encapsulator,2> + internal::fun_encapsulator,2> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2)); } @@ -2269,7 +2268,7 @@ namespace Threads template inline - internal::fun_encapsulator,3> + internal::fun_encapsulator,3> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3)) { return fun_ptr; @@ -2285,12 +2284,12 @@ namespace Threads template inline - internal::fun_encapsulator,3> + internal::fun_encapsulator,3> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3)); } /** @@ -2301,12 +2300,12 @@ namespace Threads template inline - internal::fun_encapsulator,3> + internal::fun_encapsulator,3> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3)); } @@ -2321,7 +2320,7 @@ namespace Threads template inline - internal::fun_encapsulator,4> + internal::fun_encapsulator,4> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4)) { return fun_ptr; @@ -2337,12 +2336,12 @@ namespace Threads template inline - internal::fun_encapsulator,4> + internal::fun_encapsulator,4> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4)); } /** @@ -2353,12 +2352,12 @@ namespace Threads template inline - internal::fun_encapsulator,4> + internal::fun_encapsulator,4> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4)); } @@ -2373,7 +2372,7 @@ namespace Threads typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5> inline - internal::fun_encapsulator,5> + internal::fun_encapsulator,5> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5)) { return fun_ptr; @@ -2390,12 +2389,12 @@ namespace Threads typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5> inline - internal::fun_encapsulator,5> + internal::fun_encapsulator,5> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4, _5)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4, _5)); } /** @@ -2407,12 +2406,12 @@ namespace Threads typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5> inline - internal::fun_encapsulator,5> + internal::fun_encapsulator,5> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4, _5)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4, _5)); } @@ -2427,7 +2426,7 @@ namespace Threads typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6> inline - internal::fun_encapsulator,6> + internal::fun_encapsulator,6> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6)) { return fun_ptr; @@ -2444,12 +2443,12 @@ namespace Threads typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6> inline - internal::fun_encapsulator,6> + internal::fun_encapsulator,6> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4, _5, _6)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4, _5, _6)); } /** @@ -2462,12 +2461,12 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6> inline internal::fun_encapsulator,6> + std_cxx0x::tuple,6> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4, _5, _6)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4, _5, _6)); } @@ -2483,7 +2482,7 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7> inline - internal::fun_encapsulator,7> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7)) { @@ -2502,13 +2501,13 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7> inline - internal::fun_encapsulator,7> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4, _5, _6, _7)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4, _5, _6, _7)); } /** @@ -2522,13 +2521,13 @@ namespace Threads typename Arg7> inline internal::fun_encapsulator,7> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4, _5, _6, _7)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4, _5, _6, _7)); } @@ -2544,7 +2543,7 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8> inline - internal::fun_encapsulator,8> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, @@ -2565,15 +2564,15 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8> inline - internal::fun_encapsulator,8> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, Arg6,Arg7,Arg8)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4, _5, _6, _7, _8)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4, _5, _6, _7, _8)); } /** @@ -2587,15 +2586,15 @@ namespace Threads typename Arg7, typename Arg8> inline internal::fun_encapsulator,8> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, Arg6,Arg7,Arg8) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4, _5, _6, _7, _8)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4, _5, _6, _7, _8)); } @@ -2611,7 +2610,7 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9> inline - internal::fun_encapsulator,9> spawn (RT (*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, @@ -2632,15 +2631,15 @@ namespace Threads typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9> inline - internal::fun_encapsulator,9> spawn (C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, Arg6,Arg7,Arg8,Arg9)) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::ref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::ref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); } /** @@ -2654,15 +2653,15 @@ namespace Threads typename Arg7, typename Arg8, typename Arg9> inline internal::fun_encapsulator,9> spawn (const C &c, RT (C::*fun_ptr)(Arg1,Arg2,Arg3,Arg4,Arg5, Arg6,Arg7,Arg8,Arg9) const) { return - boost::function >::type> - (boost::bind(fun_ptr, boost::cref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); + std_cxx0x::function >::type> + (std_cxx0x::bind(fun_ptr, std_cxx0x::cref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); } diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 6ec97c124b..e7f06d871f 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include #include @@ -1779,7 +1779,7 @@ DataOutBase::write_data ( template void DataOutBase::write_ucd (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const UcdFlags &flags, std::ostream &out) { @@ -1860,7 +1860,7 @@ void DataOutBase::write_ucd (const std::vector > &patches, template void DataOutBase::write_dx (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const DXFlags &flags, std::ostream &out) { @@ -2126,7 +2126,7 @@ void DataOutBase::write_dx (const std::vector > &patches, template void DataOutBase::write_gnuplot (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const GnuplotFlags &/*flags*/, std::ostream &out) { @@ -2343,7 +2343,7 @@ void DataOutBase::write_gnuplot (const std::vector > &patche template void DataOutBase::write_povray (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const PovrayFlags &flags, std::ostream &out) { @@ -2689,7 +2689,7 @@ void DataOutBase::write_povray (const std::vector > &patches template void DataOutBase::write_eps (const std::vector > &patches, const std::vector &/*data_names*/, - const std::vector > &, + const std::vector > &, const EpsFlags &flags, std::ostream &out) { @@ -3051,7 +3051,7 @@ void DataOutBase::write_eps (const std::vector > &patches, template void DataOutBase::write_gmv (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const GmvFlags &flags, std::ostream &out) { @@ -3187,7 +3187,7 @@ void DataOutBase::write_gmv (const std::vector > &patches, template void DataOutBase::write_tecplot (const std::vector > &patches, const std::vector &data_names, - const std::vector > &, + const std::vector > &, const TecplotFlags &flags, std::ostream &out) { @@ -3421,7 +3421,7 @@ namespace template void DataOutBase::write_tecplot_binary (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const TecplotFlags &flags, std::ostream &out) { @@ -3753,7 +3753,7 @@ template void DataOutBase::write_vtk (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const VtkFlags &flags, std::ostream &out) { @@ -3989,7 +3989,7 @@ void DataOutBase:: write_deal_II_intermediate (const std::vector > &patches, const std::vector &data_names, - const std::vector > &vector_data_ranges, + const std::vector > &vector_data_ranges, const Deal_II_IntermediateFlags &/*flags*/, std::ostream &out) { @@ -4493,10 +4493,10 @@ DataOutInterface::memory_consumption () const template -std::vector > +std::vector > DataOutInterface::get_vector_data_ranges () const { - return std::vector >(); + return std::vector >(); } @@ -4521,7 +4521,7 @@ DataOutReader::read (std::istream &in) tmp.swap (dataset_names); } { - std::vector > tmp; + std::vector > tmp; tmp.swap (vector_data_ranges); } @@ -4704,7 +4704,7 @@ DataOutReader::get_dataset_names () const template -std::vector > +std::vector > DataOutReader::get_vector_data_ranges () const { return vector_data_ranges; diff --git a/deal.II/base/source/exceptions.cc b/deal.II/base/source/exceptions.cc index 8d29eadf8f..80b2681ebe 100644 --- a/deal.II/base/source/exceptions.cc +++ b/deal.II/base/source/exceptions.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors +// Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005, 2006, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -209,7 +209,8 @@ void ExceptionBase::print_stack_trace (std::ostream &out) const // off if they are // trailing a template // argument list - while (realname.find (", boost::tuples::null_type>") != std::string::npos) + while (realname.find (", boost::tuples::null_type>") + != std::string::npos) realname.erase (realname.find (", boost::tuples::null_type>"), std::string (", boost::tuples::null_type").size()); diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index febc54d508..b971f3a216 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -122,10 +122,10 @@ LogStream::get_stream() Threads::ThreadMutex::ScopedLock lock(log_lock); unsigned int id = Threads::this_thread_id(); - boost::shared_ptr& sptr = outstreams[id]; + std_cxx0x::shared_ptr& sptr = outstreams[id]; if (sptr == 0) { - sptr = boost::shared_ptr (new std::ostringstream()); + sptr = std_cxx0x::shared_ptr (new std::ostringstream()); sptr->setf(std::ios::showpoint | std::ios::left); } return *sptr; diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 9a2cfdec7f..f4f17bc2f2 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -142,6 +142,22 @@ inconvenience this causes.

General

    +
  1. +

    + Changed: Some parts of the library used to use classes and functions + from the BOOST library. Since + many of the components of BOOST have been voted into what will be the + next C++ standard, we now use a namespace std_cxx0x (coined on the + provisional name C++0x used for the next C++ standard) into which we + import BOOST components as necessary. If a compiler supports C++0x, + we can then later replace BOOST components by elements from namespace + std in one central place, rather than all throughout the + code. +
    + (WB 2009/01/12) +

    +
  2. +
  3. Updated: The @ref step_33 "step-33" tutorial program now uses the