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++/47396] Link error when declare a constant reference to a class or struct static const member!


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

ChenYongqiang <aishen944 at 163 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |

--- Comment #2 from ChenYongqiang <aishen944 at 163 dot com> 2011-01-21 13:45:37 UTC ---
but like this:

struct test
{
    static const int i = 0;
};

int main(void)
{
    const unsigned int &m = test::i;
}


no link errors!!!! why???


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