Search code examples
c++boostc++14

Does Boost provide an implementation of span for C++14?


std::span was introduced in C++20, but I'm limited to C++14 and, to a lesser extent, to Boost libraries of any version. Is there something similar in Boost?


Solution

  • Does Boost provide an implementation of span for C++14?

    There is no span in the boost namespace. But Boost Beast library has boost::beast::span. It appears to not implement the same interface as std::span exactly, but is an implementation of the same similar idea.

    There is also boost::hana::span which is something else.