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++/52966] ill-formed template constexpr functions are accepted?


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.

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