- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
as you know, lambda function in C++ could be captured by 2 options:
1) auto keyword
2) function object such as following:
f2;
^
Would you tell me why? and how to fix this problem?
Thanks!
-Yuan
as you know, lambda function in C++ could be captured by 2 options:
1) auto keyword
2) function object such as following:
#includefunction
using namespace std; functionf2 = [] (int x, int y) { return x + y; };
But when I compile this code with icc-12(beta), it will complain:
tb_pochoir.hpp(62): error: function is not a template
^
Would you tell me why? and how to fix this problem?
Thanks!
-Yuan
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which version of Visual Studio* are you using? The problem might be in the Microsoft STL support. This works for me with the Intel compiler integrated with Visual Studio 2010*.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brandon,
I'm using icc-12 (beta) version under linux. So, there's no visual studio. Just icc.
Would you give me some idea how to fix this problem?
Thanks!
-(\x.x x) (\x.x x)
I'm using icc-12 (beta) version under linux. So, there's no visual studio. Just icc.
Would you give me some idea how to fix this problem?
Thanks!
-(\x.x x) (\x.x x)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Yuan,
We don't support variadic templates yet in the compiler. I've linked this thread to an open request for that support, and when I have any more news, I will update this thread. Unfortunately, there's no workarounds at this point to get this to work without that support.
We don't support variadic templates yet in the compiler. I've linked this thread to an open request for that support, and when I have any more news, I will update this thread. Unfortunately, there's no workarounds at this point to get this to work without that support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just created a knowledge base article on this issue at http://software.intel.com/en-us/articles/some-gcc-headers-will-not-compile-due-to-use-of-c0x-variadic-templates/.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem is resolved in the version 12.1 compiler available in Intel C++ Composer XE 2011 update 6 and above.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page