This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60245] Template static function not accepted as constexpr parameter
- From: "florent.hivert at lri dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Feb 2014 17:10:08 +0000
- Subject: [Bug c++/60245] Template static function not accepted as constexpr parameter
- Auto-submitted: auto-generated
- References: <bug-60245-4 at http dot gcc dot gnu dot org/bugzilla/>
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.