Why don't the std::fstream classes take a std::string?

后端 未结 10 800
花落未央
花落未央 2020-11-28 07:25

This isn\'t a design question, really, though it may seem like it. (Well, okay, it\'s kind of a design question). What I\'m wondering is why the C++ std::fstream

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 07:50

    Maybe it's a consolation: all fstream's have gotten an open(string const &, ...) next to the open(char const *, ...) in the working draft of the C++0x standard. (see e.g. 27.8.1.6 for the basic_ifstream declaration)

    So when it gets finalised and implemented, it won't get you anymore :)

提交回复
热议问题