/* Copyright 2022, Contributors To LensorOS.
 * All rights reserved.
 *
 * This file is part of LensorOS.
 *
 * LensorOS 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.
 *
 * LensorOS 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 LensorOS. If not, see <https://www.gnu.org/licenses
 */

/// =======================================================================
///  Non-standard extensions to the C++ standard library.
/// =======================================================================

#ifndef _LENSOROS_EXTENSIONS
#define _LENSOROS_EXTENSIONS

#include <algorithm>
#include <bits/colours.h>
#include <vector>

#include <extensions_double_ended_queue>
#include <extensions_ring_buffer>
#include <extensions_sparse_vector>

namespace std {
template <typename _Container, typename _Predicate>
constexpr auto find_if(_Container&& c, _Predicate pred) {
    return find_if(c.begin(), c.end(), pred);
}

template <typename _Container, typename _El>
constexpr auto find(_Container&& container, _El&& el) {
    return find(container.begin(), container.end(), std::forward<_El>(el));
}

} // namespace std

#endif // _LENSOROS_EXTENSIONS
