[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: __attribute__ ((deprecated)) on templates.
From: |
Victor Bogado |
Subject: |
Re: __attribute__ ((deprecated)) on templates. |
Date: |
Fri, 13 May 2011 12:12:25 -0700 (PDT) |
User-agent: |
G2/1.0 |
The bug at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33911 has the
answer, it is a g++ bug but it have a simple work around the version
bellow works as expected :
====
class a
{
public:
template <typename T>
void __attribute__ ((deprecated)) foo(T i);
};
template <typename T>
void a::foo(T i)
{
}
int main(int argc, const char *argv[])
{
a b;
b.foo<int>(2);
return 0;
}
====