[Bug c++/60245] Template static function not accepted as constexpr parameter
florent.hivert at lri dot fr
gcc-bugzilla@gcc.gnu.org
Mon Feb 17 17:10:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60245
--- Comment #2 from Florent Hivert <florent.hivert at lri dot fr> ---
Sorry ! The version I submitted is not the most reduced. Here is a version not
using vectors:
constexpr int Apply(const int in, int (*f)(const int&)) { return f(in); }
using Foo = int;
static constexpr int id(const Foo& i) { return i; }
static constexpr int results1 = Apply(0, &id);
Note: Replacing the Foo by int in the definition of id makes the problem
vanish.
More information about the Gcc-bugs
mailing list