[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
__attribute__ ((deprecated)) on templates.
From: |
Victor Bogado |
Subject: |
__attribute__ ((deprecated)) on templates. |
Date: |
Fri, 13 May 2011 11:59:49 -0700 (PDT) |
User-agent: |
G2/1.0 |
I tried the following with both gcc 4.1.2 and 4.6 and in both cases it
compiled without warnings. :-( How can I deprecate a template method?
====
class a
{
public:
template <typename T>
void foo(T i) __attribute__ ((deprecated));
};
template <typename T>
void a::foo(T i)
{
}
int main(int argc, const char *argv[])
{
a b;
b.foo<int>(2);
return 0;
}
=====
- __attribute__ ((deprecated)) on templates.,
Victor Bogado <=