Files
Allen Winter 52611ec317 Standardize project to KDAB copyright policy
For individual files: use year of file creation
For entire project:
  remove year from the statement
  use the © where feasible

reference:
https://matija.suklje.name/how-and-why-to-properly-write-copyright-statements-in-your-code
2024-01-19 15:51:29 -05:00

36 lines
867 B
C++

/*
This file is part of KDToolBox.
SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
Author: Marc Mutz <marc.mutz@kdab.com>
SPDX-License-Identifier: MIT
*/
#pragma once
#include <vector>
#include <k20/detail/erase_if.h>
// 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 Value, typename... Args>
typename std::vector<Args...>::size_type erase(std::vector<Args...> &c, const Value &value)
{
return detail::seq_erase(c, value);
}
template<typename UnaryPredicate, typename... Args>
typename std::vector<Args...>::size_type erase_if(std::vector<Args...> &c, UnaryPredicate pred)
{
return detail::seq_erase_if(c, pred);
}
#endif
} // namespace k20