1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <iterator>
11
12// template<class T>
13// struct iterator_traits<const T*>
14
15#include <iterator>
16#include <type_traits>
17
18struct A {};
19
20int main()
21{
22    typedef std::iterator_traits<volatile A*> It;
23    static_assert((std::is_same<It::difference_type, std::ptrdiff_t>::value), "");
24    static_assert((std::is_same<It::value_type, A>::value), "");
25    static_assert((std::is_same<It::pointer, volatile A*>::value), "");
26    static_assert((std::is_same<It::reference, volatile A&>::value), "");
27    static_assert((std::is_same<It::iterator_category, std::random_access_iterator_tag>::value), "");
28}
29