]> git.mxchange.org Git - simgear.git/blobdiff - simgear/nasal/cppbind/detail/functor_templates.hxx
Make old gcc happy
[simgear.git] / simgear / nasal / cppbind / detail / functor_templates.hxx
index 51bb6c999e3fcefb49cf7c7cae59facfa3d0b5c7..eeb3600acd6a3c85fb682d024a1f64a6a851b55f 100644 (file)
   >
   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<A##n>, _2, n)
+#else
+    // VS (2008, 2010, ... ?) only allow this version.
+# define SG_GHOST_REQUIRE_ARG(z, n, dummy)\
     boost::bind(&Ghost::arg_from_nasal<A##n>, _2, n)
+#endif
 
     return method<Ret>
     (