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.

Reply via email to