根据C++标准,您不能将临时对象绑定到非const引用。由于流输出运算符定义为: template <class CharT, class Traits, class Allocator> std::basic_ostream<CharT, Traits>&...