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++/53473] New: [C++11] static constexpr noexcept cannot be specialized


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53473

             Bug #: 53473
           Summary: [C++11] static constexpr noexcept cannot be
                    specialized
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kretz@kde.org


The following testcase does not compile.

template<typename T> struct A
{
    static constexpr T foo() noexcept { return 0; }
};

template<> constexpr int A<int>::foo() noexcept { return 0; }

This would be a common pattern to specialize functions of std::numeric_limits,
but it's currently only possible to specialize the whole numeric_limits class.


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