https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68074
Bug ID: 68074 Summary: [C++14] Complex ConstExpr Evaluation Product: gcc Version: 5.2.0 URL: http://goo.gl/T7h3Qg Status: UNCONFIRMED Keywords: rejects-valid, wrong-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: arbmind at gmail dot com Target Milestone: --- Please take a look at my constexpr experiment. http://goo.gl/T7h3Qg GCC 5.2.0 and 5.1.0 has multiple issues with this code. It compiles well in all variants on Clang 3.7 and 3.8 snapshots. The goal of the experiment is to implement a multiplication table at compile time. Peter Sommerlad showed it on CppCon 2015. Video https://www.youtube.com/watch?v=DM-RXeiSCmc This implementation makes much more use of constexpr features of C++14. The issues are marked with comment in the code. 1. Currently the code compiles, but prints the strings backwards. Generating the strings at runtime, does not schod this behavior. Clang gets this right as well. 2. The auto generated copy & move operators of carray do behave different. In compile time execution only the first element is handled. Using the class at runtime works well. Clang does the same during compile time. 3. Adding an exception to the string generation triggers a strange compiler error. "sorry, unimplemented: unexpected AST of kind loop_expr" Clang works well. 4. GCC does not allow me to use range based for loops for carray. Clang has no problem with that. Thanks for all the good work. May my experiment help to improve g++.