Overloading istream_iterator -― cannot bind lvalue to ‘std::basic_istream<char>&&’
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've done some reseach like: Overloading operator<<: cannot bind lvalue to ‘std::basic_ostream&&’ Overloading operator<<: cannot bind ‘std::basic_ostream’ lvalue to ‘std::basic_ostream&&’ error: cannot bind ‘std::basic_ostream’ lvalue to ‘std::basic_ostream&&’ Tell me if I misunderstood some. I was trying to input std::pair from a file and I wanted to use std::istream_iterator > Here comes the code: std :: ifstream in ( "file.in" ); std :: map < int , int > pp ; pp . insert (( std :: istream_iterator < std :: pair < int , int > >(