// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BASE_TEMPLATE_UTIL_H_ #define THIRD_PARTY_BASE_TEMPLATE_UTIL_H_ #include #include #include #include #include #include "build/build_config.h" namespace pdfium { template struct is_non_const_reference : std::false_type {}; template struct is_non_const_reference : std::true_type {}; template struct is_non_const_reference : std::false_type {}; namespace internal { // Uses expression SFINAE to detect whether using operator<< would work. template struct SupportsOstreamOperator : std::false_type {}; template struct SupportsOstreamOperator() << std::declval()))> : std::true_type {}; // Used to detech whether the given type is an iterator. This is normally used // with std::enable_if to provide disambiguation for functions that take // templatzed iterators as input. template struct is_iterator : std::false_type {}; template struct is_iterator< T, std::void_t::iterator_category>> : std::true_type {}; } // namespace internal } // namespace pdfium #endif // THIRD_PARTY_BASE_TEMPLATE_UTIL_H_