Merged revisions 61152,61185 via svnmerge from

https://svn.boost.org/svn/boost/trunk

........
  r61152 | jhunold | 2010-04-09 11:04:51 +0200 (Fr, 09 Apr 2010) | 2 lines
  
  Silence gcc warnings when using UnaryFunction with reference parameters.
........
  r61185 | jhunold | 2010-04-10 19:50:26 +0200 (Sa, 10 Apr 2010) | 2 lines
  
  Dummy-Constructor only for gcc > 4.
........


[SVN r61205]
This commit is contained in:
Jürgen Hunold
2010-04-11 15:52:27 +00:00
parent 1f226e2dc9
commit def441d02d

View File

@@ -330,7 +330,16 @@ namespace boost
{
f(arg);
}
#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
&& BOOST_WORKAROUND(__GNUC__, > 3)))
// Declare a dummy construktor to make gcc happy.
// It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
// (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg"
// in class without a constructor [-Wuninitialized])
UnaryFunction();
#endif
Func f;
Arg arg;
};