Differences between boost::string_ref and boost::string_view

前端 未结 2 1266
半阙折子戏
半阙折子戏 2021-02-13 21:18

Boost provides two different implementations of string_view, which will be a part of C++17:

  • boost::string_ref in utility/string_ref
2条回答
  •  走了就别回头了
    2021-02-13 22:05

    According to this email from the boost mailing list, boost::string_ref won't be used in the future and is being replaced by string_view in other boost libraries.

    boost::string_view has the following advantages:

    • Better matches what the standards committee is doing for C++17
    • Has WAY more constexpr support

提交回复
热议问题