Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Variadic template bug?
Variadic template bug? [message #907412] Tue, 04 September 2012 00:20 Go to next message
Michael Spertus is currently offline Michael SpertusFriend
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 #907519 is a reply to message #907412] Tue, 04 September 2012 06:50 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Variadic template bug? [message #912595 is a reply to message #907519] Thu, 13 September 2012 20:30 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Sorry, 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
Re: Variadic template bug? [message #912849 is a reply to message #912595] Fri, 14 September 2012 09:30 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Michael Spertus wrote on Thu, 13 September 2012 22:30
Sorry, 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 #913102 is a reply to message #912849] Fri, 14 September 2012 19:27 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Thanks for responding, Axel
Axel Mueller wrote on Fri, 14 September 2012 05:30

There was a change in the discovery configuration jor the Juno release. You have to go to Project Properties->C/C++ General_>Preprocessor Include...

When I go to Project Properties->C/C++ General_>Preprocessor Include Path, Macros, etc., I don't see any place to add compiler options like "-std=c++0x" What am I missing?

Thanks,

Mike
Re: Variadic template bug? [message #913115 is a reply to message #913102] Fri, 14 September 2012 20:10 Go to previous messageGo to next message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Quote:
What am I missing?


The forum search function?

http://www.eclipse.org/forums/index.php/t/373462/

Btw: This setting is hidden... Crying or Very Sad

regards,
klaus


Re: Variadic template bug? [message #913171 is a reply to message #913115] Fri, 14 September 2012 23:03 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Thanks, Klaus, that was useful and made some of my C++0x scanning work better, but it still doesn't solve the original problem I first posted on. Does that code display without an error marker in CDT for anyone?
Klaus Mr wrote on Fri, 14 September 2012 16:10
Quote:
What am I missing?


The forum search function?

http://www.eclipse.org/forums/index.php/t/373462/

Btw: This setting is hidden... Crying or Very Sad

regards,
klaus

[Updated on: Fri, 14 September 2012 23:04]

Report message to a moderator

Re: Variadic template bug? [message #913286 is a reply to message #913171] Sat, 15 September 2012 06:53 Go to previous messageGo to next message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Hi,

very likely you see false errors from Codan. Sad

http://www.eclipse.org/forums/index.php/t/274600/

regards,
Klaus



Re: Variadic template bug? [message #913457 is a reply to message #913286] Sat, 15 September 2012 18:06 Go to previous messageGo to next message
Michael Spertus is currently offline Michael SpertusFriend
Messages: 78
Registered: July 2009
Member
Thanks, Klaus. Should I submit a bug? I didn't see it any of the codan bugs (maybe I missed something, though)
Re: Variadic template bug? [message #915515 is a reply to message #913457] Mon, 17 September 2012 12:53 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Michael Spertus wrote on Sat, 15 September 2012 20:06
Thanks, 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
Previous Topic:&quot;Unresolved inclusion: &lt;stdio.h&gt;&quot;
Next Topic:wrench icon decoration "stuck" on some resources
Goto Forum:
  


Current Time: Tue Mar 19 04:25:59 GMT 2024

Powered by FUDForum. Page generated in 0.02498 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top