[LLVMbugs] [Bug 8084] New: No namespace awareness of static template fields

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 5 02:48:41 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8084

           Summary: No namespace awareness of static template fields
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: fritzsche at acm.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


> cat foo.cxx
namespace F {
    template <typename A> struct Foo {
        static A *field;
    };
}

using namespace F;
struct Bar : Foo<Bar> {};
template <> Bar* Foo<Bar>::field = 0;


> clang++ -fsyntax-only foo.cxx 
foo.cxx:9:28: error: static data member specialization of 'field' must
originally be declared in namespace 'F'
template <> Bar* Foo<Bar>::field = 0;
                           ^
foo.cxx:3:19: note: explicitly specialized declaration is here
        static A *field;

================================================================
system: Linux 2.6.32-24-generic amd64 Ubuntu 10.04
clang version 2.8 (trunk 113084)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list