This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60245] Template static function not accepted as constexpr parameter


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]