[Bug c++/84403] New: Possible further extension of constexpr: allow to use them as template parameters
bugzilla@poradnik-webmastera.com
gcc-bugzilla@gcc.gnu.org
Thu Feb 15 09:46:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84403
Bug ID: 84403
Summary: Possible further extension of constexpr: allow to use
them as template parameters
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bugzilla@poradnik-webmastera.com
Target Milestone: ---
Values in constexpr functions are known at compile time, so theoretically they
could be used as template parameters like in example below. Please consider
proposing this and implementing for some future version of C++ standard.
#include <type_traits>
constexpr int test(int n)
{
return std::integral_constant<int, n>::value;
}
More information about the Gcc-bugs
mailing list