$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r63702 - in sandbox/SOC/2010/phoenix3: boost/phoenix boost/phoenix/core boost/phoenix/object boost/phoenix/object/detail boost/phoenix/stl boost/phoenix/stl/algorithm boost/phoenix/stl/algorithm/detail boost/phoenix/stl/container boost/phoenix/stl/container/detail libs/phoenix/test libs/phoenix/test/algorithm libs/phoenix/test/container libs/phoenix/test/core libs/phoenix/test/scope libs/phoenix/test/statement
From: thom.heller_at_[hidden]
Date: 2010-07-06 12:23:55
Author: theller
Date: 2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
New Revision: 63702
URL: http://svn.boost.org/trac/boost/changeset/63702
Log:
phoenix stl port finished
Added:
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/begin.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/decay_array.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/end.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_equal_range.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_find.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_lower_bound.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove_if.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_reverse.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_sort.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_unique.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_upper_bound.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_map.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_set.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_list.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_map.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_set.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/iteration.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/querying.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/transformation.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/container.hpp   (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/detail/container.hpp   (contents, props changed)
Text files modified: 
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp                 |     4 +                                       
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp        |     2                                         
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp                    |    11 +--                                     
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile                       |    46 +++++++++---------                      
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/iteration.cpp       |    12 ++--                                    
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying.cpp        |    69 +++++++++++++++-------------            
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying2.cpp       |    22 +++++----                               
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation1.cpp |    96 ++++++++++++++++++++++----------------- 
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation2.cpp |    42 +++++++++--------                       
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation3.cpp |    42 ++++++++++------                        
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation4.cpp |    34 ++++++++-----                           
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/container/container_tests.hpp |     6 +-                                      
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/core/compose_tests.cpp        |     2                                         
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/dynamic_tests.cpp       |     6 +-                                      
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/lambda_tests.cpp        |     8 +-                                      
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp           |     8 +-                                      
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/statement/switch_tests.cpp    |     6 +-                                      
   17 files changed, 227 insertions(+), 189 deletions(-)
Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp	(original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -66,6 +66,8 @@
         make_argument<mpl::int_<0> >::type const arg1 = {};
         make_argument<mpl::int_<1> >::type const arg2 = {};
         make_argument<mpl::int_<2> >::type const arg3 = {};
+        make_argument<mpl::int_<3> >::type const arg4 = {};
+        make_argument<mpl::int_<4> >::type const arg5 = {};
 
     //  BLL style names
         make_argument<mpl::int_<0> >::type const _1 = {};
@@ -80,6 +82,8 @@
         using placeholders::arg1;
         using placeholders::arg2;
         using placeholders::arg3;
+        using placeholders::arg4;
+        using placeholders::arg5;
 
         using placeholders::_1;
         using placeholders::_2;
Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp	(original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -12,7 +12,7 @@
 #define PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
 
 #define PHOENIX_ITERATION_PARAMS                                                \
-        (4, (4, PHOENIX_COMPOSITE_LIMIT,                                        \
+        (3, (4, PHOENIX_COMPOSITE_LIMIT,                                        \
         <boost/phoenix/object/detail/new_eval.hpp>))
 #include PHOENIX_ITERATE()
 
Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp	(original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -5,9 +5,6 @@
     Distributed under 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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_OBJECT_NEW_HPP
 #define PHOENIX_OBJECT_NEW_HPP
 
@@ -69,28 +66,28 @@
     typename make_new<T>::type const
     new_()
     {
-        make_new<T>()();
+        return make_new<T>()();
     }
 
     template <typename T, typename A0>
     typename make_new<T, A0>::type const
     new_(A0 const& a0)
     {
-        make_new<T, A0>()(a0);
+        return make_new<T, A0>()(a0);
     }
 
     template <typename T, typename A0, typename A1>
     typename make_new<T, A0, A1>::type const
     new_(A0 const& a0, A1 const& a1)
     {
-        make_new<T, A0>()(a0, a1);
+        return make_new<T, A0, A1>()(a0, a1);
     }
 
     template <typename T, typename A0, typename A1, typename A2>
     typename make_new<T, A0, A1, A2>::type const
     new_(A0 const& a0, A1 const& a1, A2 const& a2)
     {
-        make_new<T, A0>()(a0, a1, a2);
+        return make_new<T, A0, A1, A2>()(a0, a1, a2);
     }
 
     // Bring in the rest
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,15 @@
+/*=============================================================================
+    Copyright (c) 2006 Daniel Wallin
+    Copyright (c) 2005 Dan Marsden
+    Copyright (c) 2007 Joel de Guzman
+
+    Distributed under 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 PHOENIX_STL_HPP
+#define PHOENIX_STL_HPP
+
+#include <boost/phoenix/stl/algorithm.hpp>
+#include <boost/phoenix/stl/container.hpp>
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,17 @@
+/*=============================================================================
+    Copyright (c) 2004 Angus Leeming
+    Copyright (c) 2006 Daniel Wallin
+    Copyright (c) 2005 Dan Marsden
+    Copyright (c) 2007 Joel de Guzman
+
+    Distributed under 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 PHOENIX_STL_ALGORITHM_HPP
+#define PHOENIX_STL_ALGORITHM_HPP
+
+#include <boost/phoenix/stl/algorithm/iteration.hpp>
+#include <boost/phoenix/stl/algorithm/querying.hpp>
+#include <boost/phoenix/stl/algorithm/transformation.hpp>
+
+#endif // PHOENIX_STL_ALGORITHM_HPP
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/begin.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/begin.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,28 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_DETAIL_BEGIN_HPP
+#define PHOENIX_ALGORITHM_DETAIL_BEGIN_HPP
+
+#include <boost/range/result_iterator.hpp>
+#include <boost/range/begin.hpp>
+
+namespace boost { namespace phoenix {
+namespace detail
+{
+  template<class R>
+  typename range_result_iterator<R>::type
+  begin_(R& r)
+  {
+      return boost::begin(r);
+  }
+}
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/decay_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/decay_array.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,36 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP
+#define PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP
+
+namespace boost { namespace phoenix {
+namespace detail
+{
+  template<typename T>
+  struct decay_array
+  {
+      typedef T type;
+  };
+
+  template<typename T, int N>
+  struct decay_array<T[N]>
+  {
+      typedef T* type;
+  };
+
+  template<typename T, int N>
+  struct decay_array<T (&)[N]>
+  {
+      typedef T* type;
+  };
+}
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/end.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/end.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,28 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_DETAIL_END_HPP
+#define PHOENIX_ALGORITHM_DETAIL_END_HPP
+
+#include <boost/range/result_iterator.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost { namespace phoenix {
+namespace detail
+{ 
+  template<class R>
+  typename range_result_iterator<R>::type
+  end_(R& r)
+  {
+      return boost::end(r);
+  }
+}
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_equal_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_equal_range.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,51 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_equal_range.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_EQUAL_RANGE_EN_14_12_2004
+#define HAS_EQUAL_RANGE_EN_14_12_2004
+
+#include <boost/mpl/or.hpp>
+#include "./is_std_map.hpp"
+#include "./is_std_set.hpp"
+#include "./is_std_hash_map.hpp"
+#include "./is_std_hash_set.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_equal_range
+        : boost::mpl::or_<
+            boost::mpl::or_<
+                is_std_map<T>
+              , is_std_multimap<T>
+              , is_std_set<T>
+              , is_std_multiset<T>
+            >
+          , boost::mpl::or_<
+                is_std_hash_map<T>
+              , is_std_hash_multimap<T>
+              , is_std_hash_set<T>
+              , is_std_hash_multiset<T>
+          >
+        >
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_find.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_find.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,51 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_find.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_FIND_EN_14_12_2004
+#define HAS_FIND_EN_14_12_2004
+
+#include <boost/mpl/or.hpp>
+#include "./is_std_map.hpp"
+#include "./is_std_set.hpp"
+#include "./is_std_hash_map.hpp"
+#include "./is_std_hash_set.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_find
+        : boost::mpl::or_<
+            boost::mpl::or_<
+                is_std_map<T>
+              , is_std_multimap<T>
+              , is_std_set<T>
+              , is_std_multiset<T>
+            >
+          , boost::mpl::or_<
+                is_std_hash_map<T>
+              , is_std_hash_multimap<T>
+              , is_std_hash_set<T>
+              , is_std_hash_multiset<T>
+          >
+        >
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_lower_bound.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_lower_bound.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,51 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_lower_bound.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_LOWER_BOUND_EN_14_12_2004
+#define HAS_LOWER_BOUND_EN_14_12_2004
+
+#include <boost/mpl/or.hpp>
+#include "./is_std_map.hpp"
+#include "./is_std_set.hpp"
+#include "./is_std_hash_map.hpp"
+#include "./is_std_hash_set.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_lower_bound
+        : boost::mpl::or_<
+            boost::mpl::or_<
+                is_std_map<T>
+              , is_std_multimap<T>
+              , is_std_set<T>
+              , is_std_multiset<T>
+            >
+          , boost::mpl::or_<
+                is_std_hash_map<T>
+              , is_std_hash_multimap<T>
+              , is_std_hash_set<T>
+              , is_std_hash_multiset<T>
+          >
+        >
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,34 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_remove.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_REMOVE_EN_14_12_2004
+#define HAS_REMOVE_EN_14_12_2004
+
+#include "./is_std_list.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_remove
+        : is_std_list<T>
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_remove_if.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,34 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_remove_if.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_REMOVE_IF_EN_14_12_2004
+#define HAS_REMOVE_IF_EN_14_12_2004
+
+#include "./is_std_list.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_remove_if
+        : is_std_list<T>
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_reverse.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_reverse.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,34 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_reverse.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_REVERSE_EN_14_12_2004
+#define HAS_REVERSE_EN_14_12_2004
+
+#include "./is_std_list.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_reverse
+        : is_std_list<T>
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_sort.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_sort.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,34 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_sort.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_SORT_EN_14_12_2004
+#define HAS_SORT_EN_14_12_2004
+
+#include "./is_std_list.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_sort
+        : is_std_list<T>
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_unique.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_unique.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,34 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_unique.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_UNIQUE_EN_14_12_2004
+#define HAS_UNIQUE_EN_14_12_2004
+
+#include "./is_std_list.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_unique
+        : is_std_list<T>
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_upper_bound.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/has_upper_bound.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,51 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// has_upper_bound.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef HAS_UPPER_BOUND_EN_14_12_2004
+#define HAS_UPPER_BOUND_EN_14_12_2004
+
+#include <boost/mpl/or.hpp>
+#include "./is_std_map.hpp"
+#include "./is_std_set.hpp"
+#include "./is_std_hash_map.hpp"
+#include "./is_std_hash_set.hpp"
+
+namespace boost
+{
+    // Specialize this for user-defined types
+    template<typename T>
+    struct has_upper_bound
+        : boost::mpl::or_<
+            boost::mpl::or_<
+                is_std_map<T>
+              , is_std_multimap<T>
+              , is_std_set<T>
+              , is_std_multiset<T>
+            >
+          , boost::mpl::or_<
+                is_std_hash_map<T>
+              , is_std_hash_multimap<T>
+              , is_std_hash_set<T>
+              , is_std_hash_multiset<T>
+          >
+        >
+    {
+    };
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_map.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,87 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// is_std_hash_map.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef IS_STD_HASH_MAP_EN_16_12_2004
+#define IS_STD_HASH_MAP_EN_16_12_2004
+
+#include <boost/mpl/bool.hpp>
+#include "./std_hash_map_fwd.hpp"
+
+namespace boost
+{
+    template<class T>
+    struct is_std_hash_map
+        : boost::mpl::false_
+    {};
+
+    template<class T>
+    struct is_std_hash_multimap
+        : boost::mpl::false_
+    {};
+
+#ifdef BOOST_HAS_HASH
+
+    template<
+        class Kty
+      , class Ty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    struct is_std_hash_map< ::BOOST_STD_EXTENSION_NAMESPACE::hash_map<Kty,Ty,Hash,Cmp,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<
+        class Kty
+      , class Ty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    struct is_std_hash_multimap< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<Kty,Ty,Hash,Cmp,Alloc> >
+        : boost::mpl::true_
+    {};
+
+#elif defined(BOOST_DINKUMWARE_STDLIB)
+
+    template<
+        class Kty
+      , class Ty
+      , class Tr
+      , class Alloc
+    >
+    struct is_std_hash_map< ::BOOST_STD_EXTENSION_NAMESPACE::hash_map<Kty,Ty,Tr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<
+        class Kty
+      , class Ty
+      , class Tr
+      , class Alloc
+    >
+    struct is_std_hash_multimap< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<Kty,Ty,Tr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+#endif
+
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_hash_set.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,83 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// is_std_hash_set.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef IS_STD_HASH_SET_EN_16_12_2004
+#define IS_STD_HASH_SET_EN_16_12_2004
+
+#include <boost/mpl/bool.hpp>
+#include "./std_hash_set_fwd.hpp"
+
+namespace boost
+{
+    template<class T>
+    struct is_std_hash_set
+        : boost::mpl::false_
+    {};
+
+    template<class T>
+    struct is_std_hash_multiset
+        : boost::mpl::false_
+    {};
+
+#if defined(BOOST_HAS_HASH)
+
+    template<
+        class Kty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set<Kty,Hash,Cmp,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<
+        class Kty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<Kty,Hash,Cmp,Alloc> >
+        : boost::mpl::true_
+    {};
+
+#elif defined(BOOST_DINKUMWARE_STDLIB)
+
+    template<
+        class Kty
+      , class Tr
+      , class Alloc
+    >
+    struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set<Kty,Tr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<
+        class Kty
+      , class Tr
+      , class Alloc
+    >
+    struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<Kty,Tr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+#endif
+
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_list.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,41 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// is_std_list.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef IS_STD_LIST_EN_16_12_2004
+#define IS_STD_LIST_EN_16_12_2004
+
+#include <boost/mpl/bool.hpp>
+#include <boost/detail/container_fwd.hpp>
+
+namespace boost
+{
+    template<class T>
+    struct is_std_list
+        : boost::mpl::false_
+    {};
+
+    template<
+        class Ty
+      , class Alloc
+    >
+    struct is_std_list< ::std::list<Ty,Alloc> >
+        : boost::mpl::true_
+    {};
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_map.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,58 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// is_std_map.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef IS_STD_MAP_EN_16_12_2004
+#define IS_STD_MAP_EN_16_12_2004
+
+#include <boost/mpl/bool.hpp>
+#include <boost/detail/container_fwd.hpp>
+
+namespace boost
+{
+    template<class T>
+    struct is_std_map
+        : boost::mpl::false_
+    {};
+
+    template<
+        class Kty
+      , class Ty
+      , class Pr
+      , class Alloc
+    >
+    struct is_std_map< ::std::map<Kty,Ty,Pr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<class T>
+    struct is_std_multimap
+        : boost::mpl::false_
+    {};
+
+    template<
+        class Kty
+      , class Ty
+      , class Pr
+      , class Alloc
+    >
+    struct is_std_multimap< ::std::multimap<Kty,Ty,Pr,Alloc> >
+        : boost::mpl::true_
+    {};
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/is_std_set.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,56 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// is_std_set.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef IS_STD_SET_EN_16_12_2004
+#define IS_STD_SET_EN_16_12_2004
+
+#include <boost/mpl/bool.hpp>
+#include <boost/detail/container_fwd.hpp>
+
+namespace boost
+{
+    template<class T>
+    struct is_std_set
+        : boost::mpl::false_
+    {};
+
+    template<
+        class Kty
+      , class Pr
+      , class Alloc
+    >
+    struct is_std_set< ::std::set<Kty,Pr,Alloc> >
+        : boost::mpl::true_
+    {};
+
+    template<class T>
+    struct is_std_multiset
+        : boost::mpl::false_
+    {};
+
+    template<
+        class Kty
+      , class Pr
+      , class Alloc
+    >
+    struct is_std_multiset< ::std::multiset<Kty,Pr,Alloc> >
+        : boost::mpl::true_
+    {};
+}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,70 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// std_hash_map_fwd.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef STD_HASH_MAP_FWD_EN_16_12_2004
+#define STD_HASH_MAP_FWD_EN_16_12_2004
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_HAS_HASH)
+
+namespace BOOST_STD_EXTENSION_NAMESPACE
+{
+    template<
+        class Kty
+      , class Ty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    class hash_map;
+
+    template<
+        class Kty
+      , class Ty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    class hash_multimap;
+}
+
+#elif defined(BOOST_DINKUMWARE_STDLIB)
+
+namespace BOOST_STD_EXTENSION_NAMESPACE
+{
+    template<
+        class Kty
+      , class Ty
+      , class Tr
+      , class Alloc
+    >
+    class hash_map;
+
+    template<
+        class Kty
+      , class Ty
+      , class Tr
+      , class Alloc
+    >
+    class hash_multimap;
+}
+
+#endif
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,66 @@
+// Copyright 2005 Daniel Wallin.
+// Copyright 2005 Joel de Guzman.
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+///////////////////////////////////////////////////////////////////////////////
+//
+// std_hash_set_fwd.hpp
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+# pragma once
+#endif
+
+#ifndef STD_HASH_SET_FWD_EN_16_12_2004
+#define STD_HASH_SET_FWD_EN_16_12_2004
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_HAS_HASH)
+
+namespace BOOST_STD_EXTENSION_NAMESPACE
+{
+    template<
+        class Kty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    class hash_set;
+
+    template<
+        class Kty
+      , class Hash
+      , class Cmp
+      , class Alloc
+    >
+    class hash_multiset;
+}
+
+#elif defined(BOOST_DINKUMWARE_STDLIB)
+
+namespace BOOST_STD_EXTENSION_NAMESPACE
+{
+    template<
+        class Kty
+      , class Tr
+      , class Alloc
+    >
+    class hash_set;
+
+    template<
+        class Kty
+      , class Tr
+      , class Alloc
+    >
+    class hash_multiset;
+}
+
+#endif
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/iteration.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/iteration.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,81 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+// Copyright 2005 Dan Marsden. 
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_ITERATION_HPP
+#define PHOENIX_ALGORITHM_ITERATION_HPP
+
+#include <algorithm>
+#include <numeric>
+
+#include <boost/phoenix/stl/algorithm/detail/begin.hpp>
+#include <boost/phoenix/stl/algorithm/detail/end.hpp>
+
+#include <boost/phoenix/function/function.hpp>
+
+namespace boost { namespace phoenix {
+namespace impl
+{
+    struct for_each
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class F>
+        struct result<This(R&, F)>
+        {
+            typedef F type;
+        };
+
+        template<class R, class F>
+        F operator()(R& r, F fn) const
+        {        
+            return std::for_each(detail::begin_(r), detail::end_(r), fn);
+        }
+    };
+
+    struct accumulate
+    {
+        template <typename Sig>
+        struct result;
+        
+        template<typename This, class R, class I>
+        struct result<This(R&, I)>
+        {
+            typedef I type;
+        };
+
+        template<typename This, class R, class I, class C>
+        struct result<This(R&, I, C)>
+        {
+            typedef I type;
+        };
+
+        template<class R, class I>
+        I
+        operator()(R& r, I i) const
+        {
+            return std::accumulate(detail::begin_(r), detail::end_(r), i);
+        }
+
+        template<class R, class I, class C>
+        I
+        operator()(R& r, I i, C c) const
+        {
+            return std::accumulate(detail::begin_(r), detail::end_(r), i, c);
+        }
+    };
+}
+
+function<impl::for_each> const for_each = impl::for_each();
+function<impl::accumulate> const accumulate = impl::accumulate();
+
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/querying.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/querying.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,643 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+// Copyright 2005 Dan Marsden. 
+// Copyright 2008 Hartmut Kaiser. 
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_QUERYING_HPP
+#define PHOENIX_ALGORITHM_QUERYING_HPP
+
+#include <algorithm>
+
+#include <boost/phoenix/stl/algorithm/detail/has_find.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_lower_bound.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_upper_bound.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_equal_range.hpp>
+
+#include <boost/phoenix/stl/algorithm/detail/begin.hpp>
+#include <boost/phoenix/stl/algorithm/detail/end.hpp>
+#include <boost/phoenix/stl/algorithm/detail/decay_array.hpp>
+
+#include <boost/phoenix/function/function.hpp>
+
+#include <boost/range/result_iterator.hpp>
+#include <boost/range/difference_type.hpp>
+
+namespace boost { namespace phoenix {
+namespace impl
+{
+    struct find
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& x, mpl::true_) const
+        {
+            return r.find(x);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& x, mpl::false_) const
+        {
+            return std::find(detail::begin_(r), detail::end_(r), x);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& x) const
+        {
+            return execute(r, x, has_find<R>());
+        }
+    };
+
+    struct find_if
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::find_if(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct find_end
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class R2>
+        struct result<This(R&, R2&)>
+            : range_result_iterator<R>
+        {};
+
+        template<typename This, class R, class R2, class P>
+        struct result<This(R&, R2&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class R2>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2) const
+        {
+            return std::find_end(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                );
+        }
+
+        template<class R, class R2, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2, P p) const
+        {
+            return std::find_end(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                , p
+                );
+        }
+    };
+
+    struct find_first_of
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class R2>
+        struct result<This(R&, R2&)>
+            : range_result_iterator<R>
+        {};
+
+        template<typename This, class R, class R2, class P>
+        struct result<This(R&, R2&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class R2>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2) const
+        {
+            return std::find_first_of(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                );
+        }
+
+        template<class R, class R2, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2, P p) const
+        {
+            return std::find_first_of(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                , p
+                );
+        }
+    };
+
+    struct adjacent_find
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R>
+        struct result<This(R&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        operator()(R& r) const
+        {
+            return std::adjacent_find(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::adjacent_find(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct count
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : range_difference<R>
+        {};
+
+        template<class R, class T>
+        typename range_difference<R>::type
+        operator()(R& r, T const& x) const
+        {
+            return std::count(detail::begin_(r), detail::end_(r), x);
+        }
+    };
+
+    struct count_if
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_difference<R>
+        {};
+
+        template<class R, class P>
+        typename range_difference<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::count_if(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct distance
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R>
+        struct result<This(R&)>
+            : range_difference<R>
+        {};
+
+        template<class R>
+        typename range_difference<R>::type
+        operator()(R& r) const
+        {
+            return std::distance(detail::begin_(r), detail::end_(r));
+        }
+    };
+
+    struct equal
+    {
+        typedef bool result_type;
+
+        template<class R, class I>
+        bool operator()(R& r, I i) const
+        {
+            return std::equal(detail::begin_(r), detail::end_(r), i);
+        }
+
+        template<class R, class I, class P>
+        bool operator()(R& r, I i, P p) const
+        {
+            return std::equal(detail::begin_(r), detail::end_(r), i, p);
+        }
+    };
+
+    struct search
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, typename R2>
+        struct result<This(R&, R2&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, typename R2, class P>
+        struct result<This(R&, R2&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class R2>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2) const
+        {
+            return std::search(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                );
+        }
+
+        template<class R, class R2, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, R2& r2, P p) const
+        {
+            return std::search(
+                detail::begin_(r)
+                , detail::end_(r)
+                , detail::begin_(r2)
+                , detail::end_(r2)
+                , p
+                );
+        }
+    };
+
+    struct lower_bound 
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, class T, class C>
+        struct result<This(R&, T const&, C)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& val, mpl::true_) const
+        {
+            return r.lower_bound(val);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& val, mpl::false_) const
+        {
+            return std::lower_bound(detail::begin_(r), detail::end_(r), val);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& val) const
+        {
+            return execute(r, val, has_lower_bound<R>());
+        }
+
+        template<class R, class T, class C>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& val, C c) const
+        {
+            return std::lower_bound(detail::begin_(r), detail::end_(r), val, c);
+        }
+    };
+
+    struct upper_bound 
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, class T, class C>
+        struct result<This(R&, T const&, C)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& val, mpl::true_) const
+        {
+            return r.upper_bound(val);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& val, mpl::false_) const
+        {
+            return std::upper_bound(detail::begin_(r), detail::end_(r), val);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& val) const
+        {
+            return execute(r, val, has_upper_bound<R>());
+        }
+
+        template<class R, class T, class C>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& val, C c) const
+        {
+            return std::upper_bound(detail::begin_(r), detail::end_(r), val, c);
+        }
+    };
+
+    namespace result_of
+    {
+        template <typename R, typename T, typename C = void>
+        struct equal_range
+        {
+            typedef std::pair<
+                typename range_result_iterator<R>::type
+                , typename range_result_iterator<R>::type
+            > type;
+        };
+    }
+
+    struct equal_range 
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : result_of::equal_range<R,T>
+        {};
+
+        template <typename This, class R, class T, class C>
+        struct result<This(R&, T const&, C)>
+            : result_of::equal_range<R,T, C>
+        {};
+
+        template<class R, class T>
+        typename result_of::equal_range<R, T>::type
+        execute(R& r, T const& val, mpl::true_) const
+        {
+            return r.equal_range(val);
+        }
+
+        template<class R, class T>
+        typename result_of::equal_range<R, T>::type
+        execute(R& r, T const& val, mpl::false_) const
+        {
+            return std::equal_range(detail::begin_(r), detail::end_(r), val);
+        }
+
+        template<class R, class T>
+        typename result_of::equal_range<R, T>::type
+        operator()(R& r, T const& val) const
+        {
+            return execute(r, val, has_equal_range<R>());
+        }
+
+        template<class R, class T, class C>
+        typename result_of::equal_range<R, T, C>::type
+        operator()(R& r, T const& val, C c) const
+        {
+            return std::equal_range(detail::begin_(r), detail::end_(r), val, c);
+        }
+    };
+
+    namespace result_of
+    {
+        template <typename R, typename I, typename P = void>
+        struct mismatch
+        {
+            typedef std::pair<
+                typename range_result_iterator<R>::type
+                , typename detail::decay_array<I>::type
+            > type;
+        };
+    }
+
+    struct mismatch
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class I>
+        struct result<This(R&, I)>
+            : result_of::mismatch<R, I>
+        {};
+
+        template<typename This, class R, class I, class P>
+        struct result<This(R&, I, P)>
+            : result_of::mismatch<R, I, P>
+        {};
+
+        template<class R, class I>
+        typename result_of::mismatch<R, I>::type
+        operator()(R& r, I i) const
+        {
+            return std::mismatch(detail::begin_(r), detail::end_(r), i);
+        }
+
+        template<class R, class I, class P>
+        typename result_of::mismatch<R, I, P>::type
+        operator()(R& r, I i, P p) const
+        {
+            return std::mismatch(detail::begin_(r), detail::end_(r), i, p);
+        }
+    };
+
+    struct binary_search 
+    {
+        typedef bool result_type;
+
+        template<class R, class T>
+        bool operator()(R& r, T const& val) const
+        {
+            return std::binary_search(detail::begin_(r), detail::end_(r), val);
+        }
+
+        template<class R, class T, class C>
+        bool operator()(R& r, T const& val, C c) const
+        {
+            return std::binary_search(detail::begin_(r), detail::end_(r), val, c);
+        }
+    };
+
+    struct includes 
+    {
+        typedef bool result_type;
+
+        template<class R1, class R2>
+        bool operator()(R1& r1, R2& r2) const
+        {
+            return std::includes(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                );
+        }
+
+        template<class R1, class R2, class C>
+        bool operator()(R1& r1, R2& r2, C c) const
+        {
+            return std::includes(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , c
+                );
+        }
+    };
+
+    struct min_element
+    {
+        template <typename Sig>
+        struct result;
+        
+        template <typename This, class R>
+        struct result<This(R&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        operator()(R& r) const
+        {
+            return std::min_element(detail::begin_(r), detail::end_(r));
+        }
+    
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::min_element(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct max_element
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R>
+        struct result<This(R&)>
+            : range_result_iterator<R>
+        {};
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        operator()(R& r) const
+        {
+            return std::max_element(detail::begin_(r), detail::end_(r));
+        }
+    
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::max_element(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct lexicographical_compare
+    {
+        typedef bool result_type;
+
+        template<class R1, class R2>
+        bool operator()(R1& r1, R2& r2) const
+        {
+            return std::lexicographical_compare(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                );
+        }
+    
+        template<class R1, class R2, class P>
+        bool operator()(R1& r1, R2& r2, P p) const
+        {
+            return std::lexicographical_compare(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , p
+                );
+        }
+    };
+
+}
+
+function<impl::find> const find = impl::find();
+function<impl::find_if> const find_if = impl::find_if();
+function<impl::find_end> const find_end = impl::find_end();
+function<impl::find_first_of> const find_first_of = impl::find_first_of();
+function<impl::adjacent_find> const adjacent_find = impl::adjacent_find();
+function<impl::count> const count = impl::count();
+function<impl::count_if> const count_if = impl::count_if();
+function<impl::distance> const distance = impl::distance();
+function<impl::equal> const equal = impl::equal();
+function<impl::search> const search = impl::search();
+function<impl::lower_bound> const lower_bound = impl::lower_bound();
+function<impl::upper_bound> const upper_bound = impl::upper_bound();
+function<impl::equal_range> const equal_range = impl::equal_range();
+function<impl::mismatch> const mismatch = impl::mismatch();
+function<impl::binary_search> const binary_search = impl::binary_search();
+function<impl::includes> const includes = impl::includes();
+function<impl::min_element> const min_element = impl::min_element();
+function<impl::max_element> const max_element = impl::max_element();
+function<impl::lexicographical_compare> const lexicographical_compare = impl::lexicographical_compare();
+
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/transformation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/algorithm/transformation.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,1149 @@
+// Copyright 2005 Daniel Wallin. 
+// Copyright 2005 Joel de Guzman.
+// Copyright 2005 Dan Marsden. 
+//
+// Use, modification and distribution is 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)
+//
+// Modeled after range_ex, Copyright 2004 Eric Niebler
+
+#ifndef PHOENIX_ALGORITHM_TRANSFORMATION_HPP
+#define PHOENIX_ALGORITHM_TRANSFORMATION_HPP
+
+#include <algorithm>
+#include <numeric>
+
+#include <boost/phoenix/stl/algorithm/detail/has_sort.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_remove.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_remove_if.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_unique.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_reverse.hpp>
+#include <boost/phoenix/stl/algorithm/detail/has_sort.hpp>
+
+#include <boost/phoenix/stl/algorithm/detail/begin.hpp>
+#include <boost/phoenix/stl/algorithm/detail/end.hpp>
+#include <boost/phoenix/stl/algorithm/detail/decay_array.hpp>
+
+#include <boost/phoenix/function/function.hpp>
+
+#include <boost/range/result_iterator.hpp>
+#include <boost/range/difference_type.hpp>
+
+#include <boost/mpl/if.hpp>
+
+#include <boost/type_traits/is_void.hpp>
+
+namespace boost { namespace phoenix { namespace impl
+{
+    struct swap
+    {
+        typedef void result_type;
+
+        template <class A, class B>
+        void operator()(A& a, B& b) const
+        {
+            using std::swap;
+            swap(a, b);
+        }
+    };
+
+    struct copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class I>
+        struct result<This(R&, I)>
+            : detail::decay_array<I>
+        {};
+
+        template<class R, class I>
+        typename detail::decay_array<I>::type
+        operator()(R& r, I i) const
+        {
+            return std::copy(detail::begin_(r), detail::end_(r), i);
+        }
+    };
+
+    struct copy_backward
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class I>
+        struct result<This(R&, I)>
+        {
+            typedef typename remove_reference<I>::type type;
+        };
+
+        template<class R, class I>
+        typename remove_reference<I>::type operator()(R& r, I i) const
+        {
+            return std::copy_backward(detail::begin_(r), detail::end_(r), i);
+        }
+    };
+
+    struct transform
+    {
+        template <typename Sig>
+        struct result;
+        
+        template<typename This, class R, class OutorI1, class ForOut>
+        struct result<This(R&, OutorI1, ForOut)>
+            : detail::decay_array<OutorI1>
+        {
+        };
+
+        template<typename This, class R, class OutorI1, class ForOut, class BinF>
+        struct result<This(R&, OutorI1, ForOut, BinF)>
+            : detail::decay_array<ForOut>
+        {
+        };
+
+        template<class R, class O, class F>
+        typename result<transform(R&,O,F)>::type
+        operator()(R& r, O o, F f) const
+        {
+            return std::transform(detail::begin_(r), detail::end_(r), o, f);
+        }
+
+        template<class R, class I, class O, class F>
+        typename result<transform(R&,I,O,F)>::type
+        operator()(R& r, I i, O o, F f) const
+        {
+            return std::transform(detail::begin_(r), detail::end_(r), i, o, f);
+        }
+    };
+
+    struct replace
+    {
+        typedef void result_type;
+
+        template<class R, class T>
+        void operator()(R& r, T const& what, T const& with) const
+        {
+            std::replace(detail::begin_(r), detail::end_(r), what, with);
+        }
+    };
+
+    struct replace_if
+    {
+        typedef void result_type;
+
+        template<class R, class P, class T>
+        void operator()(R& r, P p, T const& with) const
+        {
+            std::replace_if(detail::begin_(r), detail::end_(r), p, with);
+        }
+    };
+
+    struct replace_copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O, class T, class T2>
+        struct result<This(R&, O, T const&, T2 const&)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O, class T>
+        typename detail::decay_array<O>::type 
+        operator()(R& r, O o, T const& what, T const& with) const
+        {
+            return std::replace_copy(detail::begin_(r), detail::end_(r), o, what, with);
+        }
+    };
+
+    struct replace_copy_if
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O, class P, class T>
+        struct result<This(R&, O, P, T const&)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O, class P, class T>
+        typename detail::decay_array<O>::type
+        operator()(R& r, O o, P p, T const& with) const
+        {
+            return std::replace_copy_if(detail::begin_(r), detail::end_(r), o, p, with);
+        }
+    };
+
+    struct fill
+    {
+        typedef void result_type;
+
+        template<class R, class T>
+        void operator()(R& r, T const& x) const
+        {
+            std::fill(detail::begin_(r), detail::end_(r), x);
+        }
+    };
+
+    struct fill_n
+    {
+        typedef void result_type;
+
+        template<class R, class N, class T>
+        void operator()(R& r, N n, T const& x) const
+        {
+            std::fill_n(detail::begin_(r), n, x);
+        }
+    };
+
+    struct generate
+    {
+        typedef void result_type;
+
+        template<class R, class G>
+        void operator()(R& r, G g) const
+        {
+            std::generate(detail::begin_(r), detail::end_(r), g);
+        }
+    };
+
+    struct generate_n
+    {
+        typedef void result_type;
+
+        template<class R, class N, class G>
+        void operator()(R& r, N n, G g) const
+        {
+            std::generate_n(detail::begin_(r), n, g);
+        }
+    };
+
+    struct remove
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class T>
+        struct result<This(R&, T const&)>
+            : range_result_iterator<R>
+        {
+        };
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& x, mpl::true_) const
+        {
+            r.remove(x);
+            return detail::end_(r);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        execute(R& r, T const& x, mpl::false_) const
+        {
+            return std::remove(detail::begin_(r), detail::end_(r), x);
+        }
+
+        template<class R, class T>
+        typename range_result_iterator<R>::type
+        operator()(R& r, T const& x) const
+        {
+            return execute(r, x, has_remove<R>());
+        }
+    };
+
+    struct remove_if
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class P>
+        struct result<This(R&,P)>
+            : range_result_iterator<R>
+        {
+        };
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        execute(R& r, P p, mpl::true_) const
+        {
+            r.remove_if(p);
+            return detail::end_(r);
+        }
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        execute(R& r, P p, mpl::false_) const
+        {
+            return std::remove_if(detail::begin_(r), detail::end_(r), p);
+        }
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return execute(r, p, has_remove_if<R>());
+        }
+    };
+
+    struct remove_copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O, class T>
+        struct result<This(R&, O, T)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O, class T>
+        typename detail::decay_array<O>::type
+        operator()(R& r, O o, T const& x) const
+        {
+            return std::remove_copy(detail::begin_(r), detail::end_(r), o, x);
+        }
+    };
+
+    struct remove_copy_if
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O, class P>
+        struct result<This(R&, O, P)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O, class P>
+        typename detail::decay_array<O>::type
+        operator()(R& r, O o, P p) const
+        {
+            return std::remove_copy_if(detail::begin_(r), detail::end_(r), o, p);
+        }
+    };
+
+    struct unique
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R>
+        struct result<This(R&)>
+            : range_result_iterator<R>
+        {};
+
+        template<typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        execute(R& r, mpl::true_) const
+        {
+            r.unique();
+            return detail::end_(r);
+        }
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        execute(R& r, mpl::false_) const
+        {
+            return std::unique(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R>
+        typename range_result_iterator<R>::type
+        operator()(R& r) const
+        {
+            return execute(r, has_unique<R>());
+        }
+
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        execute(R& r, P p, mpl::true_) const
+        {
+            r.unique(p);
+            return detail::end_(r);
+        }
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        execute(R& r, P p, mpl::false_) const
+        {
+            return std::unique(detail::begin_(r), detail::end_(r), p);
+        }
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return execute(r, p, has_unique<R>());
+        }
+    };
+
+    struct unique_copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O>
+        struct result<This(R&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template<typename This, class R, class O, class P>
+        struct result<This(R&, O, P)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O>
+        typename detail::decay_array<O>::type operator()(R& r, O o) const
+        {
+            return std::unique_copy(
+                detail::begin_(r)
+                , detail::end_(r)
+                , o
+                );
+        }
+
+        template<class R, class O, class P>
+        typename detail::decay_array<O>::type operator()(R& r, O o, P p) const
+        {
+            return std::unique_copy(
+                detail::begin_(r)
+                , detail::end_(r)
+                , o
+                , p
+                );
+        }
+    };
+
+    struct reverse
+    {
+        typedef void result_type;
+
+        template<class R>
+        void execute(R& r, mpl::true_) const
+        {
+            r.reverse();
+        }
+
+        template<class R>
+        void execute(R& r, mpl::false_) const
+        {
+            std::reverse(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R>
+        void operator()(R& r) const
+        {
+            execute(r, has_reverse<R>());
+        }
+    };
+
+    struct reverse_copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class O>
+        struct result<This(R&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class O>
+        typename detail::decay_array<O>::type operator()(R& r, O o) const
+        {
+            return std::reverse_copy(
+                detail::begin_(r)
+                , detail::end_(r)
+                , o
+                );
+        }
+    };
+
+    struct rotate
+    {
+        typedef void result_type;
+
+        template<class R, class M>
+        void operator()(R& r, M m) const
+        {
+            std::rotate(
+                detail::begin_(r)
+                , m
+                , detail::end_(r)
+                );
+        }
+    };
+
+    struct rotate_copy
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R, class M, class O>
+        struct result<This(R&, M, O)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R, class M, class O>
+        typename detail::decay_array<O>::type operator()(R& r, M m, O o) const
+        {
+            return std::rotate_copy(
+                detail::begin_(r)
+                , m
+                , detail::end_(r)
+                , o
+                );
+        }
+    };
+
+    struct random_shuffle
+    {
+        typedef void result_type;
+
+        template<class R>
+        void operator()(R& r) const
+        {
+            return std::random_shuffle(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R, class G>
+        void operator()(R& r, G g) const
+        {
+            return std::random_shuffle(detail::begin_(r), detail::end_(r), g);
+        }
+    };
+
+    struct partition
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::partition(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct stable_partition
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class P>
+        struct result<This(R&, P)>
+            : range_result_iterator<R>
+        {};
+
+        template<class R, class P>
+        typename range_result_iterator<R>::type
+        operator()(R& r, P p) const
+        {
+            return std::stable_partition(detail::begin_(r), detail::end_(r), p);
+        }
+    };
+
+    struct sort
+    {
+        typedef void result_type;
+
+        template<class R>
+        void execute(R& r, mpl::true_) const
+        {
+            r.sort();
+        }
+
+        template<class R>
+        void execute(R& r, mpl::false_) const
+        {
+            std::sort(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R>
+        void operator()(R& r) const
+        {
+            execute(r, has_sort<R>());
+        }
+
+        template<class R, class C>
+        void execute(R& r, C c, mpl::true_) const
+        {
+            r.sort(c);
+        }
+
+        template<class R, class C>
+        void execute(R& r, C c, mpl::false_) const
+        {
+            std::sort(detail::begin_(r), detail::end_(r), c);
+        }
+
+        template<class R, class C>
+        void operator()(R& r, C c) const
+        {
+            execute(r, c, has_sort<R>());
+        }
+    };
+
+    struct stable_sort
+    {
+        typedef void result_type;
+
+        template<class R>
+        void operator()(R& r) const
+        {
+            std::stable_sort(detail::begin_(r), detail::end_(r));
+        }
+
+        template<class R, class C>
+        void operator()(R& r, C c) const
+        {
+            std::stable_sort(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct partial_sort
+    {
+        typedef void result_type;
+
+        template<class R, class M>
+        void operator()(R& r, M m) const
+        {
+            std::partial_sort(detail::begin_(r), m, detail::end_(r));
+        }
+
+        template<class R, class M, class C>
+        void operator()(R& r, M m, C c) const
+        {
+            std::partial_sort(detail::begin_(r), m, detail::end_(r), c);
+        }
+    };
+
+    struct partial_sort_copy
+    {
+        template <typename Sig>
+        struct result;
+        
+        template <typename This, class R1, class R2>
+        struct result<This(R1&, R2&)>
+            : range_result_iterator<R2>
+        {};
+
+        template <typename This, class R1, class R2, class C>
+        struct result<This(R1&, R2&, C)>
+            : range_result_iterator<R2>
+        {};
+
+        template <class R1, class R2>
+        typename range_result_iterator<R2>::type
+        operator()(R1& r1, R2& r2) const
+        {
+            return std::partial_sort_copy(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                );
+        }
+
+        template <class R1, class R2, class C>
+        typename range_result_iterator<R2>::type
+        operator()(R1& r1, R2& r2, C c) const
+        {
+            return std::partial_sort_copy(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , c
+                );
+        }
+    };
+
+    struct nth_element
+    {
+        typedef void result_type;
+
+        template<class R, class N>
+        void operator()(R& r, N n) const
+        {
+            return std::nth_element(detail::begin_(r), n, detail::end_(r));
+        }
+
+        template<class R, class N, class C>
+        void operator()(R& r, N n, C c) const
+        {
+            return std::nth_element(detail::begin_(r), n, detail::end_(r), c);
+        }
+    };
+
+    struct merge 
+    {
+        template <typename Sig>
+        struct result;
+
+        template<typename This, class R1, class R2, class O>
+        struct result<This(R1&, R2&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template<typename This, class R1, class R2, class O, class C>
+        struct result<This(R1&, R2&, O, C)>
+            : detail::decay_array<O>
+        {};
+
+        template<class R1, class R2, class O>
+        typename detail::decay_array<O>::type operator()(R1& r1, R2& r2, O o) const
+        {
+            return std::merge(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                );
+        }
+
+        template<class R1, class R2, class O, class C>
+        typename detail::decay_array<O>::type operator()(R1& r1, R2& r2, O o, C c) const
+        {
+            return std::merge(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                , c
+                );
+        }
+    };
+
+    struct inplace_merge 
+    {
+        typedef void result_type;
+
+        template<class R, class M>
+        void operator()(R& r, M m) const
+        {
+            return std::inplace_merge(detail::begin_(r), m, detail::end_(r));
+        }
+
+        template<class R, class M, class C>
+        void operator()(R& r, M m, C c) const
+        {
+            return std::inplace_merge(detail::begin_(r), m, detail::end_(r), c);
+        }
+    };
+
+    struct next_permutation
+    {
+        typedef bool result_type;
+
+        template<class R>
+        bool operator()(R& r) const
+        {
+            return std::next_permutation(detail::begin_(r), detail::end_(r));
+        }
+    
+        template<class R, class C>
+        bool operator()(R& r, C c) const
+        {
+            return std::next_permutation(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct prev_permutation
+    {
+        typedef bool result_type;
+
+        template<class R>
+        bool operator()(R& r) const
+        {
+            return std::prev_permutation(detail::begin_(r), detail::end_(r));
+        }
+    
+        template<class R, class C>
+        bool operator()(R& r, C c) const
+        {
+            return std::prev_permutation(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+
+    struct inner_product
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, typename R, typename I, typename T>
+        struct result<This(R&, I, T)>
+        {
+            typedef T type;
+        };
+
+        template <typename This, typename R, typename I, typename T, typename C1, typename C2>
+        struct result<This(R&, I, T, C1, C2)>
+        {
+            typedef T type;
+        };
+
+        template <class R, class I, class T>
+        T
+        operator()(R& r, I i, T t) const
+        {
+            return std::inner_product(
+                detail::begin_(r), detail::end_(r), i, t);
+        }
+
+        template <class R, class I, class T, class C1, class C2>
+        T
+        operator()(R& r, I i, T t, C1 c1, C2 c2) const
+        {
+            return std::inner_product(
+                detail::begin_(r), detail::end_(r), i, 
+                t, c1, c2);
+        }
+    };
+
+    struct partial_sum
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R, class I>
+        struct result<This(R&, I)>
+            : detail::decay_array<I>
+        {};
+
+        template <typename This, class R, class I, class C>
+        struct result<This(R&, I, C)>
+            : detail::decay_array<I>
+        {};
+
+        template <class R, class I>
+        typename detail::decay_array<I>::type
+        operator()(R& r, I i) const
+        {
+            return std::partial_sum(
+                detail::begin_(r), detail::end_(r), i);
+        }
+
+        template <class R, class I, class C>
+        typename detail::decay_array<I>::type
+        operator()(R& r, I i, C c) const
+        {
+            return std::partial_sum(
+                detail::begin_(r), detail::end_(r), i, c);
+        }
+    };
+
+    struct adjacent_difference
+    {
+        template <typename Sig>
+        struct result;
+        
+        template <typename This, class R, class I>
+        struct result<This(R&, I)>
+            : detail::decay_array<I>
+        {};
+
+        template <typename This,class R, class I, class C>
+        struct result<This(R&, I, C)>
+            : detail::decay_array<I>
+        {};
+
+        template <class R, class I>
+        typename detail::decay_array<I>::type
+        operator()(R& r, I i) const
+        {
+            return std::adjacent_difference(
+                detail::begin_(r), detail::end_(r), i);
+        }
+
+        template <class R, class I, class C>
+        typename detail::decay_array<I>::type
+        operator()(R& r, I i, C c) const
+        {
+            return std::adjacent_difference(
+                detail::begin_(r), detail::end_(r), i, c);
+        }    
+    };
+
+    struct push_heap
+    {
+        typedef void result_type;
+
+        template <class R>
+        void operator()(R& r) const
+        {
+            std::push_heap(detail::begin_(r), detail::end_(r));
+        }
+
+        template <class R, class C>
+        void operator()(R& r, C c) const
+        {
+            std::push_heap(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct pop_heap
+    {
+        typedef void result_type;
+
+        template <class R>
+        void operator()(R& r) const
+        {
+            std::pop_heap(detail::begin_(r), detail::end_(r));
+        }
+
+        template <class R, class C>
+        void operator()(R& r, C c) const
+        {
+            std::pop_heap(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct make_heap
+    {
+        typedef void result_type;
+
+        template <class R>
+        void operator()(R& r) const
+        {
+            std::make_heap(detail::begin_(r), detail::end_(r));
+        }
+
+        template <class R, class C>
+        void operator()(R& r, C c) const
+        {
+            std::make_heap(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct sort_heap
+    {
+        typedef void result_type;
+
+        template <class R>
+        void operator()(R& r) const
+        {
+            std::sort_heap(detail::begin_(r), detail::end_(r));
+        }
+
+        template <class R, class C>
+        void operator()(R& r, C c) const
+        {
+            std::sort_heap(detail::begin_(r), detail::end_(r), c);
+        }
+    };
+
+    struct set_union
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R1, class R2, class O>
+        struct result<This(R1&, R2&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template <typename This, class R1, class R2, class O, typename C>
+        struct result<This(R1&, R2&, O, C)>
+            : detail::decay_array<O>
+        {};
+
+        template <class R1, class R2, class O>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o) const
+        {
+            return std::set_union(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                );
+        }
+
+        template <class R1, class R2, class O, class C>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o, C c) const
+        {
+            return std::set_union(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                , c
+                );
+        }
+    };
+
+    struct set_intersection
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R1, class R2, class O>
+        struct result<This(R1&, R2&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template <typename This, class R1, class R2, class O, typename C>
+        struct result<This(R1&, R2&, O, C)>
+            : detail::decay_array<O>
+        {};
+
+        template <class R1, class R2, class O>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o) const
+        {
+            return std::set_intersection(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                );
+        }
+
+        template <class R1, class R2, class O, class C>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o, C c) const
+        {
+            return std::set_intersection(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                , c
+                );
+        }
+    };
+
+    struct set_difference
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R1, class R2, class O>
+        struct result<This(R1&, R2&, O)>
+            : detail::decay_array<O>
+        {};
+
+        template <typename This, class R1, class R2, class O, class C>
+        struct result<This(R1&, R2&, O, C)>
+            : detail::decay_array<O>
+        {};
+
+        template <class R1, class R2, class O>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o) const
+        {
+            return std::set_difference(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                );
+        }
+
+        template <class R1, class R2, class O, class C>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o, C c) const
+        {
+            return std::set_difference(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                , c
+                );
+        }
+    };
+
+    struct set_symmetric_difference
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, class R1, class R2, class O>
+        struct result<This(R1&, R2, O)>
+            : detail::decay_array<O>
+        {};
+
+        template <typename This, class R1, class R2, class O, class C>
+        struct result<This(R1&, R2, O, C)>
+            : detail::decay_array<O>
+        {};
+
+        template <class R1, class R2, class O>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o) const
+        {
+            return std::set_symmetric_difference(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                );
+        }
+
+        template <class R1, class R2, class O, class C>
+        typename detail::decay_array<O>::type
+        operator()(R1& r1, R2& r2, O o, C c) const
+        {
+            return std::set_symmetric_difference(
+                detail::begin_(r1), detail::end_(r1)
+                , detail::begin_(r2), detail::end_(r2)
+                , o
+                , c
+                );
+        }
+    };
+
+}}} // boost::phoenix::impl
+
+namespace boost { namespace phoenix
+{
+    function<impl::swap> const swap = impl::swap();
+    function<impl::copy> const copy = impl::copy();
+    function<impl::copy_backward> const copy_backward = impl::copy_backward();
+    function<impl::transform> const transform = impl::transform();
+    function<impl::replace> const replace = impl::replace();
+    function<impl::replace_if> const replace_if = impl::replace_if();
+    function<impl::replace_copy> const replace_copy = impl::replace_copy();
+    function<impl::replace_copy_if> const replace_copy_if = impl::replace_copy_if();
+    function<impl::fill> const fill = impl::fill();
+    function<impl::fill_n> const fill_n = impl::fill_n();
+    function<impl::generate> const generate = impl::generate();
+    function<impl::generate_n> const generate_n = impl::generate_n();
+    function<impl::remove> const remove = impl::remove();
+    function<impl::remove_if> const remove_if = impl::remove_if();
+    function<impl::remove_copy> const remove_copy = impl::remove_copy();
+    function<impl::remove_copy_if> const remove_copy_if = impl::remove_copy_if();
+    function<impl::unique> const unique = impl::unique();
+    function<impl::unique_copy> const unique_copy = impl::unique_copy();
+    function<impl::reverse> const reverse = impl::reverse();
+    function<impl::reverse_copy> const reverse_copy = impl::reverse_copy();
+    function<impl::rotate> const rotate = impl::rotate();
+    function<impl::rotate_copy> const rotate_copy = impl::rotate_copy();
+    function<impl::random_shuffle> const random_shuffle = impl::random_shuffle();
+    function<impl::partition> const partition = impl::partition();
+    function<impl::stable_partition> const stable_partition = impl::stable_partition();
+    function<impl::sort> const sort = impl::sort();
+    function<impl::stable_sort> const stable_sort = impl::stable_sort();
+    function<impl::partial_sort> const partial_sort = impl::partial_sort();
+    function<impl::partial_sort_copy> const partial_sort_copy = impl::partial_sort_copy();
+    function<impl::nth_element> const nth_element = impl::nth_element();
+    function<impl::merge> const merge = impl::merge();
+    function<impl::inplace_merge> const inplace_merge = impl::inplace_merge();
+    function<impl::next_permutation> const next_permutation = impl::next_permutation();
+    function<impl::prev_permutation> const prev_permutation = impl::prev_permutation();
+    function<impl::inner_product> const inner_product = impl::inner_product();
+    function<impl::partial_sum> const partial_sum = impl::partial_sum();
+    function<impl::adjacent_difference> const adjacent_difference = impl::adjacent_difference();
+    function<impl::push_heap> const push_heap = impl::push_heap();
+    function<impl::pop_heap> const pop_heap = impl::pop_heap();
+    function<impl::make_heap> const make_heap = impl::make_heap();
+    function<impl::sort_heap> const sort_heap = impl::sort_heap();
+    function<impl::set_union> const set_union = impl::set_union();
+    function<impl::set_intersection> const set_intersection = impl::set_intersection();
+    function<impl::set_difference> const set_difference = impl::set_difference();
+    function<impl::set_symmetric_difference> const set_symmetric_difference = impl::set_symmetric_difference();
+}}
+
+#endif
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2004 Angus Leeming
+    Copyright (c) 2007 Joel de Guzman
+
+    Distributed under 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 PHOENIX_STL_CONTAINER_HPP
+#define PHOENIX_STL_CONTAINER_HPP
+
+#include <boost/phoenix/stl/container/container.hpp>
+
+#endif // PHOENIX_STL_CONTAINER_HPP
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/container.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,817 @@
+/*=============================================================================
+    Copyright (c) 2004 Angus Leeming
+    Copyright (c) 2004 Joel de Guzman
+
+    Distributed under 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 PHOENIX_STL_CONTAINER_CONTAINER_HPP
+#define PHOENIX_STL_CONTAINER_CONTAINER_HPP
+
+#include <boost/phoenix/stl/container/detail/container.hpp>
+#include <boost/phoenix/function/function.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace phoenix
+{
+///////////////////////////////////////////////////////////////////////////////
+//
+//  STL container member functions
+//
+//      Lazy functions for STL container member functions
+//
+//      These functions provide a mechanism for the lazy evaluation of the
+//      public member functions of the STL containers. For an overview of
+//      what is meant by 'lazy evaluation', see the comments in operators.hpp
+//      and functions.hpp.
+//
+//      Lazy functions are provided for all of the member functions of the
+//      following containers:
+//
+//      deque - list - map - multimap - vector.
+//
+//      Indeed, should *your* class have member functions with the same names
+//      and signatures as those listed below, then it will automatically be
+//      supported. To summarize, lazy functions are provided for member
+//      functions:
+//
+//          assign - at - back - begin - capacity - clear - empty - end -
+//          erase - front - get_allocator - insert - key_comp - max_size -
+//          pop_back - pop_front - push_back - push_front - rbegin - rend -
+//          reserve - resize . size - splice - value_comp.
+//
+//      The lazy functions' names are the same as the corresponding member
+//      function. Sample usage:
+//
+//      "Normal" version                 "Lazy" version
+//      ----------------                 --------------
+//      my_vector.at(5)                  phoenix::at(arg1, 5)
+//      my_list.size()                   phoenix::size(arg1)
+//      my_vector1.swap(my_vector2)      phoenix::swap(arg1, arg2)
+//
+//      Notice that member functions with names that clash with a
+//      function in stl algorithms are absent. This will be provided
+//      in Phoenix's algorithm module.
+//
+//      No support is provided here for lazy versions of operator+=,
+//      operator[] etc. Such operators are not specific to STL containers and
+//      lazy versions can therefore be found in operators.hpp.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Lazy member function implementaions.
+//
+//      The structs below provide the guts of the implementation. Thereafter,
+//      the corresponding lazy function itself is simply:
+//
+//          function<stl::assign> const assign = stl::assign();
+//
+//      The structs provide a nested "result" class template whose
+//      "type" typedef enables the lazy function to ascertain the type
+//      to be returned when it is invoked.
+//
+//      They also provide operator() member functions with signatures
+//      corresponding to those of the underlying member function of
+//      the STL container.
+//
+///////////////////////////////////////////////////////////////////////////////
+    namespace stl
+    {
+        struct assign
+        {
+            template <typename Sig>
+            struct result;
+
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+            >
+            struct result<This(C&, Arg1)>
+            {
+                typedef typename add_reference<C>::type type;
+            };
+            
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+              , typename Arg2
+            >
+            struct result<This(C&, Arg1, Arg2)>
+                : result<This(C&, Arg1)>
+            {};
+            
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+              , typename Arg2
+              , typename Arg3
+            >
+            struct result<This(C&, Arg1, Arg2, Arg3)>
+                : result<This(C&, Arg1)>
+            {};
+
+            template <typename C, typename Arg1>
+            C& operator()(C& c, Arg1 arg1) const
+            {
+                c.assign(arg1);
+                return c;
+            }
+
+            template <typename C, typename Arg1, typename Arg2>
+            C& operator()(C& c, Arg1 arg1, Arg2 arg2) const
+            {
+                c.assign(arg1, arg2);
+                return c;
+            }
+
+            template <typename C, typename Arg1, typename Arg2, typename Arg3>
+            C& operator()(
+                C& c
+              , Arg1 arg1
+              , Arg2 arg2
+              , Arg3 arg3) const
+            {
+                return c.assign(arg1, arg2, arg3);
+            }
+        };
+
+        struct at
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C, typename Index>
+            struct result<This(C&, Index)>
+            {
+                typedef typename const_qualified_reference_of<C>::type type;
+            };
+
+            template <typename C, typename Index>
+            typename result<at(C&, Index const&)>::type
+            operator()(C& c, Index i) const
+            {
+                return c.at(i);
+            }
+        };
+
+        struct back
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef 
+                    typename const_qualified_reference_of<C>::type
+                type;
+            };
+
+            template <typename C>
+            typename result<back(C&)>::type
+            operator()(C& c) const
+            {
+                return c.back();
+            }
+        };
+
+        struct begin
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename const_qualified_iterator_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<begin(C&)>::type
+            operator()(C& c) const
+            {
+                return c.begin();
+            }
+        };
+
+        struct capacity
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename size_type_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<capacity(C&)>::type
+            operator()(C const& c) const
+            {
+                return c.capacity();
+            }
+        };
+
+        struct clear
+        {
+            typedef void result_type;
+
+            template <typename C>
+            void operator()(C& c) const
+            {
+                return c.clear();
+            }
+        };
+
+        struct empty
+        {
+            typedef bool result_type;
+
+            template <typename C>
+            bool operator()(C const& c) const
+            {
+                return c.empty();
+            }
+        };
+
+        struct end
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename const_qualified_iterator_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<end(C&)>::type
+            operator()(C& c) const
+            {
+                return c.end();
+            }
+        };
+
+        namespace result_of
+        {
+            template <typename C, typename Arg1, typename Arg2 = fusion::void_>
+            struct erase
+            {
+                //  BOOST_MSVC #if branch here in map_erase_result non-
+                //  standard behavior. The return type should be void but
+                //  VC7.1 prefers to return iterator_of<C>. As a result,
+                //  VC7.1 complains of error C2562:
+                //  boost::phoenix::stl::erase::operator() 'void' function
+                //  returning a value. Oh well... :*
+
+                typedef
+                    boost::mpl::eval_if<
+                        boost::is_same<
+                            typename remove_reference<Arg1>::type
+                          , typename iterator_of<C>::type
+                        >
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1500)
+                      , iterator_of<C>
+#else
+                      , boost::mpl::identity<void>
+#endif
+                      , size_type_of<C>
+                    >
+                map_erase_result;
+
+                typedef typename
+                    boost::mpl::eval_if<
+                        has_mapped_type<C>
+                      , map_erase_result
+                      , iterator_of<C>
+                    >::type
+                type;
+            };
+        }
+
+        struct erase
+        {
+            //  This mouthful can differentiate between the generic erase
+            //  functions (Container == std::deque, std::list, std::vector) and
+            //  that specific to the two map-types, std::map and std::multimap.
+            //
+            //  where C is a std::deque, std::list, std::vector:
+            //
+            //      1) iterator C::erase(iterator where);
+            //      2) iterator C::erase(iterator first, iterator last);
+            //
+            //  where M is a std::map or std::multimap:
+            //
+            //      3) size_type M::erase(const Key& keyval);
+            //      4) void M::erase(iterator where);
+            //      5) void M::erase(iterator first, iterator last);
+
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C, typename Arg1>
+            struct result<This(C&, Arg1)>
+                : result_of::erase<C, Arg1>
+            {};
+
+            template <typename This, typename C, typename Arg1, typename Arg2>
+            struct result<This(C&, Arg1, Arg2)>
+                : result_of::erase<C, Arg1, Arg2>
+            {};
+
+            template <typename C, typename Arg1>
+            typename result_of::erase<C, Arg1>::type
+            operator()(C& c, Arg1 arg1) const
+            {
+                /*
+                std::cout << "\n";
+                std::cout << typeid( typename is_same<Arg1, typename iterator_of<C const>::type>::type ).name() << "\n";
+                std::cout << typeid( typename has_mapped_type<C>::type ).name() << "\n";
+                std::cout << typeid( typename result_of::erase<C, Arg1>::type ).name() << "\n";
+                std::cout << typeid( typename result_of::erase<C, Arg1>::map_erase_result::type ).name() << "\n";
+                std::cout << "\n";
+                std::cout << typeid( c.erase(arg1) ).name() << "\n";
+                */
+                return c.erase(arg1);
+                //c.erase(arg1);
+            }
+
+            template <typename C, typename Arg1, typename Arg2>
+            typename result_of::erase<C, Arg1, Arg2>::type
+            operator()(C& c, Arg1 arg1, Arg2 arg2) const
+            {
+                /*
+                std::cout << "\nblubb\n";
+                std::cout << typeid( typename is_same<Arg1, typename iterator_of<C>::type>::type ).name() << "\n";
+                std::cout << typeid( typename has_mapped_type<C>::type ).name() << "\n";
+                std::cout << typeid( typename result_of::erase<C, Arg1, Arg2>::type ).name() << "\n";
+                //std::cout << typeid( typename result_of::erase<C, Arg1>::map_erase_result::type ).name() << "\n";
+                std::cout << "\n";
+                std::cout << typeid( c.erase(arg1, arg2) ).name() << "\n";
+                */
+                return c.erase(arg1, arg2);
+                //c.erase(arg1, arg2);
+            }
+        };
+
+        struct front
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename const_qualified_reference_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<front(C&)>::type
+            operator()(C& c) const
+            {
+                return c.front();
+            }
+        };
+
+        struct get_allocator
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename allocator_type_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<get_allocator(C const&)>::type
+            operator()(C& c) const
+            {
+                return c.get_allocator();
+            }
+        };
+
+        namespace result_of
+        {
+            template <
+                typename C
+              , typename Arg1
+              , typename Arg2 = fusion::void_
+              , typename Arg3 = fusion::void_
+            >
+            class insert
+            {
+                struct pair_iterator_bool
+                {
+                    typedef typename std::pair<typename C::iterator, bool> type;
+                };
+
+                typedef
+                    boost::mpl::eval_if<
+                        map_insert_returns_pair<typename remove_const<C>::type>
+                      , pair_iterator_bool
+                      , iterator_of<C>
+                    >
+                choice_1;
+
+                typedef
+                    boost::mpl::eval_if<
+                        boost::mpl::and_<
+                            boost::is_same<Arg3, fusion::void_>
+                          , boost::mpl::not_<boost::is_same<Arg1, Arg2> > >
+                      , iterator_of<C>
+                      , boost::mpl::identity<void>
+                    >
+                choice_2;
+
+            public:
+
+                typedef typename
+                    boost::mpl::eval_if<
+                        boost::is_same<Arg2, fusion::void_>
+                      , choice_1
+                      , choice_2
+                    >::type
+                type;
+            };
+        }
+
+        struct insert
+        {
+            //  This mouthful can differentiate between the generic insert
+            //  functions (Container == deque, list, vector) and those
+            //  specific to the two map-types, std::map and std::multimap.
+            //
+            //  where C is a std::deque, std::list, std::vector:
+            //
+            //      1) iterator C::insert(iterator where, value_type value);
+            //      2) void C::insert(
+            //          iterator where, size_type count, value_type value);
+            //      3) template <typename Iter>
+            //         void C::insert(iterator where, Iter first, Iter last);
+            //
+            //  where M is a std::map and MM is a std::multimap:
+            //
+            //      4) pair<iterator, bool> M::insert(value_type const&);
+            //      5) iterator MM::insert(value_type const&);
+            //
+            //  where M is a std::map or std::multimap:
+            //
+            //      6) template <typename Iter>
+            //         void M::insert(Iter first, Iter last);
+
+            template <typename Sig>
+            struct result;
+
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+            >
+            struct result<This(C&, Arg1)>
+                : result_of::insert<C, Arg1>
+            {};
+            
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+              , typename Arg2
+            >
+            struct result<This(C&, Arg1, Arg2)>
+                : result_of::insert<C, Arg1, Arg2>
+            {};
+            
+            template <
+                typename This
+              , typename C
+              , typename Arg1
+              , typename Arg2
+              , typename Arg3
+            >
+            struct result<This(C&, Arg1, Arg2, Arg3)>
+                : result_of::insert<C, Arg1, Arg2, Arg3>
+            {};
+
+            template <typename C, typename Arg1>
+            typename result<insert(C&, Arg1)>::type
+            operator()(C& c, Arg1 arg1) const
+            {
+                return c.insert(arg1);
+            }
+
+            template <typename C, typename Arg1, typename Arg2>
+            typename result<insert(C&, Arg1, Arg2)>::type
+            operator()(C& c, Arg1 arg1, Arg2 arg2) const
+            {
+                return c.insert(arg1, arg2);
+            }
+
+            template <typename C, typename Arg1, typename Arg2, typename Arg3>
+            typename result<insert(C&, Arg1, Arg2, Arg3)>::type
+            operator()(
+                C& c, Arg1 arg1, Arg2 arg2, Arg3 arg3) const
+            {
+                return c.insert(arg1, arg2, arg3);
+            }
+        };
+
+        namespace result_of
+        {
+            template <typename C>
+            struct key_comp
+            {
+                typedef typename key_compare_of<C>::type type;
+            };
+        }
+
+        struct key_comp
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+                : result_of::key_comp<C>
+            {};
+
+            template <typename C>
+            typename result_of::key_comp<C>::type
+            operator()(C& c) const
+            {
+                return c.key_comp();
+            }
+        };
+
+        struct max_size
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename size_type_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<max_size(C const&)>::type
+            operator()(C& c) const
+            {
+                return c.max_size();
+            }
+        };
+
+        struct pop_back
+        {
+            typedef void result_type;
+
+            template <typename C>
+            void operator()(C& c) const
+            {
+                return c.pop_back();
+            }
+        };
+
+        struct pop_front
+        {
+            typedef void result_type;
+
+            template <typename C>
+            void operator()(C& c) const
+            {
+                return c.pop_front();
+            }
+        };
+
+        struct push_back
+        {
+            typedef void result_type;
+
+            template <typename C, typename Arg>
+            void operator()(C& c, Arg const& data) const
+            {
+                return c.push_back(data);
+            }
+        };
+
+        struct push_front
+        {
+            typedef void result_type;
+
+            template <typename C, typename Arg>
+            void operator()(C& c, Arg const& data) const
+            {
+                return c.push_front(data);
+            }
+        };
+
+        struct rbegin
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename
+                    const_qualified_reverse_iterator_of<C>::type
+                type;
+            };
+
+            template <typename C>
+            typename result<rbegin(C&)>::type
+            operator()(C& c) const
+            {
+                return c.rbegin();
+            }
+        };
+
+        struct rend
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename
+                    const_qualified_reverse_iterator_of<C>::type
+                type;
+            };
+
+            template <typename C>
+            typename result<rend(C&)>::type
+            operator()(C& c) const
+            {
+                return c.rend();
+            }
+        };
+
+        struct reserve
+        {
+            typedef void result_type;
+
+            template <typename C, typename Arg>
+            void operator()(C& c, Arg const& count) const
+            {
+                return c.reserve(count);
+            }
+        };
+
+        struct resize
+        {
+            typedef void result_type;
+
+            template <typename C, typename Arg1>
+            void operator()(C& c, Arg1 const& arg1) const
+            {
+                return c.resize(arg1);
+            }
+
+            template <typename C, typename Arg1, typename Arg2>
+            void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
+            {
+                return c.resize(arg1, arg2);
+            }
+        };
+
+        struct size
+        {
+            template <typename Sig>
+            struct result;
+
+            template <typename This, typename C>
+            struct result<This(C&)>
+            {
+                typedef typename size_type_of<C>::type type;
+            };
+
+            template <typename C>
+            typename result<size(C&)>::type
+            operator()(C& c) const
+            {
+                return c.size();
+            }
+        };
+
+    struct splice
+    {
+        typedef void result_type;
+
+        template <typename C, typename Arg1, typename Arg2>
+        void operator()(C& c, Arg1 arg1, Arg2 arg2) const
+        {
+            c.splice(arg1, arg2);
+        }
+
+        template <
+            typename C
+          , typename Arg1
+          , typename Arg2
+          , typename Arg3
+        >
+        void operator()(
+            C& c
+          , Arg1 arg1
+          , Arg2 arg2
+          , Arg3 arg3
+        ) const
+        {
+            c.splice(arg1, arg2, arg3);
+        }
+
+        template <
+            typename C
+          , typename Arg1
+          , typename Arg2
+          , typename Arg3
+          , typename Arg4
+        >
+        void operator()(
+            C c
+          , Arg1 arg1
+          , Arg2 arg2
+          , Arg3 arg3
+          , Arg4 arg4
+        ) const
+        {
+            c.splice(arg1, arg2, arg3, arg4);
+        }
+    };
+
+
+    namespace result_of
+    {
+        template <typename C>
+        struct value_comp
+        {
+            typedef typename value_compare_of<C>::type type;
+        };
+    }
+
+    struct value_comp
+    {
+        template <typename Sig>
+        struct result;
+
+        template <typename This, typename C>
+        struct result<This(C&)>
+            : result_of::value_comp<C>
+        {};
+
+        template <typename C>
+        typename result_of::value_comp<C>::type
+        operator()(C& c) const
+        {
+            return c.value_comp();
+        }
+    };
+
+} // namespace stl
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//  The lazy functions themselves.
+//
+///////////////////////////////////////////////////////////////////////////////
+function<stl::assign> const         assign = stl::assign();
+function<stl::at> const             at = stl::at();
+function<stl::back> const           back = stl::back();
+function<stl::begin> const          begin = stl::begin();
+function<stl::capacity> const       capacity = stl::capacity();
+function<stl::clear> const          clear = stl::clear();
+function<stl::empty> const          empty = stl::empty();
+function<stl::end> const            end = stl::end();
+function<stl::erase> const          erase = stl::erase();
+function<stl::front> const          front = stl::front();
+function<stl::get_allocator> const  get_allocator = stl::get_allocator();
+function<stl::insert> const         insert = stl::insert();
+function<stl::key_comp> const       key_comp = stl::key_comp();
+function<stl::max_size> const       max_size = stl::max_size();
+function<stl::pop_back> const       pop_back  = stl::pop_back();
+function<stl::pop_front> const      pop_front = stl::pop_front();
+function<stl::push_back> const      push_back  = stl::push_back();
+function<stl::push_front> const     push_front = stl::push_front();
+function<stl::rbegin> const         rbegin = stl::rbegin();
+function<stl::rend> const           rend = stl::rend();
+function<stl::reserve> const        reserve = stl::reserve();
+function<stl::resize> const         resize = stl::resize();
+function<stl::size> const           size = stl::size();
+function<stl::splice> const         splice = stl::splice();
+function<stl::value_comp> const     value_comp = stl::value_comp();
+
+}} // namespace boost::phoenix
+
+#endif // PHOENIX_STL_CONTAINERS_HPP
Added: sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/detail/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/stl/container/detail/container.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -0,0 +1,173 @@
+/*=============================================================================
+    Copyright (c) 2004 Angus Leeming
+    Copyright (c) 2004 Joel de Guzman
+
+    Distributed under 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 PHOENIX_CONTAINER_DETAIL_CONTAINER_HPP
+#define PHOENIX_CONTAINER_DETAIL_CONTAINER_HPP
+
+#include <utility>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace phoenix { namespace stl
+{
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Metafunctions "value_type_of", "key_type_of" etc.
+//
+//      These metafunctions define a typedef "type" that returns the nested
+//      type if it exists. If not then the typedef returns void.
+//
+//      For example, "value_type_of<std::vector<int> >::type" is "int" whilst
+//      "value_type_of<double>::type" is "void".
+//
+//      I use a macro to define structs "value_type_of" etc simply to cut
+//      down on the amount of code. The macro is #undef-ed immediately after
+//      its final use.
+//
+/////////////////////////////////////////////////////////////////c//////////////
+#define MEMBER_TYPE_OF(MEMBER_TYPE)                                             \
+    template <typename C>                                                       \
+    struct BOOST_PP_CAT(MEMBER_TYPE, _of)                                       \
+    {                                                                           \
+        typedef typename C::MEMBER_TYPE type;                                   \
+    }
+
+    MEMBER_TYPE_OF(allocator_type);
+    MEMBER_TYPE_OF(const_iterator);
+    MEMBER_TYPE_OF(const_reference);
+    MEMBER_TYPE_OF(const_reverse_iterator);
+    MEMBER_TYPE_OF(container_type);
+    MEMBER_TYPE_OF(data_type);
+    MEMBER_TYPE_OF(iterator);
+    MEMBER_TYPE_OF(key_compare);
+    MEMBER_TYPE_OF(key_type);
+    MEMBER_TYPE_OF(reference);
+    MEMBER_TYPE_OF(reverse_iterator);
+    MEMBER_TYPE_OF(size_type);
+    MEMBER_TYPE_OF(value_compare);
+    MEMBER_TYPE_OF(value_type);
+
+#undef MEMBER_TYPE_OF
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Const-Qualified types.
+//
+//      Many of the stl member functions have const and non-const
+//      overloaded versions that return distinct types. For example:
+//
+//          iterator begin();
+//          const_iterator begin() const;
+//
+//      The three class templates defined below,
+//      const_qualified_reference_of, const_qualified_iterator_of
+//      and const_qualified_reverse_iterator_of provide a means to extract
+//      this return type automatically.
+//
+///////////////////////////////////////////////////////////////////////////////
+    template <typename C>
+    struct const_qualified_reference_of
+    {
+        typedef typename
+            boost::mpl::eval_if<
+                boost::is_const<C>
+              , const_reference_of<C>
+              , reference_of<C>
+            >::type
+        type;
+    };
+
+    template <typename C>
+    struct const_qualified_iterator_of
+    {
+        typedef typename
+            boost::mpl::eval_if<
+                boost::is_const<C>
+              , const_iterator_of<C>
+              , iterator_of<C>
+            >::type
+        type;
+    };
+
+    template <typename C>
+    struct const_qualified_reverse_iterator_of
+    {
+        typedef typename
+            boost::mpl::eval_if<
+                boost::is_const<C>
+              , const_reverse_iterator_of<C>
+              , reverse_iterator_of<C>
+            >::type
+        type;
+    };
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//  has_mapped_type<C>
+//
+//      Given a container C, determine if it is a map or multimap
+//      by checking if it has a member type named "mapped_type".
+//
+///////////////////////////////////////////////////////////////////////////////
+    namespace stl_impl
+    {
+        struct one { char a[1]; };
+        struct two { char a[2]; };
+
+        template <typename C>
+        one has_mapped_type(typename C::mapped_type(*)());
+
+        template <typename C>
+        two has_mapped_type(...);
+    }
+
+    template <typename C>
+    struct has_mapped_type
+        : boost::mpl::bool_<
+            sizeof(stl_impl::has_mapped_type<C>(0)) == sizeof(stl_impl::one)
+        >
+    {};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//  map_insert_returns_pair<C>
+//
+//      Distinguish a map from a multimap by checking the return type
+//      of its "insert" member function. A map returns a pair while
+//      a multimap returns an iterator.
+//
+///////////////////////////////////////////////////////////////////////////////
+    namespace stl_impl
+    {
+        //  Cool implementation of map_insert_returns_pair by Daniel Wallin.
+        //  Thanks Daniel!!! I owe you a Pizza!
+
+        template<class A, class B>
+        one map_insert_returns_pair_check(std::pair<A,B> const&);
+
+        template <typename T>
+        two map_insert_returns_pair_check(T const&);
+
+        template <typename C>
+        struct map_insert_returns_pair
+        {
+            static typename C::value_type const& get;
+            BOOST_STATIC_CONSTANT(int,
+                value = sizeof(
+                    map_insert_returns_pair_check(((C*)0)->insert(get))));
+            typedef boost::mpl::bool_<value == sizeof(one)> type;
+        };
+    }
+
+    template <typename C>
+    struct map_insert_returns_pair
+        : stl_impl::map_insert_returns_pair<C>::type {};
+
+}}} // namespace boost::phoenix::stl
+
+#endif // PHOENIX_STL_CONTAINER_TRAITS_HPP
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -57,20 +57,20 @@
     [ run statement/exceptions.cpp ]
     ;
         
-#test-suite phoenix_container :
-#    [ run container/container_tests1a.cpp ] 
-#    [ run container/container_tests1b.cpp ] 
-#    [ run container/container_tests2a.cpp ] 
-#    [ run container/container_tests2b.cpp ] 
-#    [ run container/container_tests3a.cpp ] 
-#    [ run container/container_tests3b.cpp ] 
-#    [ run container/container_tests4a.cpp ] 
-#    [ run container/container_tests4b.cpp ] 
-#    [ run container/container_tests5a.cpp ] 
-#    [ run container/container_tests5b.cpp ] 
-#    [ run container/container_tests6a.cpp ] 
-#    [ run container/container_tests6b.cpp ] 
-#    ;
+test-suite phoenix_container :
+    [ run container/container_tests1a.cpp ] 
+    [ run container/container_tests1b.cpp ] 
+    [ run container/container_tests2a.cpp ] 
+    [ run container/container_tests2b.cpp ] 
+    [ run container/container_tests3a.cpp ] 
+    [ run container/container_tests3b.cpp ] 
+    [ run container/container_tests4a.cpp ] 
+    [ run container/container_tests4b.cpp ] 
+    [ run container/container_tests5a.cpp ] 
+    [ run container/container_tests5b.cpp ] 
+    [ run container/container_tests6a.cpp ] 
+    [ run container/container_tests6b.cpp ] 
+    ;
 
 #test-suite phoenix_scope :
 #    [ run scope/lambda_tests.cpp ] 
@@ -79,12 +79,12 @@
 #    [ run scope/bug_000008.cpp : : : $(multi-threading) ] 
 #    ;
 
-#test-suite phoenix_algorithm :
-#    [ run algorithm/iteration.cpp ]
-#    [ run algorithm/transformation1.cpp ]
-#    [ run algorithm/transformation2.cpp ]
-#    [ run algorithm/transformation3.cpp ]
-#    [ run algorithm/transformation4.cpp ]
-#    [ run algorithm/querying.cpp ]
-#    [ run algorithm/querying2.cpp ]
-#    ;
+test-suite phoenix_algorithm :
+    [ run algorithm/iteration.cpp ]
+    [ run algorithm/transformation1.cpp ]
+    [ run algorithm/transformation2.cpp ]
+    [ run algorithm/transformation3.cpp ]
+    [ run algorithm/transformation4.cpp ]
+    [ run algorithm/querying.cpp ]
+    [ run algorithm/querying2.cpp ]
+    ;
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/iteration.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/iteration.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/iteration.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/iteration.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/iteration.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <functional>
@@ -28,8 +28,8 @@
 
     void for_each_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::for_each;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         BOOST_TEST(for_each(arg1, for_each_tester())(array).value_ == 6);
         BOOST_TEST(array[0] == 2);
@@ -40,8 +40,8 @@
 
     void accumulate_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::accumulate;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         BOOST_TEST(accumulate(arg1, 0)(array) == 6);
         BOOST_TEST(boost::phoenix::accumulate(arg1, 0, std::minus<int>())(array) == -6);
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -7,8 +7,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/querying.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/querying.hpp>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/assign/list_of.hpp>
 
@@ -52,8 +52,8 @@
 
     void find_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::find;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         BOOST_TEST(find(arg1,2)(array) == array + 1);
 
@@ -79,8 +79,8 @@
 
     void find_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::find_if;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         BOOST_TEST(find_if(arg1, even())(array) == array + 1);
         return;
@@ -88,8 +88,9 @@
 
     void find_end_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::find_end;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3,1,2,3,1};
         int pattern[] = {1,2,3};
         BOOST_TEST(find_end(arg1, arg2)(array, pattern) == array + 3);
@@ -100,8 +101,9 @@
 
     void find_first_of_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::find_first_of;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int search_for[] = {2,3,4};
         BOOST_TEST(find_first_of(arg1, arg2)(array, search_for) == array + 1);
@@ -113,8 +115,8 @@
 
     void adjacent_find_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::adjacent_find;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {0,1,3,4,4};
         BOOST_TEST(adjacent_find(arg1)(array) == array + 3);
         BOOST_TEST(adjacent_find(arg1, mod_2_comparison())(array) == array + 1);
@@ -123,8 +125,8 @@
 
     void count_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::count;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,1,0,1,1};
         BOOST_TEST(count(arg1, 1)(array) == 4);
         return;
@@ -132,8 +134,8 @@
 
     void count_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::count_if;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3,4,5};
         BOOST_TEST(count_if(arg1, even())(array) == 2);
         return;
@@ -141,8 +143,8 @@
 
     void distance_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::distance;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,1,0,1,1};
         BOOST_TEST(distance(arg1)(array) == 5);
         return;
@@ -150,8 +152,9 @@
 
     void mismatch_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::mismatch;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3,4,5};
         int search[] = {1,2,4};
 
@@ -168,8 +171,9 @@
 
     void equal_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::equal;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[] = {1,2,3};
         int array3[] = {1,2,4};
@@ -187,8 +191,9 @@
 
     void search_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::search;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3,1,2,3};
         int pattern[] = {2,3};
         BOOST_TEST(
@@ -201,8 +206,8 @@
 
     void lower_bound_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::lower_bound;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         const std::set<int> test_set(array, array + 3);
         BOOST_TEST(lower_bound(arg1, 2)(array) == array + 1);
@@ -219,8 +224,8 @@
 
     void upper_bound_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::upper_bound;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         const std::set<int> test_set(array, array + 3);
         BOOST_TEST(upper_bound(arg1, 2)(array) == array + 2);
@@ -237,8 +242,8 @@
 
     void equal_range_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::equal_range;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,2,3};
         const std::set<int> test_set(array, array + 4);
         BOOST_TEST(equal_range(arg1, 2)(array).first == 
@@ -268,8 +273,8 @@
 
     void binary_search_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::binary_search;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         BOOST_TEST(binary_search(arg1, 2)(array));
         BOOST_TEST(!binary_search(arg1, 4)(array));
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying2.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying2.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/querying2.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/querying.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/querying.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <boost/range.hpp>
@@ -18,8 +18,9 @@
 {
     void includes_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::includes;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[] = {1,2};
         BOOST_TEST(includes(arg1, arg2)(array, array2));
@@ -36,8 +37,8 @@
 
     void min_element_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::min_element;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,3,2};
         BOOST_TEST(min_element(arg1)(array) == array);
         BOOST_TEST(boost::phoenix::min_element(arg1, std::greater<int>())(array) == array + 1);
@@ -46,8 +47,8 @@
 
     void max_element_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::max_element;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,3,2};
         BOOST_TEST(max_element(arg1)(array) == array + 1);
         BOOST_TEST(boost::phoenix::max_element(arg1, std::greater<int>())(array) == array);
@@ -56,8 +57,9 @@
 
     void lexicographical_compare_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::lexicographical_compare;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[] = {1,2,4};
 
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation1.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation1.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation1.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/transformation.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/transformation.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <functional>
@@ -35,8 +35,10 @@
 
     void swap_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::swap;
+        using boost::phoenix::ref;
+        using boost::phoenix::arg_names::_1;
+        using boost::phoenix::arg_names::_2;
         int a = 123;
         int b = 456;
         swap(ref(a), ref(b))();
@@ -50,8 +52,9 @@
 
     void copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int output[4];
         BOOST_TEST(
@@ -64,8 +67,9 @@
 
     void copy_backward_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::copy_backward;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int output[4];
         int* output_end = output + 3;
@@ -88,8 +92,10 @@
 
     void transform_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::transform;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         BOOST_TEST(
             transform(arg1, arg2, increment())(array, array) == 
@@ -110,8 +116,8 @@
 
     void replace_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::replace;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         replace(arg1,2,4)(array);
         BOOST_TEST(array[0] == 1);
@@ -122,8 +128,8 @@
 
     void replace_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::replace_if;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         replace_if(arg1, even(), 4)(array);
         BOOST_TEST(array[0] == 1);
@@ -134,8 +140,9 @@
 
     void replace_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::replace_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int input[] = {1,2,3};
         int output[3];
         replace_copy(arg1, arg2, 2, 4)(input, output);
@@ -147,8 +154,9 @@
 
     void replace_copy_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::replace_copy_if;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int input[] = {1,2,3};
         int output[3];
         replace_copy_if(arg1, arg2, even(), 4)(input, output);
@@ -160,8 +168,8 @@
 
     void fill_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::fill;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {0,0,0};
         fill(arg1, 1)(array);
         BOOST_TEST(array[0] == 1);
@@ -172,8 +180,8 @@
 
     void fill_n_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::fill_n;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {0,0,0};
         fill_n(arg1, 2, 1)(array);
         BOOST_TEST(array[0] == 1);
@@ -197,8 +205,8 @@
 
     void generate_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::generate;
+        using boost::phoenix::arg_names::arg1;
         int array[3];
         generate(arg1, int_seq())(array);
         BOOST_TEST(array[0] == 0);
@@ -209,8 +217,8 @@
 
     void generate_n_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::generate_n;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {0,0,1};
         generate_n(arg1, 2, int_seq())(array);
         BOOST_TEST(array[0] == 0);
@@ -222,8 +230,8 @@
 
     void remove_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::remove;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         std::list<int> test_list(array, array + 3);
         BOOST_TEST(boost::phoenix::remove(arg1, 2)(array) == array + 2);
@@ -238,8 +246,8 @@
 
     void remove_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::remove_if;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         std::list<int> test_list(array, array + 3);
         BOOST_TEST(boost::phoenix::remove_if(arg1, even())(array) == array + 2);
@@ -254,8 +262,9 @@
 
     void remove_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::remove_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[2];
         BOOST_TEST(boost::phoenix::remove_copy(arg1, arg2, 2)(array, array2) == array2 + 2);
@@ -266,8 +275,9 @@
 
     void remove_copy_if_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::remove_copy_if;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[2];
         BOOST_TEST(boost::phoenix::remove_copy_if(arg1, arg2, even())(array, array2) == array2 + 2);
@@ -278,8 +288,8 @@
 
     void unique_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::unique;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,2,3};
         std::list<int> test_list(array, array + 4);
         BOOST_TEST(unique(arg1)(array) == array + 3);
@@ -309,8 +319,9 @@
 
     void unique_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::unique_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,2,3};
         int out[3];
         BOOST_TEST(unique_copy(arg1, arg2)(array, out) == out + 3);
@@ -329,8 +340,8 @@
 
     void reverse_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::reverse;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         std::list<int> test_list(array, array + 3);
         reverse(arg1)(array);
@@ -348,8 +359,9 @@
 
     void reverse_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::reverse_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[3];
         reverse_copy(arg1, arg2)(array, array2);
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation2.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation2.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation2.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/transformation.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/transformation.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <list>
@@ -24,8 +24,8 @@
 
     void rotate_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::rotate;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         rotate(arg1, array + 1)(array);
         std::cout << array[0] << array[1] << array[2] << std::endl;
@@ -38,8 +38,9 @@
 
     void rotate_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::rotate_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int array2[3];
         rotate_copy(arg1, array + 1, arg2)(array, array2);
@@ -52,8 +53,8 @@
 
     void random_shuffle_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::random_shuffle;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         random_shuffle(arg1)(array);
         const int first = array[0];
@@ -69,8 +70,8 @@
     
     void partition_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::partition;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         int* const end = partition(arg1, even())(array);
         BOOST_TEST(end == array + 1);
@@ -82,8 +83,8 @@
 
     void stable_partition_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::stable_partition;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         int* const end = stable_partition(arg1, even())(array);
         BOOST_TEST(end == array + 1);
@@ -95,8 +96,8 @@
 
     void sort_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::sort;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {3,1,2};
         std::list<int> test_list(array, array + 3);
         sort(arg1)(array);
@@ -126,8 +127,8 @@
 
     void stable_sort_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::stable_sort;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {3,1,2};
         stable_sort(arg1)(array);
         BOOST_TEST(array[0] == 1);
@@ -144,8 +145,8 @@
 
     void partial_sort_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::partial_sort;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {2,4,1,3};
         partial_sort(arg1, array + 2)(array);
         BOOST_TEST(array[0] == 1);
@@ -159,8 +160,9 @@
 
     void partial_sort_copy_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::partial_sort_copy;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {2,4,1,3};
         int array2[2];
         partial_sort_copy(arg1, arg2)(array, array2);
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation3.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation3.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation3.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/transformation.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/transformation.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <list>
@@ -16,8 +16,8 @@
 {
     void nth_element_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::nth_element;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {5,1,4,3,2};
         nth_element(arg1, array + 2)(array);
         BOOST_TEST(array[0] < 3);
@@ -38,8 +38,10 @@
 
     void merge_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::merge;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         int array2[] = {2,3,4};
         int output[6];
@@ -60,8 +62,8 @@
 
     void inplace_merge_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::inplace_merge;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3,2,3,4};
         inplace_merge(arg1, array + 3)(array);
         int expected_result[] = {1,2,2,3,3,4};
@@ -76,8 +78,10 @@
 
     void set_union_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::set_union;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         int array2[] = {2,3,4};
         int output[4];
@@ -98,8 +102,10 @@
 
     void set_intersection_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::set_intersection;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         int array2[] = {2,3,4};
         int output[2];
@@ -120,8 +126,10 @@
 
     void set_difference_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::set_difference;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         int array2[] = {2,3,4};
         int output[1];
@@ -142,8 +150,10 @@
 
     void set_symmetric_difference_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::set_symmetric_difference;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
+        using boost::phoenix::arg_names::arg3;
         int array[] = {1,2,3};
         int array2[] = {2,3,4};
         int output[2];
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation4.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation4.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/algorithm/transformation4.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -6,8 +6,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#include <boost/spirit/home/phoenix/stl/algorithm/transformation.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/algorithm/transformation.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 #include <vector>
@@ -18,8 +18,11 @@
 {
     void heap_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::make_heap;
+        using boost::phoenix::pop_heap;
+        using boost::phoenix::push_heap;
+        using boost::phoenix::sort_heap;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2,3};
         std::vector<int> vec(array, array + 3);
         boost::phoenix::make_heap(arg1)(vec);
@@ -53,8 +56,8 @@
 
     void next_permutation_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::next_permutation;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {1,2};
         int expected_result[] = {2,1};
         int expected_result2[] = {1,2};
@@ -74,8 +77,8 @@
 
     void prev_permutation_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::prev_permutation;
+        using boost::phoenix::arg_names::arg1;
         int array[] = {2,1};
         int expected_result[] = {1,2};
         int expected_result2[] = {2,1};
@@ -95,8 +98,9 @@
 
     void inner_product_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::inner_product;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int lhs[] = {1,2,3};
         int rhs[] = {4,5,6};
         BOOST_TEST(inner_product(arg1, arg2, 0)
@@ -108,8 +112,9 @@
 
     void partial_sum_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::partial_sum;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int output[3];
         BOOST_TEST(partial_sum(arg1, arg2)(array, output) == output + 3);
@@ -125,8 +130,9 @@
 
     void adjacent_difference_test()
     {
-        using namespace boost::phoenix;
-        using namespace boost::phoenix::arg_names;
+        using boost::phoenix::adjacent_difference;
+        using boost::phoenix::arg_names::arg1;
+        using boost::phoenix::arg_names::arg2;
         int array[] = {1,2,3};
         int output[3];
         BOOST_TEST(adjacent_difference(arg1, arg2)(array, output) == output + 3);
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/container/container_tests.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/container/container_tests.hpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/container/container_tests.hpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -8,8 +8,8 @@
 #define CONTAINER_TESTS_HPP
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/home/phoenix/stl/container/container.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/stl/container/container.hpp>
 
 #include <iostream>
 #include <typeinfo>
@@ -322,7 +322,7 @@
     typename Container::value_type const value = *c.begin();
     typename Container::key_type const key = value.first;
     typename Container::size_type const removed =
-      erase(arg1, arg2)(c, key);
+        erase(arg1, arg2)(c, key);
     if (test(removed != 1)) {
         cerr << "Failed " << typeid(Container).name() << " test_map_erase 1\n";
         return;
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/core/compose_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/core/compose_tests.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/core/compose_tests.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -9,7 +9,7 @@
 #include <boost/static_assert.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/core.hpp>
 
 using namespace boost::phoenix;
 using namespace boost::phoenix::arg_names;
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/dynamic_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/dynamic_tests.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/dynamic_tests.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -10,9 +10,9 @@
 #define PHOENIX_LIMIT 6
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
-#include <boost/spirit/home/phoenix/scope/dynamic.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/phoenix/scope/dynamic.hpp>
 
 struct my_dynamic : ::boost::phoenix::dynamic<int, std::string, double>
 {
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/lambda_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/lambda_tests.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/lambda_tests.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -12,10 +12,10 @@
 #define PHOENIX_LIMIT 5
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
-#include <boost/spirit/include/phoenix_scope.hpp>
-#include <boost/spirit/include/phoenix_function.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/phoenix/scope.hpp>
+#include <boost/phoenix/function.hpp>
 
 namespace boost { namespace phoenix
 {
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/scope/let_tests.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -12,10 +12,10 @@
 #define PHOENIX_LIMIT 6
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
-#include <boost/spirit/include/phoenix_scope.hpp>
-#include <boost/spirit/include/phoenix_function.hpp>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/phoenix/scope.hpp>
+#include <boost/phoenix/function.hpp>
 
 using namespace boost::phoenix;
 using namespace boost::phoenix::arg_names;
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/statement/switch_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/statement/switch_tests.cpp	(original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/statement/switch_tests.cpp	2010-07-06 12:23:50 EDT (Tue, 06 Jul 2010)
@@ -8,9 +8,9 @@
 #include <vector>
 #include <algorithm>
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/include/phoenix_statement.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
-#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/phoenix/statement.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/phoenix/core.hpp>
 
 using namespace boost::phoenix;
 using namespace boost::phoenix::arg_names;