Skip to content

Commit 1fca114

Browse files
author
Ralf W. Grosse-Kunstleve
committed
work around RedHat 7.3 gcc 2.96 code generation errors: use previously checked in VC6, VC7.0 workaround only for exactly these compilers
[SVN r29267]
1 parent 70ee460 commit 1fca114

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

include/boost/python/class.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,22 @@ class class_ : public objects::class_base
301301
}
302302

303303
// Property creation
304+
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
305+
template <class Get>
306+
self& add_property(char const* name, Get fget, char const* docstr = 0)
307+
{
308+
base::add_property(name, this->make_getter(fget), docstr);
309+
return *this;
310+
}
311+
312+
template <class Get, class Set>
313+
self& add_property(char const* name, Get fget, Set fset, char const* docstr = 0)
314+
{
315+
base::add_property(
316+
name, this->make_getter(fget), this->make_setter(fset), docstr);
317+
return *this;
318+
}
319+
# else
304320
private:
305321
template <class Get>
306322
self& add_property_impl(char const* name, Get fget, char const* docstr, int)
@@ -340,6 +356,7 @@ class class_ : public objects::class_base
340356
name, this->make_getter(fget), this->make_setter(fset), docstr);
341357
return *this;
342358
}
359+
# endif
343360

344361
template <class Get>
345362
self& add_static_property(char const* name, Get fget)

0 commit comments

Comments
 (0)