// Copyright 2017 Elias Kosunen // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // This file is a part of scnlib: // https://github.com/eliaskosunen/scnlib // // The contents of this file are adapted from NanoRange. // https://github.com/tcbrindle/NanoRange // Copyright (c) 2018 Tristan Brindle // Distributed under the Boost Software License, Version 1.0 #ifndef SCN_RANGES_UTIL_H #define SCN_RANGES_UTIL_H #include "../util/meta.h" namespace scn { SCN_BEGIN_NAMESPACE namespace custom_ranges { namespace detail { template using priority_tag = ::scn::detail::priority_tag; template using void_t = ::scn::detail::void_t; template using static_const = ::scn::detail::static_const; template using remove_cvref_t = ::scn::detail::remove_cvref_t; template constexpr typename std::decay::type decay_copy(T&& t) noexcept( noexcept(static_cast::type>(SCN_FWD(t)))) { return SCN_FWD(t); } struct nonesuch { nonesuch() = delete; nonesuch(nonesuch const&) = delete; nonesuch& operator=(const nonesuch&) = delete; ~nonesuch() = delete; }; template class Trait, typename... Args> struct test { using type = nonesuch; }; template