[cfe-dev] Explicit instantiation with body?
Larisse Voufo
lvoufo at google.com
Wed Jun 19 09:15:14 PDT 2013
Just out of curiosity, I have noticed that Clang currently allows the
following program:
template<typename T> T f() { return 13; }
template int f() { return 1; }
It essentially parses the body of the explicit instantiation only to ignore
it.
Was this a conscious decision?
GCC 4.6.3 rejects the program with "expected ‘;’ before ‘{’ token".
Thanks,
-- Larisse.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130619/4d85abe8/attachment.html>
More information about the cfe-dev
mailing list