- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
In the newest distribution of tbb, in the config file one sees the macro
__TBB_CPP11_STD_FORWARD_BROKEN.
In my setup ( intel c++ 12.1 compiler for 64 bit windows, plugged to msvc2010 ) this seems to resolve to true.
As I have written a couple of functions using std::forward and they seemed to work fine, I suspect that this must refer to certain
pitfalls (?) of the feature( o/wise, I would expect a macro saying something like ...HAVE_STD_FORWARD ).
Of course there is a chance that the config file has a problem, but leaving this aside for the moment, what is the situation with std::forward ?
Is it indeed broken? If yes, is there some documentation as to how ? Should it be avoided ? Does it affect the stl when using the C++0x flag ?
Has it been fixed at a later distribution?
Thank you in advance for your help,
Petros
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
std::forward is not referred there as a feature to be supported or not. Its basis (rvalue reference) is supported.
There should be no need for an example to inform me in what way intel considers it "broken". As I said, I have used it and noticed nothing broken.
But you know how template coding is. Maybe somewhere else the problem would surface.
The reason I am asking is that as a result I cannot use the argument forwarding constructors.
Thank you for your help,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey,
Referring to the one (for windows) at page:
June 24, 2013: Intel® TBB 4.1 update 4 released
off the main page i.e.
http://threadingbuildingblocks.org/download
Thank you for your help,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
Thank you for the summary. However if you go into the <utility> file of msvc2010 you will see that forward exists (LN 77 is the definition following the #if _HAS_CPP0X at line 22).
Why does intel say that forward is broken when rvalue reference is supported ( and I know because I have used it ) ?
Is there a problem with the compiler ? If yes, is it documented and where ?
Thank you for your help,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: I will also take this to the tbb forum, since apparently other things seem problematic as well.However from the compiler forum I would like a definite answer to my last question.
Thank you, Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello Petros,
I've checked TBB unit tests and they works with std::forward now and we do not expect any pitfalls there at least for tbb code.
Intel TBB team will re-evaluate this particular condition.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Thank you for your response.
I am still not sure if the forward is broken at the compiler level in any way.
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
to be clear: the current tbb_config file will not allow for std::forard on msvc10's stl and with icl 12.1.
So when you say that the tests were passed you either mean
a) on an internal (bleading edge) version of tbb
or
b) on linux (gcc?) system.
Which one do you mean ?
Thank you for your help and apologies if being pedantic,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've unconditionaly set __TBB_CPP11_STD_FORWARD_BROKEN to 0 in tbb_config file and run tests on the latest TBB open source release. I've used the update 4 of Composer XE 2013 and the latest update on visual studio 2012 (update 1, I believe).
And as I wrote before we need to check on several versions of compilers across windows, linux and OS X to set right condition there (if it still needed). It will take time.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
I understand. Thank you very much!
Petros
ps: there will also need to change the variadic templates clauses. Btw the __VARIADIC_TEMPLATES macro, wht is it ? Is it icl internal ? is it gcc-specific? Thank you again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
I understand. Thank you very much!
Petros
ps: there will also need to change the variadic templates clauses. Btw the __VARIADIC_TEMPLATES macro, wht is it ? Is it icl internal ? is it gcc-specific? Thank you again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
THank you,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
I did check the source code and am still in darkness as to where the __VARIADIC_TEMPLATES macro is defined.How it is used I can tell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One would expect that if the variadic templates and the rvalue references are supported the line :
{ ::new((void *)p) U(std::forward<Args>(args)...); }
( from the tbb scalable_allocator ) would not give the error :
1>C:\_petros\_otc\src\otc\libBuffer\allocators.h(72): error : expected a ")"
1> { ::new((void *)p) U(std::forward<Args>(args)...); }
1> ^
What is happening ?
(icl 12.1, sin7 64bit, msvc2010, C++0x flag on!)

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