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++/50025] [DR 1288] C++0x initialization syntax doesn't work for class members of reference type


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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ville.voutilainen at gmail dot com

--- Comment #14 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
This bug seems to be fixed with the current trunk. Both the example
in the original report and similar examples compile correctly, like

std::string& f() {static std::string s; return s;}
int main()
{
    std::string& ri{f()};
}

and

int& f() {static int i = 42; return i;}


int main()
{
    int& ri{f()};
}

Please close as resolved.


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