This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52966] ill-formed template constexpr functions are accepted?
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 May 2016 03:07:57 +0000
- Subject: [Bug c++/52966] ill-formed template constexpr functions are accepted?
- Auto-submitted: auto-generated
- References: <bug-52966-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52966
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |msebor at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The test case is valid because function two doesn't violate any of the
requirements on constexpr functions. In particular, there is no requirement
that a constexpr function definition must not refer to symbols or make calls to
functions that are not declared constexpr. Such a requirement only applies
when a constexpr function is invoked in a context where a /core constant
expression/ is required. An invocation of the constexpr function in such a
context is not a core constant expression.