forked from boostorg/concept_check
Silence gcc warnings when using UnaryFunction with reference parameters.
[SVN r61152]
This commit is contained in:
@@ -330,7 +330,15 @@ namespace boost
|
||||
{
|
||||
f(arg);
|
||||
}
|
||||
|
||||
|
||||
#if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4))
|
||||
// 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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user