I write an lambda function:
auto event = [&](Ref* target,ListView::EventType et){
auto cpn = dynamic_cast<ListView*>(target);
auto ic = cpn->getInnerContainer();
auto pos = ic->getPosition();
CCLOG("%s> [%s] et=%d,pos(%g,%g)",__func__,
cpn->getName().c_str(),et,pos.x,pos.y);
};
But compiler(VC2013) returns a compiling error: C2668: ambiguous call to overloaded function.
Why it compiles fail?