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++/79452] Provide builtin to detect compile-time execution


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79452

--- Comment #9 from Eric Fiselier <eric at efcs dot ca> ---
I think it would be nice to be able to dispatch differently depending on being
called at compile time or runtime. However the ability to dispatch on that
condition doesn't have to be usable in "if constexpr". That way we don't run
into any instantiation problems.

If that behavior is desireable enough I think it could be simply implemented as
an invented __ctfe__ function local variable that changes value.

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