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++/58187] New: Initialization of a non-static data member using a template argument doesn't work when the template is inside of another class


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.

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