A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../algorithm/../ranges/split_view/deduction_guides.html below:

deduction guides for std::ranges::split_view - cppreference.com

#include <ranges>
#include <string_view>
#include <type_traits>
using std::operator""sv;
 
int main() {
    std::ranges::split_view w1{"a::b::c"sv, "::"sv};
    static_assert(std::is_same_v<
        decltype(w1),
        std::ranges::split_view<std::string_view, std::string_view>>);
 
    std::ranges::split_view w2{"x,y,z"sv, ','};
    static_assert(std::is_same_v<
        decltype(w2),
        std::ranges::split_view<std::string_view, std::ranges::single_view<char>>>);
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4