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 //===----------------------------------------------------------------------===// 8 9 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR 10 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS 11 12 // raw_storage_iterator associated types 13 14 #include <cstddef> 15 #include <iterator> 16 #include <memory> 17 #include <type_traits> 18 19 #include "test_macros.h" 20 21 struct T; 22 typedef T* OutputIt; 23 typedef std::raw_storage_iterator<OutputIt, T> It; 24 25 static_assert(std::is_same<It::iterator_category, std::output_iterator_tag>::value, ""); 26 static_assert(std::is_same<It::value_type, void>::value, ""); 27 #if TEST_STD_VER > 17 28 static_assert(std::is_same<It::difference_type, std::ptrdiff_t>::value, ""); 29 #else 30 static_assert(std::is_same<It::difference_type, void>::value, ""); 31 #endif 32 static_assert(std::is_same<It::pointer, void>::value, ""); 33 static_assert(std::is_same<It::reference, void>::value, ""); 34