1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
5 #ifndef OPENCV_DNN_SRC_CUDA4DNN_CXX_UTILS_IS_ITERATOR_HPP
6 #define OPENCV_DNN_SRC_CUDA4DNN_CXX_UTILS_IS_ITERATOR_HPP
11 namespace cv { namespace dnn { namespace cuda4dnn { namespace cxx_utils {
14 template <class T, class Tag, class = void>
15 struct is_iterator_helper : std::false_type {};
17 template <class T, class Tag>
18 struct is_iterator_helper<T, Tag,
19 typename std::enable_if<std::is_base_of<Tag, typename std::iterator_traits<T>::iterator_category>::value, void>::type
20 > : std::true_type {};
24 using is_iterator = typename detail::is_iterator_helper<T, std::input_iterator_tag>;
27 using is_forward_iterator = typename detail::is_iterator_helper<T, std::forward_iterator_tag>;
29 }}}} /* namespace cv::dnn::cuda4dnn::csl::cxx_utils */
31 #endif /* OPENCV_DNN_SRC_CUDA4DNN_CXX_UTILS_IS_ITERATOR_HPP */