, , , ++. std::vector<>::push_back ++ 11, , , lvalues rvalues.
, -, §13.4/1 ++ 11 FDIS , , :
, - . . - , , . [. , , ---. -end note]
&. , . [: , , . -end note]
§17.6.5.5/2:
- - , -; , , - ++ .
Therefore, it does not ever carry the address of a standard member function of a library class, since the type of such an expression is, by definition, unrecognizable, with the exception of the implementation by-implementation.
Luke Danton suggested a workaround (in particular, using lambda), I would also recommend:
std::vector<int> vec;
[&](){ vec.push_back(1); }();
source
share