From 10d0be013e7af39878615ae6c8eed05111710a06 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 27 Jun 2014 01:44:04 +0200 Subject: [PATCH] =?utf8?q?fix=20g++=204.4:=20"warning:=20suggest=20parenth?= =?utf8?q?eses=20around=20=E2=80=98&&=E2=80=99=20within=20=E2=80=98||?= =?utf8?q?=E2=80=99"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Warning does not make sense, but the old g++ complains... --- simgear/nasal/cppbind/detail/nasal_traits.hxx | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/simgear/nasal/cppbind/detail/nasal_traits.hxx b/simgear/nasal/cppbind/detail/nasal_traits.hxx index f3126918..73306936 100644 --- a/simgear/nasal/cppbind/detail/nasal_traits.hxx +++ b/simgear/nasal/cppbind/detail/nasal_traits.hxx @@ -20,6 +20,7 @@ #ifndef SG_NASAL_TRAITS_HXX_ #define SG_NASAL_TRAITS_HXX_ +#include #include #include #include @@ -157,9 +158,14 @@ SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) } template static - typename boost::enable_if_c< - boost::is_same::value - || (boost::is_same::value && supports_weak_ref::value), + typename boost::enable_if< + boost::mpl::or_< + boost::is_same, + boost::mpl::and_< + boost::is_same, + supports_weak_ref + > + >, U >::type get(storage_type* ptr) @@ -168,9 +174,11 @@ SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) } template static - typename boost::enable_if_c< - boost::is_same::value - && !supports_weak_ref::value, + typename boost::enable_if< + boost::mpl::and_< + boost::is_same, + boost::mpl::not_ > + >, U >::type get(storage_type* ptr) @@ -201,9 +209,14 @@ SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) } template static - typename boost::enable_if_c< - boost::is_same::value - || (boost::is_same::value && supports_weak_ref::value), + typename boost::enable_if< + boost::mpl::or_< + boost::is_same, + boost::mpl::and_< + boost::is_same, + supports_weak_ref + > + >, U >::type get(storage_type* ptr) @@ -212,9 +225,11 @@ SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) } template static - typename boost::enable_if_c< - boost::is_same::value - && !supports_weak_ref::value, + typename boost::enable_if< + boost::mpl::and_< + boost::is_same, + boost::mpl::not_ > + >, U >::type get(storage_type* ptr) -- 2.39.5