This is the mail archive of the gcc-patches@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] |
This patch implements the C++17 constexpr if feature. The primary use is in templates, where the non-taken branch of the constexpr if-statement is not instantiated. But it can also be used outside of templates, where the branches are parsed and discarded, and discarded return statements are not used for return type deduction. constexpr if is also active with a pedwarn in C++11 and C++14. Tested x86_64-pc-linux-gnu, applying to trunk.
Attachment:
cx-if.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |