[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
[llvm-project.git] / libcxx / test / std / iterators / iterator.primitives / iterator.traits / volatile_pointer.pass.cpp
blob6ae502e8c8605e32e1144234524b651268d17431
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <iterator>
11 // template<class T>
12 // struct iterator_traits<const T*>
14 #include <iterator>
15 #include <cstddef>
16 #include <type_traits>
18 #include "test_macros.h"
20 struct A {};
22 int main(int, char**)
24 typedef std::iterator_traits<volatile A*> It;
25 static_assert((std::is_same<It::difference_type, std::ptrdiff_t>::value), "");
26 static_assert((std::is_same<It::value_type, A>::value), "");
27 static_assert((std::is_same<It::pointer, volatile A*>::value), "");
28 static_assert((std::is_same<It::reference, volatile A&>::value), "");
29 static_assert((std::is_same<It::iterator_category, std::random_access_iterator_tag>::value), "");
30 #if TEST_STD_VER > 17
31 ASSERT_SAME_TYPE(It::iterator_concept, std::contiguous_iterator_tag);
32 #endif
33 return 0;