This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58187] New: Initialization of a non-static data member using a template argument doesn't work when the template is inside of another class
- From: "dragonroot at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Aug 2013 11:19:54 +0000
- Subject: [Bug c++/58187] New: Initialization of a non-static data member using a template argument doesn't work when the template is inside of another class
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58187
Bug ID: 58187
Summary: Initialization of a non-static data member using a
template argument doesn't work when the template is
inside of another class
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dragonroot at gmail dot com
The following does not compile:
============== test.cc =====================
struct Bar
{
template< unsigned v >
struct Foo
{
unsigned value = v;
};
};
============================================
$ g++-4.8 -c -std=c++11 test.cc
test.cc:6:22: error: âvâ was not declared in this scope
unsigned value = v;
^
$ g++-4.8 --version
g++-4.8 (Debian 4.8.1-9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.