| Variadic template bug? [message #907412] |
Mon, 03 September 2012 20:20  |
Michael Spertus Messages: 78 Registered: July 2009 |
Member |
|
|
The following code builds without warnings on g++ -std=c++0x but CDT says "symbol bar could not be resolved." Bug?
#include <iostream>
using namespace std;
void f(int i) {
cout << "foo" << i << endl;
}
template<typename... T>
struct Foo
{
template<void(*fp)(T...)>
static void bar(T... t) { fp(t...); }
};
int main()
{
Foo<int>::bar<f>(3);
return 0;
}
|
|
|
|
|
| Re: Variadic template bug? [message #912849 is a reply to message #912595] |
Fri, 14 September 2012 05:30   |
Axel Mueller Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
Michael Spertus wrote on Thu, 13 September 2012 22:30Sorry, that doesn't help.
Changing Open Project Properties->C/C++ Build ->Settings->Tool Settings->GCC C++ Compiler->Miscellaneous->Other Flags to -std=c++0x doesn't affect anything.
I couldn't find a "compiler invocation arguments" field in "Project Properties->C/C++ Build ->discovery Options"
Any ideas?
Thanks,
Mike
There was a change in the discovery configuration jor the Juno release. You have to go to Project Properties->C/C++ General_>Preprocessor Include...
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
|
|
|
|
|
| Re: Variadic template bug? [message #915515 is a reply to message #913457] |
Mon, 17 September 2012 08:53  |
Axel Mueller Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
Michael Spertus wrote on Sat, 15 September 2012 20:06Thanks, Klaus. Should I submit a bug? I didn't see it any of the codan bugs (maybe I missed something, though)
Variadic templates should be supported by CDT. Did you rebuild the index after the changing the compiler settings?
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
Powered by
FUDForum. Page generated in 0.01817 seconds