[cfe-dev] Clang: template functions
Stefano S
kindoblue at gmail.com
Fri Nov 5 03:53:03 PDT 2010
Hi,
For the first time I built llvm + clang on ubuntu box for giving it a try.
I have this simple template function in a header file
template <typename T, typename U>
inline void SetMin(T &aVar,U aValue);
but clang++ returns
../src/myfile.h:13:1: error: unknown type name 'template'
template <typename T, typename U>
^
../src/myfile.h:13:10: error: expected identifier or '('
template <typename T, typename U>
I tried to use also -std=gnu89 because I've read gcc (which compiles my
code) uses that standard by default, but with no success.
I am using:
clang version 2.9 (trunk 118246)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Thanks
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101105/505a535b/attachment.html>
More information about the cfe-dev
mailing list