Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65656 - sandbox/python_extensions/boost/python/to_python
From: talljimbo_at_[hidden]
Date: 2010-09-28 19:20:53


Author: jbosch
Date: 2010-09-28 19:20:51 EDT (Tue, 28 Sep 2010)
New Revision: 65656
URL: http://svn.boost.org/trac/boost/changeset/65656

Log:
python extensions - added support for const-qualified containier types in copy_to_list, copy_to_tuple, copy_to_dict
Text files modified:
   sandbox/python_extensions/boost/python/to_python/copy_to_dict.hpp | 5 ++++-
   sandbox/python_extensions/boost/python/to_python/copy_to_list.hpp | 5 ++++-
   sandbox/python_extensions/boost/python/to_python/copy_to_tuple.hpp | 5 ++++-
   3 files changed, 12 insertions(+), 3 deletions(-)

Modified: sandbox/python_extensions/boost/python/to_python/copy_to_dict.hpp
==============================================================================
--- sandbox/python_extensions/boost/python/to_python/copy_to_dict.hpp (original)
+++ sandbox/python_extensions/boost/python/to_python/copy_to_dict.hpp 2010-09-28 19:20:51 EDT (Tue, 28 Sep 2010)
@@ -20,9 +20,12 @@
  */
 struct copy_to_dict {
 
- template <typename Container>
+ template <typename Container_>
     struct converter {
         
+ typedef typename boost::remove_const<
+ typename boost::remove_reference< Container_ >::type >::type Container;
+
         typedef typename boost::range_const_iterator<Container>::type Iterator;
 
         inline bool convertible() const { return true; }

Modified: sandbox/python_extensions/boost/python/to_python/copy_to_list.hpp
==============================================================================
--- sandbox/python_extensions/boost/python/to_python/copy_to_list.hpp (original)
+++ sandbox/python_extensions/boost/python/to_python/copy_to_list.hpp 2010-09-28 19:20:51 EDT (Tue, 28 Sep 2010)
@@ -20,9 +20,12 @@
  */
 struct copy_to_list {
 
- template <typename Container>
+ template <typename Container_>
     struct converter {
         
+ typedef typename boost::remove_const<
+ typename boost::remove_reference< Container_ >::type >::type Container;
+
         typedef typename boost::range_const_iterator<Container>::type Iterator;
 
         inline bool convertible() const { return true; }

Modified: sandbox/python_extensions/boost/python/to_python/copy_to_tuple.hpp
==============================================================================
--- sandbox/python_extensions/boost/python/to_python/copy_to_tuple.hpp (original)
+++ sandbox/python_extensions/boost/python/to_python/copy_to_tuple.hpp 2010-09-28 19:20:51 EDT (Tue, 28 Sep 2010)
@@ -19,9 +19,12 @@
  */
 struct copy_to_tuple {
 
- template <typename Container>
+ template <typename Container_>
     struct converter {
         
+ typedef typename boost::remove_const<
+ typename boost::remove_reference< Container_ >::type >::type Container;
+
         typedef typename boost::range_const_iterator<Container>::type Iterator;
 
         inline bool convertible() const { return true; }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk