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++/51157] New: decltype/typeof of template member with default template argument confuses g++


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

             Bug #: 51157
           Summary: decltype/typeof of template member with default
                    template argument confuses g++
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: joerg.richter@pdv-fs.de


cat > t.cc << EOF
struct Key
{
    typedef int Ser;
};
template <class S>
struct Shell
{
    template<class T = Key>
    typename T::Ser getId() const;
};
void func()
{
  decltype(&Shell<int>::getId) a;
}
EOF

g++ -std=gnu++0x -c t.cc

# results in:
# '
# t.cc:13: confused by earlier errors, bailing out

# GCC version 4.6.2


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