/* Copyright (c) 2005-2021 Intel Corporation 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 http://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. */ #ifndef __TBB_detail__containers_helpers_H #define __TBB_detail__containers_helpers_H #include "_template_helpers.h" #include "_allocator_traits.h" #include #include #include namespace tbb { namespace detail { inline namespace d0 { template struct comp_is_transparent : std::false_type {}; template struct comp_is_transparent> : std::true_type {}; template struct has_transparent_key_equal : std::false_type { using type = KeyEqual; }; template struct has_transparent_key_equal> : std::true_type { using type = typename Hasher::transparent_key_equal; static_assert(comp_is_transparent::value, "Hash::transparent_key_equal::is_transparent is not valid or does not denote a type."); static_assert((std::is_same>::value || std::is_same::value), "KeyEqual is a different type than equal_to or Hash::transparent_key_equal."); }; struct is_iterator_impl { template using iter_traits_category = typename std::iterator_traits::iterator_category; template using input_iter_category = typename std::enable_if>::value>::type; }; // struct is_iterator_impl template using is_input_iterator = supports; #if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT template inline constexpr bool is_input_iterator_v = is_input_iterator::value; #endif } // inline namespace d0 } // namespace detail } // namespace tbb #endif // __TBB_detail__containers_helpers_H