Community
cancel
Showing results for 
Search instead for 
Did you mean: 
max-divulskiy
Beginner
127 Views

c++ 0x and Lambda functions extension

Good afternoon.

Tell me please when will be a possibility to use template lambda function in Intel compiler?
0 Kudos
6 Replies
Judith_W_Intel
Employee
127 Views

Can you point to a document on this extension please? Not sure what you're referring to...

thanks
Judy
max-divulskiy
Beginner
127 Views

If it is possible to write lambda function why it is impossible to write a template lambda function?

Unfortunately it while is not present, but hands and ask to write template =)

Whether it is necessary to expect such extension in the near future?
Judith_W_Intel
Employee
127 Views

One already can use template arguments from the outer function toa lambda function. Can you show
an example of what you're trying to do? Sincelambdas are not really functions, i.e. they can only becalled from oneplace(at the point of the definition) what would be the purposein makingthem templates?

Anywaythis is really a question for the C++ standards committee. Intel has implemented what's described in the C++0x standard.
max-divulskiy
Beginner
127 Views

I mean something that =)

[bash]template
Type lambdaSum = [&](Type x, Type y)
{
    return x + y;
};[/bash]
Judith_W_Intel
Employee
127 Views


Thisdoesn't look like a lambda since lambdas don't have names and can't be "called" like a function. This looks more like a template function that's trying to use lambda syntax for the parameter types.

Judy
max-divulskiy
Beginner
127 Views

Thanks for answers.
Reply