标签: c++ std
查看C ++代码时,有时我会看到使用::std::ostream而不是std::ostream
::std::ostream
std::ostream
需要额外的两个::?
::
::std::ostream使用::std::ostream& operator<<(::std::ostream& os, const Bar& bar) { return os << bar.DebugString(); // whatever needed to print bar to os } 的示例:
::std::ostream& operator<<(::std::ostream& os, const Bar& bar) { return os << bar.DebugString(); // whatever needed to print bar to os }
{{1}}