diff --git a/include/boost/python/suite/indexing/algorithms.hpp b/include/boost/python/suite/indexing/algorithms.hpp index 9c5ff39f..096f1c52 100755 --- a/include/boost/python/suite/indexing/algorithms.hpp +++ b/include/boost/python/suite/indexing/algorithms.hpp @@ -90,10 +90,10 @@ namespace boost { namespace python { namespace indexing { #else private: #endif - static size_type bounds_check ( - container &, index_param, char const *msg - , bool one_past = false - , bool truncate = false); + static size_type bounds_check( + container &, index_param, char const *msg, + bool one_past = false, + bool truncate = false); // Throws std::out_of_range if necessary. If one_past is set, then // indexes up to container.size() *inclusive* are allowed. If // truncate is set, then out of bounds values are reset to the @@ -109,8 +109,8 @@ namespace boost { namespace python { namespace indexing { template class assoc_algorithms : public default_algorithms - , Ovr> ::type> { @@ -157,12 +157,12 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME default_algorithms::size_type - default_algorithms::bounds_check ( - container &c - , index_param ix - , char const *msg - , bool one_past - , bool truncate) + default_algorithms::bounds_check( + container &c, + index_param ix, + char const *msg, + bool one_past, + bool truncate) { size_type bound = most_derived::size(c) + (one_past ? 1 : 0); size_type result; @@ -214,16 +214,16 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME default_algorithms::iterator - default_algorithms::find ( + default_algorithms::find( container &c, key_param key) { typedef typename container_traits::value_traits_ value_traits_; typedef typename value_traits_::equal_to comparison; - return std::find_if ( - most_derived::begin(c) - , most_derived::end(c) - , std::bind1st (comparison(), key)); + return std::find_if( + most_derived::begin(c), + most_derived::end(c), + std::bind1st (comparison(), key)); } ///////////////////////////////////////////////////////////////////////// @@ -232,14 +232,14 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME default_algorithms::size_type - default_algorithms::get_index ( + default_algorithms::get_index( container &c, key_param key) { iterator found (most_derived::find (c, key)); if (found == most_derived::end(c)) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "get_index: element not found"); boost::python::throw_error_already_set (); @@ -255,16 +255,16 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME default_algorithms::size_type - default_algorithms::count ( + default_algorithms::count( container &c, key_param key) { typedef typename container_traits::value_traits_ value_traits_; typedef typename value_traits_::equal_to comparison; - return std::count_if ( - most_derived::begin(c) - , most_derived::end(c) - , std::bind1st (comparison(), key)); + return std::count_if( + most_derived::begin(c), + most_derived::end(c), + std::bind1st (comparison(), key)); } ///////////////////////////////////////////////////////////////////////// @@ -273,7 +273,7 @@ namespace boost { namespace python { namespace indexing { template bool - default_algorithms::contains ( + default_algorithms::contains( container &c, key_param key) { return most_derived::find (c, key) != most_derived::end(c); @@ -285,7 +285,7 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME default_algorithms::reference - default_algorithms::get ( + default_algorithms::get( container &c, index_param ix) { return c[most_derived::bounds_check (c, ix, "get")]; @@ -297,7 +297,7 @@ namespace boost { namespace python { namespace indexing { template void - default_algorithms::assign ( + default_algorithms::assign( container &c, index_param ix, value_param val) { c[most_derived::bounds_check (c, ix, "assign")] = val; @@ -309,7 +309,7 @@ namespace boost { namespace python { namespace indexing { template void - default_algorithms::push_back ( + default_algorithms::push_back( container &c, value_param v) { c.push_back (v); @@ -321,13 +321,13 @@ namespace boost { namespace python { namespace indexing { template void - default_algorithms::insert ( + default_algorithms::insert( container &c, index_param i, value_param v) { iterator insert_pos (most_derived::begin(c)); // Index may range up to c.size() inclusive to allow inserting at end - std::advance ( + std::advance( insert_pos, most_derived::bounds_check (c, i, "insert", true, true)); c.insert (insert_pos, v); @@ -339,7 +339,7 @@ namespace boost { namespace python { namespace indexing { template void - default_algorithms::erase_range ( + default_algorithms::erase_range( container &c, index_param from, index_param to) { iterator start (most_derived::begin(c)); @@ -362,7 +362,7 @@ namespace boost { namespace python { namespace indexing { template void - default_algorithms::erase_one ( + default_algorithms::erase_one( container &c, index_param ix) { iterator iter (most_derived::begin(c)); @@ -421,12 +421,12 @@ namespace boost { namespace python { namespace indexing { template void - assoc_algorithms::erase_one ( + assoc_algorithms::erase_one( container &c, key_param key) { if (c.erase (key) == 0) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "Container does not hold value to be erased"); boost::python::throw_error_already_set (); @@ -451,7 +451,7 @@ namespace boost { namespace python { namespace indexing { template bool - assoc_algorithms::contains ( + assoc_algorithms::contains( container &c, key_param key) { return most_derived::find (c, key) != most_derived::end(c); @@ -464,14 +464,14 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME assoc_algorithms::iterator - assoc_algorithms::find_or_throw ( + assoc_algorithms::find_or_throw( container &c, index_param ix) { iterator iter = most_derived::find (c, ix); if (iter == most_derived::end(c)) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "associative container: key not found"); boost::python::throw_error_already_set (); @@ -486,7 +486,7 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME assoc_algorithms::size_type - assoc_algorithms::count ( + assoc_algorithms::count( container &c, key_param key) { return c.count (key); diff --git a/include/boost/python/suite/indexing/container_proxy.hpp b/include/boost/python/suite/indexing/container_proxy.hpp index d8a08564..84fb10f1 100755 --- a/include/boost/python/suite/indexing/container_proxy.hpp +++ b/include/boost/python/suite/indexing/container_proxy.hpp @@ -91,9 +91,9 @@ namespace boost { namespace python { namespace indexing { } #endif - template - , class Generator = vector_generator> + template, + class Generator = vector_generator> class container_proxy { typedef container_proxy self_type; @@ -122,16 +122,16 @@ namespace boost { namespace python { namespace indexing { typedef const_element_proxy const_value_type; typedef const_value_type const_reference; // Ref. semantics - typedef proxy_iterator iterator; + typedef proxy_iterator iterator; typedef iterator const_iterator; // No const_iterator yet implemented public: // Constructors template container_proxy (Iter start, Iter finish) // Define inline for MSVC6 compatibility - : m_held_obj (Holder::create()) - , m_proxies () + : m_held_obj (Holder::create()), + m_proxies () { insert (begin(), start, finish); } @@ -220,10 +220,10 @@ namespace boost { namespace python { namespace indexing { try { // Insert the new element(s) into the real container (could throw) - raw_container().insert ( - raw_container().begin() + iter.index - , from - , to); + raw_container().insert( + raw_container().begin() + iter.index, + from, + to); try { @@ -233,9 +233,9 @@ namespace boost { namespace python { namespace indexing { catch (...) { - raw_container().erase ( - raw_container().begin() + iter.index - , raw_container().begin() + iter.index + count); + raw_container().erase( + raw_container().begin() + iter.index, + raw_container().begin() + iter.index + count); throw; } @@ -243,18 +243,18 @@ namespace boost { namespace python { namespace indexing { catch (...) { - m_proxies.erase ( - m_proxies.begin() + iter.index - , m_proxies.begin() + iter.index + count); + m_proxies.erase( + m_proxies.begin() + iter.index, + m_proxies.begin() + iter.index + count); throw; } // Adjust any proxies after the inserted elements (nothrow) - adjust_proxies ( - m_proxies.begin() + iter.index + count - , m_proxies.end() - , static_cast (count)); + adjust_proxies( + m_proxies.begin() + iter.index + count, + m_proxies.end(), + static_cast (count)); } template @@ -302,8 +302,8 @@ namespace boost { namespace python { namespace indexing { template container_proxy ::container_proxy () - : m_held_obj (Holder::create()) - , m_proxies () + : m_held_obj (Holder::create()), + m_proxies () { // Container is empty - no further processing } @@ -311,8 +311,8 @@ namespace boost { namespace python { namespace indexing { template container_proxy ::container_proxy (held_type const &held) - : m_held_obj (Holder::copy (held)) - , m_proxies (size()) + : m_held_obj (Holder::copy (held)), + m_proxies (size()) { write_proxies (0, size()); } @@ -320,8 +320,8 @@ namespace boost { namespace python { namespace indexing { template container_proxy ::container_proxy (container_proxy const ©) - : m_held_obj (Holder::copy (copy.m_held_obj)) - , m_proxies (size()) + : m_held_obj (Holder::copy (copy.m_held_obj)), + m_proxies (size()) { write_proxies (0, size()); // Create our own proxies for the copied values } @@ -454,7 +454,7 @@ namespace boost { namespace python { namespace indexing { template BOOST_DEDUCED_TYPENAME container_proxy::iterator - container_proxy::erase ( + container_proxy::erase( iterator from, iterator to) { assert (from.ptr == this); @@ -465,16 +465,16 @@ namespace boost { namespace python { namespace indexing { // Erase the elements from the real container raw_iterator result - = raw_container().erase ( - raw_container().begin() + from.index - , raw_container().begin() + to.index); + = raw_container().erase( + raw_container().begin() + from.index, + raw_container().begin() + to.index); return iterator (this, result); } template BOOST_DEDUCED_TYPENAME container_proxy::iterator - container_proxy::insert ( + container_proxy::insert( iterator iter, raw_value_type const ©) { // Use the iterator-based version by treating the value as an @@ -485,7 +485,7 @@ namespace boost { namespace python { namespace indexing { } template - bool container_proxy::clear_proxy ( + bool container_proxy::clear_proxy( pointer_impl &ptr) { // Warning - this can break the class invariant. Use only when the @@ -509,7 +509,7 @@ namespace boost { namespace python { namespace indexing { } template - void container_proxy::clear_proxies ( + void container_proxy::clear_proxies( size_type from_index, size_type to_index) { while (from_index != to_index) @@ -535,7 +535,7 @@ namespace boost { namespace python { namespace indexing { } template - void container_proxy::detach_proxies ( + void container_proxy::detach_proxies( size_type from_index, size_type to_index) { while (from_index != to_index) @@ -564,12 +564,12 @@ namespace boost { namespace python { namespace indexing { } template - void container_proxy::notify_insertion ( + void container_proxy::notify_insertion( size_type from_index, size_type to_index) { size_type count = to_index - from_index; - m_proxies.insert ( + m_proxies.insert( m_proxies.begin() + from_index, count, pointer_impl()); try @@ -579,25 +579,25 @@ namespace boost { namespace python { namespace indexing { catch (...) { - m_proxies.erase ( - m_proxies.begin() + from_index - , m_proxies.begin() + to_index); + m_proxies.erase( + m_proxies.begin() + from_index, + m_proxies.begin() + to_index); throw; } // Adjust any proxies after the inserted elements (nothrow) - adjust_proxies ( - m_proxies.begin() + to_index - , m_proxies.end() - , static_cast (count)); + adjust_proxies( + m_proxies.begin() + to_index, + m_proxies.end(), + static_cast (count)); } template - void container_proxy::adjust_proxies ( - pointer_iterator from - , pointer_iterator to - , difference_type offset) + void container_proxy::adjust_proxies( + pointer_iterator from, + pointer_iterator to, + difference_type offset) { while (from != to) { @@ -607,7 +607,7 @@ namespace boost { namespace python { namespace indexing { } template - void container_proxy::write_proxies ( + void container_proxy::write_proxies( size_type from, size_type to) { // (over)write proxy pointers in the given range. Re-uses existing @@ -718,10 +718,10 @@ namespace boost { namespace python { namespace indexing { }; } #endif - template < - class Container - , int Flags = 0 - , class Traits = container_proxy_traits + template< + class Container, + int Flags = 0, + class Traits = container_proxy_traits > struct container_proxy_suite : container_suite > diff --git a/include/boost/python/suite/indexing/container_suite.hpp b/include/boost/python/suite/indexing/container_suite.hpp index 57f3ed15..910bb068 100755 --- a/include/boost/python/suite/indexing/container_suite.hpp +++ b/include/boost/python/suite/indexing/container_suite.hpp @@ -29,10 +29,10 @@ namespace boost { namespace python { namespace indexing { typedef boost::python::return_value_policy default_container_policies; - template < - class Container - , int Flags = 0 - , class Algorithms + template< + class Container, + int Flags = 0, + class Algorithms = algo_selector > struct container_suite diff --git a/include/boost/python/suite/indexing/container_traits.hpp b/include/boost/python/suite/indexing/container_traits.hpp index f964f355..17943bf5 100755 --- a/include/boost/python/suite/indexing/container_traits.hpp +++ b/include/boost/python/suite/indexing/container_traits.hpp @@ -55,24 +55,24 @@ namespace boost { namespace python { namespace indexing { template struct base_container_traits - : public ::boost::python::indexing::iterator_traits < - BOOST_DEDUCED_TYPENAME mpl::if_ < - is_const - , BOOST_DEDUCED_TYPENAME Container::const_iterator - , BOOST_DEDUCED_TYPENAME Container::iterator + : public ::boost::python::indexing::iterator_traits< + BOOST_DEDUCED_TYPENAME mpl::if_< + is_const, + BOOST_DEDUCED_TYPENAME Container::const_iterator, + BOOST_DEDUCED_TYPENAME Container::iterator >::type > { protected: - typedef ::boost::python::indexing::iterator_traits < - BOOST_DEDUCED_TYPENAME mpl::if_ < - is_const - , BOOST_DEDUCED_TYPENAME Container::const_iterator - , BOOST_DEDUCED_TYPENAME Container::iterator + typedef ::boost::python::indexing::iterator_traits< + BOOST_DEDUCED_TYPENAME mpl::if_< + is_const, + BOOST_DEDUCED_TYPENAME Container::const_iterator, + BOOST_DEDUCED_TYPENAME Container::iterator >::type > base_type; - BOOST_STATIC_CONSTANT ( + BOOST_STATIC_CONSTANT( bool, is_mutable = ! boost::is_const::value); public: @@ -96,14 +96,14 @@ namespace boost { namespace python { namespace indexing { // second (optional) template parameter typedef value_traits default_value_traits; - typedef typename detail::maybe_override < + typedef typename detail::maybe_override< default_value_traits, ValueTraits>::type value_traits_; - BOOST_STATIC_CONSTANT ( + BOOST_STATIC_CONSTANT( bool, has_mutable_ref = ICE_AND (base_type::has_mutable_ref, is_mutable)); - BOOST_STATIC_CONSTANT ( + BOOST_STATIC_CONSTANT( bool, has_find = value_traits_::equality_comparable); // Assume the worst for everything else diff --git a/include/boost/python/suite/indexing/deque.hpp b/include/boost/python/suite/indexing/deque.hpp index 748094b3..9c652320 100755 --- a/include/boost/python/suite/indexing/deque.hpp +++ b/include/boost/python/suite/indexing/deque.hpp @@ -46,10 +46,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = default_sequence_traits + template< + class Container, + int Flags = 0, + class Traits = default_sequence_traits > struct deque_suite : container_suite > diff --git a/include/boost/python/suite/indexing/element_proxy_traits.hpp b/include/boost/python/suite/indexing/element_proxy_traits.hpp index 4c934a08..60a796b6 100755 --- a/include/boost/python/suite/indexing/element_proxy_traits.hpp +++ b/include/boost/python/suite/indexing/element_proxy_traits.hpp @@ -30,7 +30,7 @@ namespace boost { namespace python { namespace indexing { template struct element_proxy_traits - : public value_traits < + : public value_traits< BOOST_DEDUCED_TYPENAME ContainerProxy::raw_value_type> { typedef element_proxy element_proxy_; @@ -44,7 +44,7 @@ namespace boost { namespace python { namespace indexing { { typename base_type::less m_base_compare; - bool operator() ( + bool operator()( element_proxy_ const &p1, element_proxy_ const &p2) const { return m_base_compare (*p1, *p2); @@ -59,7 +59,7 @@ namespace boost { namespace python { namespace indexing { typename base_type::equal_to m_base_compare; - bool operator() ( + bool operator()( raw_value_type const &v, element_proxy_ const &p) const { return m_base_compare (v, *p); diff --git a/include/boost/python/suite/indexing/int_slice_helper.hpp b/include/boost/python/suite/indexing/int_slice_helper.hpp index 45b86bbd..ac9589ef 100755 --- a/include/boost/python/suite/indexing/int_slice_helper.hpp +++ b/include/boost/python/suite/indexing/int_slice_helper.hpp @@ -58,9 +58,9 @@ namespace boost { namespace python { namespace indexing { template int_slice_helper ::int_slice_helper (container &c, slice_type const &sl) - : m_slice (sl) - , m_ptr (&c) - , m_pos (-1) + : m_slice (sl), + m_ptr (&c), + m_pos (-1) { } @@ -117,7 +117,7 @@ namespace boost { namespace python { namespace indexing { namespace detail { template struct maybe_insert { template - static void apply ( + static void apply( # if defined (BOOST_NO_MEMBER_TEMPLATES) \ && defined (BOOST_MSVC6_MEMBER_TEMPLATES) // Can't explicitly instantiate member function - must let @@ -125,13 +125,13 @@ namespace boost { namespace python { namespace indexing { // parameter. Same applies throughout Algorithms *, # endif - typename Algorithms::container & - , typename Algorithms::index_param - , typename Algorithms::value_param) + typename Algorithms::container &, + typename Algorithms::index_param, + typename Algorithms::value_param) { - PyErr_SetString ( - PyExc_TypeError - , "container does not support insertion into slice"); + PyErr_SetString( + PyExc_TypeError, + "container does not support insertion into slice"); boost::python::throw_error_already_set (); } @@ -139,14 +139,14 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_insert { template - static void apply ( + static void apply( # if defined (BOOST_NO_MEMBER_TEMPLATES) \ && defined (BOOST_MSVC6_MEMBER_TEMPLATES) Algorithms *, # endif - typename Algorithms::container &c - , typename Algorithms::index_param i - , typename Algorithms::value_param v) + typename Algorithms::container &c, + typename Algorithms::index_param i, + typename Algorithms::value_param v) { Algorithms::insert (c, i, v); } @@ -158,7 +158,7 @@ namespace boost { namespace python { namespace indexing { { if (m_slice.step() != 1) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "attempt to insert via extended slice"); boost::python::throw_error_already_set (); @@ -171,7 +171,7 @@ namespace boost { namespace python { namespace indexing { && defined (BOOST_MSVC6_MEMBER_TEMPLATES) apply (static_cast(0), # else - BOOST_NESTED_TEMPLATE apply ( + BOOST_NESTED_TEMPLATE apply ( # endif *m_ptr, m_pos, val); @@ -182,16 +182,16 @@ namespace boost { namespace python { namespace indexing { namespace detail { template struct maybe_erase { template - static void apply ( + static void apply( # if defined (BOOST_NO_MEMBER_TEMPLATES) \ && defined (BOOST_MSVC6_MEMBER_TEMPLATES) Algorithms *, # endif - typename Algorithms::container & - , typename Algorithms::index_param - , typename Algorithms::index_param) + typename Algorithms::container &, + typename Algorithms::index_param, + typename Algorithms::index_param) { - PyErr_SetString ( + PyErr_SetString( PyExc_TypeError, "container does not support item deletion"); boost::python::throw_error_already_set (); @@ -200,14 +200,14 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_erase { template - static void apply ( + static void apply( # if defined (BOOST_NO_MEMBER_TEMPLATES) \ && defined (BOOST_MSVC6_MEMBER_TEMPLATES) Algorithms *, # endif - typename Algorithms::container &c - , typename Algorithms::index_param from - , typename Algorithms::index_param to) + typename Algorithms::container &c, + typename Algorithms::index_param from, + typename Algorithms::index_param to) { Algorithms::erase_range (c, from, to); } @@ -219,7 +219,7 @@ namespace boost { namespace python { namespace indexing { { if (m_slice.step() != 1) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "attempt to delete via extended slice"); boost::python::throw_error_already_set (); @@ -233,7 +233,7 @@ namespace boost { namespace python { namespace indexing { && defined (BOOST_MSVC6_MEMBER_TEMPLATES) apply (static_cast(0), # else - BOOST_NESTED_TEMPLATE apply ( + BOOST_NESTED_TEMPLATE apply ( # endif *m_ptr, m_pos, m_slice.stop()); } diff --git a/include/boost/python/suite/indexing/iterator_range.hpp b/include/boost/python/suite/indexing/iterator_range.hpp index b9cb9a34..392da52c 100755 --- a/include/boost/python/suite/indexing/iterator_range.hpp +++ b/include/boost/python/suite/indexing/iterator_range.hpp @@ -80,7 +80,7 @@ namespace boost { namespace python { namespace indexing { template iterator_range make_iterator_range (T *, T*); #if !BOOST_WORKAROUND (BOOST_MSVC, <= 1200) - template iterator_range make_iterator_range ( + template iterator_range make_iterator_range( T (&array)[N]); template T *begin (T (&array)[N]); @@ -97,18 +97,18 @@ namespace boost { namespace python { namespace indexing { #endif template - iterator_range::iterator_range ( + iterator_range::iterator_range( iterator_param begin, iterator_param end) - : m_begin (begin) - , m_end (end) + : m_begin (begin), + m_end (end) { } template iterator_range ::iterator_range (std::pair const &pair) - : m_begin (pair.first) - , m_end (pair.second) + : m_begin (pair.first), + m_end (pair.second) { } @@ -201,10 +201,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = base_container_traits + template< + class Container, + int Flags = 0, + class Traits = base_container_traits > struct iterator_range_suite : container_suite > diff --git a/include/boost/python/suite/indexing/iterator_traits.hpp b/include/boost/python/suite/indexing/iterator_traits.hpp index eade66c4..c5ae85be 100755 --- a/include/boost/python/suite/indexing/iterator_traits.hpp +++ b/include/boost/python/suite/indexing/iterator_traits.hpp @@ -49,7 +49,7 @@ namespace boost { namespace python { namespace indexing { BOOST_STATIC_CONSTANT (bool, has_copyable_iter = false); BOOST_STATIC_CONSTANT (bool, is_reorderable = false); - BOOST_STATIC_CONSTANT ( + BOOST_STATIC_CONSTANT( bool, has_mutable_ref = is_mutable_ref::value); BOOST_STATIC_CONSTANT (index_style_t, index_style = index_style_none); diff --git a/include/boost/python/suite/indexing/list.hpp b/include/boost/python/suite/indexing/list.hpp index 25f42f5f..681e9fbb 100755 --- a/include/boost/python/suite/indexing/list.hpp +++ b/include/boost/python/suite/indexing/list.hpp @@ -37,8 +37,8 @@ namespace boost { namespace python { namespace indexing { template class list_algorithms : public default_algorithms - , Ovr> ::type> { @@ -76,10 +76,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = default_sequence_traits + template< + class Container, + int Flags = 0, + class Traits = default_sequence_traits > struct list_suite : container_suite > @@ -111,7 +111,7 @@ namespace boost { namespace python { namespace indexing { // provided that value_traits_::less is std::less. It // would be possible to support std::greater (the only other // overload of list::sort in MSVC6) with some additional work. - BOOST_STATIC_ASSERT ( + BOOST_STATIC_ASSERT( (::boost::is_same >::value)); c.sort (); #else diff --git a/include/boost/python/suite/indexing/map.hpp b/include/boost/python/suite/indexing/map.hpp index b37c4b02..37a1af5b 100755 --- a/include/boost/python/suite/indexing/map.hpp +++ b/include/boost/python/suite/indexing/map.hpp @@ -66,8 +66,8 @@ namespace boost { namespace python { namespace indexing { template class map_algorithms : public assoc_algorithms - , Ovr> ::type> { @@ -126,10 +126,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = map_traits + template< + class Container, + int Flags = 0, + class Traits = map_traits > struct map_suite : container_suite > @@ -153,7 +153,7 @@ namespace boost { namespace python { namespace indexing { template void - map_algorithms::assign ( + map_algorithms::assign( container &c, index_param ix, value_param val) { c[ix] = val; // Handles overwrite and insert @@ -166,19 +166,19 @@ namespace boost { namespace python { namespace indexing { template void - map_algorithms::insert ( + map_algorithms::insert( container &c, index_param ix, value_param val) { typedef std::pair - + pair_type; // Can't use std::make_pair, because param types may be references if (!c.insert (pair_type (ix, val)).second) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "Map already holds value for insertion"); boost::python::throw_error_already_set (); diff --git a/include/boost/python/suite/indexing/proxy_iterator.hpp b/include/boost/python/suite/indexing/proxy_iterator.hpp index e6bc5af9..1a47612e 100755 --- a/include/boost/python/suite/indexing/proxy_iterator.hpp +++ b/include/boost/python/suite/indexing/proxy_iterator.hpp @@ -24,27 +24,27 @@ namespace boost { namespace python { namespace indexing { - template + template class proxy_iterator - : public boost::iterator < - std::random_access_iterator_tag - , ElementProxy - , typename Traits::difference_type - , ElementProxy * - , ElementProxy // Already has reference semantics + : public boost::iterator< + std::random_access_iterator_tag, + ElementProxy, + typename Traits::difference_type, + ElementProxy *, + ElementProxy // Already has reference semantics > { #if !defined (BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template friend class container_proxy; #endif - typedef boost::iterator < - std::random_access_iterator_tag - , ElementProxy - , typename Traits::difference_type - , ElementProxy * - , ElementProxy + typedef boost::iterator< + std::random_access_iterator_tag, + ElementProxy, + typename Traits::difference_type, + ElementProxy *, + ElementProxy > base_type; public: @@ -148,9 +148,9 @@ namespace boost { namespace python { namespace indexing { // MSVC7.0 can't decide between this and the unspecialized version namespace std { template - void iter_swap ( - boost::python::indexing::proxy_iterator const &first - , boost::python::indexing::proxy_iterator const &second) + void iter_swap( + boost::python::indexing::proxy_iterator const &first, + boost::python::indexing::proxy_iterator const &second) { first.iter_swap (second); } diff --git a/include/boost/python/suite/indexing/set.hpp b/include/boost/python/suite/indexing/set.hpp index 816d2808..4bc8daf4 100755 --- a/include/boost/python/suite/indexing/set.hpp +++ b/include/boost/python/suite/indexing/set.hpp @@ -59,8 +59,8 @@ namespace boost { namespace python { namespace indexing { template class set_algorithms : public assoc_algorithms - , Ovr> ::type> { @@ -114,10 +114,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = set_traits + template< + class Container, + int Flags = 0, + class Traits = set_traits > struct set_suite : container_suite > @@ -130,12 +130,12 @@ namespace boost { namespace python { namespace indexing { template void - set_algorithms::insert ( + set_algorithms::insert( container &c, index_param ix) { if (!c.insert (ix).second) { - PyErr_SetString ( + PyErr_SetString( PyExc_ValueError, "Set already holds value for insertion"); boost::python::throw_error_already_set (); diff --git a/include/boost/python/suite/indexing/shared_proxy_impl.hpp b/include/boost/python/suite/indexing/shared_proxy_impl.hpp index ef8a23e1..7322c47e 100755 --- a/include/boost/python/suite/indexing/shared_proxy_impl.hpp +++ b/include/boost/python/suite/indexing/shared_proxy_impl.hpp @@ -67,19 +67,19 @@ namespace boost { namespace python { namespace indexing { }; template - shared_proxy_impl::shared_proxy_impl (ContainerProxy *owner - , size_t index) - : m_owner_ptr (owner) - , m_index (index) - , m_element_ptr () + shared_proxy_impl::shared_proxy_impl (ContainerProxy *owner, + size_t index) + : m_owner_ptr (owner), + m_index (index), + m_element_ptr () { } template shared_proxy_impl::shared_proxy_impl (value_type const &val) - : m_owner_ptr (0) - , m_index (static_cast(-1)) - , m_element_ptr (new value_type (val)) + : m_owner_ptr (0), + m_index (static_cast(-1)), + m_element_ptr (new value_type (val)) { } @@ -95,7 +95,7 @@ namespace boost { namespace python { namespace indexing { template void shared_proxy_impl::detach () { - BOOST_PYTHON_INDEXING_RESET_AUTO_PTR ( + BOOST_PYTHON_INDEXING_RESET_AUTO_PTR( m_element_ptr, new value_type (**this)); m_owner_ptr = 0; m_index = static_cast(-1); diff --git a/include/boost/python/suite/indexing/slice.hpp b/include/boost/python/suite/indexing/slice.hpp index 8bbda407..04765380 100755 --- a/include/boost/python/suite/indexing/slice.hpp +++ b/include/boost/python/suite/indexing/slice.hpp @@ -78,7 +78,7 @@ boost::python::indexing::slice::slice (T const &ref) { if (!PySlice_Check (this->ptr())) { - PyErr_SetString ( + PyErr_SetString( PyExc_TypeError, "slice constructor: passed a non-slice object"); boost::python::throw_error_already_set(); @@ -90,7 +90,7 @@ namespace boost { namespace python { namespace converter { // Specialized converter to handle PySlice_Type objects template<> struct object_manager_traits - : pytype_object_manager_traits < + : pytype_object_manager_traits< &PySlice_Type, ::boost::python::indexing::slice> { }; diff --git a/include/boost/python/suite/indexing/slice_handler.hpp b/include/boost/python/suite/indexing/slice_handler.hpp index ed950996..62cee2c5 100755 --- a/include/boost/python/suite/indexing/slice_handler.hpp +++ b/include/boost/python/suite/indexing/slice_handler.hpp @@ -83,7 +83,7 @@ namespace boost { namespace python { namespace indexing { ::make_getitem (Policy const &policy) { return - boost::python::make_function ( + boost::python::make_function( get_slice, detail::postcall_override (policy)); } @@ -209,7 +209,7 @@ namespace boost { namespace python { namespace indexing { if (!read_ptr.get()) { - PyErr_SetString ( + PyErr_SetString( PyExc_TypeError, "Type assigned to slice must be a sequence"); boost::python::throw_error_already_set(); @@ -219,10 +219,10 @@ namespace boost { namespace python { namespace indexing { // a reference to existing object, if possible and sensible) and the // second allowing implicit conversions. - typedef boost::python::extract < + typedef boost::python::extract< BOOST_DEDUCED_TYPENAME Algorithms::value_param> extractor1; - typedef boost::python::extract < + typedef boost::python::extract< BOOST_DEDUCED_TYPENAME Algorithms::value_type> extractor2; // Note: any error during this operation will probably leave the @@ -294,9 +294,9 @@ namespace boost { namespace python { namespace indexing { slice sl ((boost::python::handle<> (PySlice_New - (length.ptr() - , boost::python::object().ptr() - , boost::python::object().ptr())))); + (length.ptr(), + boost::python::object().ptr(), + boost::python::object().ptr())))); set_slice (c, sl, values); } diff --git a/include/boost/python/suite/indexing/suite_utils.hpp b/include/boost/python/suite/indexing/suite_utils.hpp index 65606601..204c75ce 100755 --- a/include/boost/python/suite/indexing/suite_utils.hpp +++ b/include/boost/python/suite/indexing/suite_utils.hpp @@ -34,9 +34,9 @@ namespace boost { namespace python { namespace indexing { index_style_t const index_style_linear = 2; #else enum index_style_t { - index_style_none // No random access (iteration only) - , index_style_nonlinear // Random access by key (no slicing) - , index_style_linear // Random access by integer index (allows slicing) + index_style_none, // No random access (iteration only) + index_style_nonlinear, // Random access by key (no slicing) + index_style_linear // Random access by integer index (allows slicing) }; #endif diff --git a/include/boost/python/suite/indexing/vector.hpp b/include/boost/python/suite/indexing/vector.hpp index b67d781f..f8741207 100755 --- a/include/boost/python/suite/indexing/vector.hpp +++ b/include/boost/python/suite/indexing/vector.hpp @@ -46,10 +46,10 @@ namespace boost { namespace python { namespace indexing { } #endif - template < - class Container - , int Flags = 0 - , class Traits = default_sequence_traits + template< + class Container, + int Flags = 0, + class Traits = default_sequence_traits > struct vector_suite : container_suite > diff --git a/include/boost/python/suite/indexing/visitor.hpp b/include/boost/python/suite/indexing/visitor.hpp index f35fd7ca..1912655a 100755 --- a/include/boost/python/suite/indexing/visitor.hpp +++ b/include/boost/python/suite/indexing/visitor.hpp @@ -32,13 +32,13 @@ namespace boost { namespace python { namespace indexing { enum visitor_flags { - disable_len = 1 - , disable_slices = 2 - , disable_search = 4 - , disable_reorder = 8 - , disable_extend = 16 - , disable_insert = 32 - , minimum_support = 0xffff // Disable all optional features + disable_len = 1, + disable_slices = 2, + disable_search = 4, + disable_reorder = 8, + disable_extend = 16, + disable_insert = 32, + minimum_support = 0xffff // Disable all optional features }; namespace detail { @@ -77,10 +77,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_len { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__len__", &Algorithms::size, policy); } @@ -103,10 +103,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_getitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__getitem__", &Algorithms::get, policy); } @@ -119,15 +119,15 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_getitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__getitem__", &Algorithms::get, policy); - pyClass.def ( - "__getitem__" - , slice_handler::make_getitem (policy)); + pyClass.def( + "__getitem__", + slice_handler::make_getitem (policy)); } }; @@ -148,10 +148,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_setitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__setitem__", &Algorithms::assign, policy); } @@ -164,15 +164,15 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_setitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__setitem__", &Algorithms::assign, policy); - pyClass.def ( - "__setitem__" - , slice_handler::make_setitem (policy)); + pyClass.def( + "__setitem__", + slice_handler::make_setitem (policy)); } }; @@ -193,10 +193,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_delitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__delitem__", &Algorithms::erase_one, policy); } @@ -209,15 +209,15 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_delitem { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("__delitem__", &Algorithms::erase_one, policy); - pyClass.def ( - "__delitem__" - , slice_handler::make_delitem (policy)); + pyClass.def( + "__delitem__", + slice_handler::make_delitem (policy)); } }; @@ -238,20 +238,20 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_iter { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &) { // Should maybe separate precall and postcall portions of the // policy (precall when generating the range object, postcall // when returing from range.next())? - pyClass.def ( - "__iter__" - , boost::python::range ( - Algorithms::begin - , Algorithms::end)); + pyClass.def( + "__iter__", + boost::python::range( + Algorithms::begin, + Algorithms::end)); } }; @@ -272,10 +272,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_sort { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("sort", &Algorithms::sort, policy); } @@ -298,10 +298,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_reverse { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("reverse", &Algorithms::reverse, policy); } @@ -324,10 +324,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_append { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("append", &Algorithms::push_back, policy); } @@ -350,10 +350,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_insert { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("insert", Algorithms::insert, policy); } @@ -376,14 +376,14 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_extend { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { - pyClass.def ( - "extend" - , slice_handler::make_extend (policy)); + pyClass.def( + "extend", + slice_handler::make_extend (policy)); } }; @@ -404,10 +404,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_index { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("index", Algorithms::get_index, policy); } @@ -430,10 +430,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_count { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { pyClass.def ("count", Algorithms::count, policy); pyClass.def ("contains", Algorithms::contains, policy); @@ -448,10 +448,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_count { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { // This is identical to the index_style_none version. Doing it // this way avoids using a partial specialization for @@ -468,10 +468,10 @@ namespace boost { namespace python { namespace indexing { template<> struct maybe_add_count { template - static void apply ( - PythonClass &pyClass - , Algorithms const & - , Policy const &policy) + static void apply( + PythonClass &pyClass, + Algorithms const &, + Policy const &policy) { // Nearest equivalent is has_key, since Python dictionaries // have at most one value for a key. @@ -502,13 +502,13 @@ namespace boost { namespace python { namespace indexing { explicit visitor (Policy const &policy = Policy()) : m_policy (policy) { } private: - BOOST_STATIC_CONSTANT ( + BOOST_STATIC_CONSTANT( bool, has_indexing = traits::index_style >= index_style_nonlinear); - BOOST_STATIC_CONSTANT ( - bool, has_slicing = ICE_AND ( - traits::index_style == index_style_linear - , ICE_NOT (Flags & disable_slices))); + BOOST_STATIC_CONSTANT( + bool, has_slicing = ICE_AND( + traits::index_style == index_style_linear, + ICE_NOT (Flags & disable_slices))); public: template @@ -519,69 +519,69 @@ namespace boost { namespace python { namespace indexing { // Note - this will add __len__ for anything that can determine // its size, even if that might be inefficient (e.g. have linear // time complexity). Disable by setting disable_len in Flags - maybe_add_len < - ICE_AND ( - traits::has_copyable_iter - , ICE_NOT (Flags & disable_len)) + maybe_add_len< + ICE_AND( + traits::has_copyable_iter, + ICE_NOT (Flags & disable_len)) >::apply (pyClass, algorithms(), precallPolicy); maybe_add_getitem ::apply (pyClass, algorithms(), m_policy); - maybe_add_setitem < - ICE_AND (traits::has_mutable_ref, has_indexing) - , has_slicing + maybe_add_setitem< + ICE_AND (traits::has_mutable_ref, has_indexing), + has_slicing >::apply (pyClass, algorithms(), m_policy); maybe_add_delitem ::apply (pyClass, algorithms(), m_policy); maybe_add_iter< - ICE_AND ( - traits::index_style != index_style_linear - , traits::has_copyable_iter) + ICE_AND( + traits::index_style != index_style_linear, + traits::has_copyable_iter) >::apply (pyClass, algorithms(), m_policy); - maybe_add_sort < - ICE_AND ( - ICE_AND ( - traits::is_reorderable - , value_traits_::lessthan_comparable) - , ICE_NOT (Flags & disable_reorder)) + maybe_add_sort< + ICE_AND( + ICE_AND( + traits::is_reorderable, + value_traits_::lessthan_comparable), + ICE_NOT (Flags & disable_reorder)) >::apply (pyClass, algorithms(), precallPolicy); - maybe_add_reverse < + maybe_add_reverse< ICE_AND (traits::is_reorderable, ICE_NOT (Flags & disable_reorder)) >::apply (pyClass, algorithms(), precallPolicy); maybe_add_append ::apply (pyClass, algorithms(), precallPolicy); - maybe_add_insert < + maybe_add_insert< ICE_AND (traits::has_insert, ICE_NOT (Flags & disable_insert)) >::apply (pyClass, algorithms(), precallPolicy); - maybe_add_extend < - ICE_AND ( - ICE_AND ( - traits::index_style == index_style_linear - , traits::has_insert) - , ICE_NOT (Flags & disable_extend)) + maybe_add_extend< + ICE_AND( + ICE_AND( + traits::index_style == index_style_linear, + traits::has_insert), + ICE_NOT (Flags & disable_extend)) >::apply (pyClass, algorithms(), precallPolicy); - maybe_add_index < - ICE_AND ( - ICE_AND ( - traits::index_style == index_style_linear - , traits::has_find) - , ICE_NOT (Flags & disable_search)) + maybe_add_index< + ICE_AND( + ICE_AND( + traits::index_style == index_style_linear, + traits::has_find), + ICE_NOT (Flags & disable_search)) >::apply (pyClass, algorithms(), precallPolicy); - maybe_add_count < - ICE_AND ( - traits::has_find - , ICE_NOT (Flags & disable_search)) - , traits::index_style + maybe_add_count< + ICE_AND( + traits::has_find, + ICE_NOT (Flags & disable_search)), + traits::index_style >::apply (pyClass, algorithms(), precallPolicy); Algorithms::visitor_helper (pyClass, m_policy); diff --git a/src/indexing/python_iterator.cpp b/src/indexing/python_iterator.cpp index 1d7c6969..a2a8fbde 100755 --- a/src/indexing/python_iterator.cpp +++ b/src/indexing/python_iterator.cpp @@ -30,7 +30,7 @@ boost::python::indexing::make_iterator (boost::python::object temp) try { - BOOST_PYTHON_INDEXING_RESET_AUTO_PTR ( + BOOST_PYTHON_INDEXING_RESET_AUTO_PTR( result, (python_iterator *) new python_iter_iterator (temp)); } @@ -40,7 +40,7 @@ boost::python::indexing::make_iterator (boost::python::object temp) try { - BOOST_PYTHON_INDEXING_RESET_AUTO_PTR ( + BOOST_PYTHON_INDEXING_RESET_AUTO_PTR( result, (python_iterator *) new python_getitem_iterator (temp)); } @@ -67,9 +67,9 @@ boost::python::indexing::python_iterator::~python_iterator () boost::python::indexing::python_getitem_iterator ::python_getitem_iterator (boost::python::object obj) - : m_getitem_method (obj.attr ("__getitem__")) - , m_index (0) - , m_current() + : m_getitem_method (obj.attr ("__getitem__")), + m_index (0), + m_current() { } @@ -123,8 +123,8 @@ boost::python::indexing::python_getitem_iterator::current () const boost::python::indexing::python_iter_iterator ::python_iter_iterator (boost::python::object obj) - : m_next_method (obj.attr ("__iter__")().attr ("next")) - , m_current() + : m_next_method (obj.attr ("__iter__")().attr ("next")), + m_current() { } diff --git a/src/indexing/slice.cpp b/src/indexing/slice.cpp index 00d2712d..d1db731c 100755 --- a/src/indexing/slice.cpp +++ b/src/indexing/slice.cpp @@ -47,12 +47,12 @@ boost::python::indexing::integer_slice : m_slice (sl) // Leave index members uninitialized { - PySlice_GetIndices ( - reinterpret_cast (m_slice.ptr()) - , length - , &m_start - , &m_stop - , &m_step); + PySlice_GetIndices( + reinterpret_cast (m_slice.ptr()), + length, + &m_start, + &m_stop, + &m_step); if (m_step == 0) { diff --git a/test/int_wrapper.hpp b/test/int_wrapper.hpp index a14f0597..412a67d8 100755 --- a/test/int_wrapper.hpp +++ b/test/int_wrapper.hpp @@ -60,8 +60,8 @@ inline int compare (int_wrapper const &lhs, int_wrapper const &rhs); // int_wrapper::int_wrapper () - : m_obj_number (our_object_counter++) - , m_int (0) + : m_obj_number (our_object_counter++), + m_int (0) { if (our_trace_flag) { @@ -70,27 +70,27 @@ int_wrapper::int_wrapper () } int_wrapper::int_wrapper (int i) - : m_obj_number (our_object_counter++) - , m_int (i) + : m_obj_number (our_object_counter++), + m_int (i) { if (our_trace_flag) { - printf ("int_wrapper %u (%d) at %p\n" - , m_obj_number - , m_int + printf ("int_wrapper %u (%d) at %p\n", + m_obj_number, + m_int , this); } } int_wrapper::int_wrapper (int_wrapper const &other) - : m_obj_number (our_object_counter++) - , m_int (other.m_int) + : m_obj_number (our_object_counter++), + m_int (other.m_int) { if (our_trace_flag) { - printf ("int_wrapper %u (int_wrapper %u at %p) at %p\n" - , m_obj_number - , other.m_obj_number + printf ("int_wrapper %u (int_wrapper %u at %p) at %p\n", + m_obj_number, + other.m_obj_number , &other , this); } @@ -100,10 +100,10 @@ int_wrapper &int_wrapper::operator= (int_wrapper const &other) { if (our_trace_flag) { - printf ("int_wrapper %u at %p = int_wrapper %u at %p\n" - , m_obj_number - , this - , other.m_obj_number + printf ("int_wrapper %u at %p = int_wrapper %u at %p\n", + m_obj_number + , this, + other.m_obj_number , &other); } diff --git a/test/test_array_ext.cpp b/test/test_array_ext.cpp index 926a0e6e..33d18848 100755 --- a/test/test_array_ext.cpp +++ b/test/test_array_ext.cpp @@ -36,9 +36,9 @@ boost::python::indexing::iterator_range get_array_plain() boost::python::indexing::iterator_range get_array_wrap() { static int_wrapper array[] = { - int_wrapper(8), int_wrapper(6), int_wrapper(4), int_wrapper(2) - , int_wrapper(1), int_wrapper(3), int_wrapper(5) - , int_wrapper(7), int_wrapper(0) }; + int_wrapper(8), int_wrapper(6), int_wrapper(4), int_wrapper(2), + int_wrapper(1), int_wrapper(3), int_wrapper(5), + int_wrapper(7), int_wrapper(0) }; return BOOST_MAKE_ITERATOR_RANGE (array); } @@ -82,8 +82,8 @@ BOOST_PYTHON_MODULE(test_array_ext) // lifetimes of the array elements. boost::python::class_ ("Array_ref", boost::python::init()) - .def (Suite2::with_policies ( - boost::python::return_value_policy < + .def (Suite2::with_policies( + boost::python::return_value_policy< boost::python::reference_existing_object>())); boost::python::def ("get_array_wrap", get_array_wrap); diff --git a/test/test_container_proxy.cpp b/test/test_container_proxy.cpp index f1f3c095..dc71f034 100755 --- a/test/test_container_proxy.cpp +++ b/test/test_container_proxy.cpp @@ -143,7 +143,7 @@ void test_direct_proxy () raw_container_type raw_container (4); { - std::auto_ptr proxy_auto_p ( + std::auto_ptr proxy_auto_p( new proxy_container_type (raw_container)); initial_tests (*proxy_auto_p); @@ -168,7 +168,7 @@ void test_direct_proxy () { // Check construction from iterators - proxy_container_type proxy_container ( + proxy_container_type proxy_container( raw_container.begin(), raw_container.end()); BOOST_CHECK (proxy_container.is_valid()); diff --git a/test/test_indexing_const.cpp b/test/test_indexing_const.cpp index 592e1625..abeacd8c 100755 --- a/test/test_indexing_const.cpp +++ b/test/test_indexing_const.cpp @@ -32,16 +32,16 @@ unsigned int_wrapper::our_object_counter = 0; std::vector get_vector () { static int_wrapper array[] = { - int_wrapper(8), int_wrapper(6), int_wrapper(4), int_wrapper(2) - , int_wrapper(1), int_wrapper(3), int_wrapper(5) - , int_wrapper(7), int_wrapper(0) }; + int_wrapper(8), int_wrapper(6), int_wrapper(4), int_wrapper(2), + int_wrapper(1), int_wrapper(3), int_wrapper(5), + int_wrapper(7), int_wrapper(0) }; return std::vector #if BOOST_WORKAROUND (BOOST_MSVC, <=1200) (array, array + sizeof(array) / sizeof (array[0])); #else - (boost::python::indexing::begin(array) - , boost::python::indexing::end(array)); + (boost::python::indexing::begin(array), + boost::python::indexing::end(array)); #endif }