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 // UNSUPPORTED: no-localization
10 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // XFAIL: msvc && (clang-16 || clang-17)
12 
13 // Test the libc++ extension that the value stored in `std::ranges::istream_view` has been marked
14 // as _LIBCPP_NO_UNIQUE_ADDRESS
15 
16 #include <istream>
17 #include <ranges>
18 
19 struct Empty {
operator >>(std::istream & i,Empty const &)20   friend std::istream& operator>>(std::istream& i, Empty const&) { return i; }
21 };
22 
23 static_assert(sizeof(std::ranges::istream_view<Empty>) == sizeof(void*));
24 
25