constexpr Containers and Algorithms

Get an overview of a constexpr container called 'std::vector'.

C++20 has many improvements regarding containers of the Standard Template Library. First of all, std::vector and std::string have constexpr constructors and so can be used at compile time. All containers support consistent container erasure and the associative containers a member function contains. Additionally, std::string allows you to check for a prefix or suffix.

Get hands-on with 1400+ tech skills courses.