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++/50785] New: [C++0x][constexpr] static constexpr double undefined reference


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

             Bug #: 50785
           Summary: [C++0x][constexpr] static constexpr double undefined
                    reference
    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
             Build: MinGW 4.6.0 20110210; MinGW 4.7.0 20110815


#include <complex>
using namespace std;

struct test
{
    static constexpr double value = 0.0003;
};
int main()
{
    complex<double> x = complex<double>(0,1)*test::value; 
    // D:\Praca\Trash/newmain.cpp:10: undefined reference to `test::value'
}

modyfing line 10 to
complex<double> x = complex<double>(0,1)*(1*test::value);
fix it.


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