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: bugzi...@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;
}

Reply via email to