Does anyone actually use stream extraction operators?

后端 未结 7 2141
余生分开走
余生分开走 2020-12-25 14:26

I\'ve written tons of operator<<(std::ostream &, const T &) functions -- they\'re incredibly useful.

I\'ve never written an operator

7条回答
  •  星月不相逢
    2020-12-25 15:10

    I think stream extractor operators can be very useful when combined with STL algorithms like std::copy and with the std::istream_iterator class.

    Read this answer to see what I'm talking about.

提交回复
热议问题