7 Mar
2013
7 Mar
'13
8:38 a.m.
On 3/7/2013 9:00 AM, Igor R wrote:
thx, I got a simpeler case without Boost.Function:
struct Bla { template <typename T> Bla(T t){ t; } };
void Test() { std::identity<int> id;
Bla(id); //<- }
From curiosity (and not a Boost.Function question anymore), which c++ rule kicks on to treat as a declaration?
Most vexing parse: http://en.wikipedia.org/wiki/Most_vexing_parse
Thx, I was aware of Scott Meyers item (stumbled upon that already in the past), but here it can't be seen as a function since 'id' is not a type but a variable. The compiler also see 'id' not as a function but as a variable declaration of 'Bla'. Is that because u can also declare a variable like this: int (i) = 0; and why is that allowed?