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++/52366] New: [c++11] static constexpr function cant initialize static constexpr


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

             Bug #: 52366
           Summary: [c++11] static constexpr function cant initialize
                    static constexpr
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: trashyankes@wp.pl


gcc version 4.7.0 20120203 (experimental) (niXman build)

code:
---------------------------
---------------------------


class A
{
    static constexpr int func() { return 0; }
    static constexpr int i = func(); 
    //^--- error: field initializer is not constant
};


---------------------------
---------------------------


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