From 643a8717b427c200d82138e9e163801a9fad318b Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Sun, 3 Mar 2013 20:16:21 +0100 Subject: [PATCH] Make old gcc happy --- simgear/nasal/cppbind/detail/functor_templates.hxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simgear/nasal/cppbind/detail/functor_templates.hxx b/simgear/nasal/cppbind/detail/functor_templates.hxx index 51bb6c99..eeb3600a 100644 --- a/simgear/nasal/cppbind/detail/functor_templates.hxx +++ b/simgear/nasal/cppbind/detail/functor_templates.hxx @@ -18,8 +18,16 @@ > Ghost& method(const std::string& name, const SG_GHOST_FUNC_TYPE& func) { -#define SG_GHOST_REQUIRE_ARG(z, n, dummy)\ +#if defined(GCC_VERSION) && GCC_VERSION < 40407 + // The old version of g++ used on Jenkins (16.11.2012) only compiles this + // version. +# define SG_GHOST_REQUIRE_ARG(z, n, dummy)\ + boost::bind(&arg_from_nasal, _2, n) +#else + // VS (2008, 2010, ... ?) only allow this version. +# define SG_GHOST_REQUIRE_ARG(z, n, dummy)\ boost::bind(&Ghost::arg_from_nasal, _2, n) +#endif return method (