/* This file is part of Fennix Kernel. Fennix Kernel is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Fennix Kernel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Fennix Kernel. If not, see . */ #pragma once #include #include namespace std { typedef basic_string_view string_view; typedef basic_string_view wstring_view; typedef basic_string_view u8string_view; typedef basic_string_view u16string_view; typedef basic_string_view u32string_view; template std::basic_ostream &operator<<(std::basic_ostream &os, std::basic_string_view v) { os.write(v.data(), v.size()); return os; } constexpr std::string_view operator""sv(const char *str, std::size_t len) noexcept { return std::string_view{str, len}; } constexpr std::u8string_view operator""sv(const char8_t *str, std::size_t len) noexcept { return std::u8string_view{str, len}; } constexpr std::u16string_view operator""sv(const char16_t *str, std::size_t len) noexcept { return std::u16string_view{str, len}; } constexpr std::u32string_view operator""sv(const char32_t *str, std::size_t len) noexcept { return std::u32string_view{str, len}; } constexpr std::wstring_view operator""sv(const wchar_t *str, std::size_t len) noexcept { return std::wstring_view{str, len}; } }