3636# include < boost/type_traits/is_convertible.hpp>
3737# include < boost/type_traits/remove_reference.hpp>
3838
39- # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
40- # include < boost/type_traits/add_pointer.hpp>
41- # endif
42-
43- # include < boost/mpl/if.hpp>
44-
4539namespace boost { namespace python {
4640
4741namespace detail
@@ -98,11 +92,7 @@ namespace api
9892 class object_operators : public def_visitor <U>
9993 {
10094 protected:
101- # if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300
10295 typedef object const & object_cref;
103- # else
104- typedef object object_cref;
105- # endif
10696 public:
10797 // function call
10898 //
@@ -139,25 +129,11 @@ namespace api
139129
140130 template <class T >
141131 const_object_item
142- operator [](T const & key) const
143- # if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
144- ;
145- # else
146- {
147- return (*this )[object (key)];
148- }
149- # endif
132+ operator [](T const & key) const ;
150133
151134 template <class T >
152135 object_item
153- operator [](T const & key)
154- # if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
155- ;
156- # else
157- {
158- return (*this )[object (key)];
159- }
160- # endif
136+ operator [](T const & key);
161137
162138 // slicing
163139 //
@@ -175,29 +151,11 @@ namespace api
175151
176152 template <class T , class V >
177153 const_object_slice
178- slice (T const & start, V const & end) const
179- # if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
180- ;
181- # else
182- {
183- return this ->slice (
184- slice_bound<T>::type (start)
185- , slice_bound<V>::type (end));
186- }
187- # endif
154+ slice (T const & start, V const & end) const ;
188155
189156 template <class T , class V >
190157 object_slice
191- slice (T const & start, V const & end)
192- # if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
193- ;
194- # else
195- {
196- return this ->slice (
197- slice_bound<T>::type (start)
198- , slice_bound<V>::type (end));
199- }
200- # endif
158+ slice (T const & start, V const & end);
201159
202160 private: // def visitation for adding callable objects as class methods
203161
@@ -323,14 +281,7 @@ namespace api
323281
324282 // explicit conversion from any C++ object to Python
325283 template <class T >
326- explicit object (
327- T const & x
328- # if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
329- // use some SFINAE to un-confuse MSVC about its
330- // copy-initialization ambiguity claim.
331- , typename mpl::if_<is_proxy<T>,int &,int >::type* = 0
332- # endif
333- )
284+ explicit object (T const & x)
334285 : object_base(object_base_initializer(x))
335286 {
336287 }
0 commit comments