/* This file is part of KDToolBox. SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company Author: Marc Mutz SPDX-License-Identifier: MIT */ #pragma once #include #include // like std::erase/_if namespace k20 { #if defined(__cpp_lib_erase_if) && _cpp_lib_erase_if >= 202002L // the version that returns size_type using std::erase; using std::erase_if; #else template typename std::basic_string::size_type erase(std::basic_string &c, const Value &value) { return detail::seq_erase(c, value); } template typename std::basic_string::size_type erase_if(std::basic_string &c, UnaryPredicate pred) { return detail::seq_erase_if(c, pred); } #endif } // namespace k20