Skip to content

Commit 7407a6b

Browse files
author
Ralf W. Grosse-Kunstleve
committed
use def_init() for compilers that don't support init<... optional<...> >; with this all tru64_cxx test pass; (I know this is not testing the default argument support, but a failing test isn't very inspiring for others, and the addition shows people what the alternative is.)
[SVN r15154]
1 parent 0453e05 commit 7407a6b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/defaults.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,13 @@ BOOST_PYTHON_MODULE_INIT(defaults_ext)
132132
# if (!defined(__EDG_VERSION__) || __EDG_VERSION__ > 245) \
133133
&& (!defined(BOOST_INTEL_CXX_VERSION) || BOOST_INTEL_CXX_VERSION > 600)
134134
.def(init<int, optional<char, std::string, double> >())
135+
#else
136+
.def_init(args<int>())
137+
.def_init(args<int, char>())
138+
.def_init(args<int, char, std::string>())
139+
.def_init(args<int, char, std::string, double>())
135140
#endif
136-
137-
138-
.def("get_state", &X::get_state)
141+
.def("get_state", &X::get_state)
139142
.def("bar", &X::bar, X_bar_stubs())
140143
.def("foo", (object(X::*)(std::string, bool) const)0, X_foo_2_stubs())
141144
.def("foo", (object(X::*)(int, bool) const)0, X_foo_2_stubs())

0 commit comments

Comments
 (0)