[cfe-users] compiler bug or language feature?
Daniel Schwalbe
dansch491 at gmail.com
Tue Oct 8 08:36:01 PDT 2013
Hi,
I don't know if I encountered a compiler bug in clang 3.3 or if this is
one of the many subtle c++ exceptional cases:
When I try to compile the attached file (using: clang++ -std=c++11
test.cpp) I receive a compiler error:
"test.cpp:15:42: error: identifier 'SmartPtrType' in object destruction
expression does not name a type
~SmartUnion() {m_sptr.SmartPtrType<T>::~SmartPtrType(); }"
g++ compiles the file without problem.
clang compiles it, too, if I explicitly introduce a typedef for
SmartPtrType<T> and call this typedef name instead:
typedef SmartPtrType<T> smartptr_type;
~SmartUnion() {m_sptr.smartptr_type::~smartptr_type(); }
Is this a subtle language feature or a compiler bug?
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20131008/828065f1/attachment.cpp>
More information about the cfe-users
mailing list