[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / libcxx / test / support / indirectly_readable.h
blobad32e75e038b7c351d7c544ce7e65ba7813e7b57
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 #ifndef LIBCXX_TEST_SUPPORT_INDIRECTLY_READABLE_H
10 #define LIBCXX_TEST_SUPPORT_INDIRECTLY_READABLE_H
12 #include <type_traits>
14 template <class Token>
15 struct Common { };
17 template <class Token>
18 struct T1 : Common<Token> { };
20 template <class Token>
21 struct T2 : Common<Token> { };
23 template <template <class> class T1Qual, template <class> class T2Qual, class Token>
24 struct std::basic_common_reference<T1<Token>, T2<Token>, T1Qual, T2Qual> {
25 using type = Common<Token>;
27 template <template <class> class T2Qual, template <class> class T1Qual, class Token>
28 struct std::basic_common_reference<T2<Token>, T1<Token>, T2Qual, T1Qual>
29 : std::basic_common_reference<T1<Token>, T2<Token>, T1Qual, T2Qual>
30 { };
32 template <class Token>
33 struct IndirectlyReadable {
34 using value_type = T1<Token>;
35 T2<Token>& operator*() const;
38 #endif // LIBCXX_TEST_SUPPORT_INDIRECTLY_READABLE_H