LLVM  16.0.0git
STLForwardCompat.h
Go to the documentation of this file.
1 //===- STLForwardCompat.h - Library features from future STLs ------C++ -*-===//
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 /// \file
10 /// This file contains library features backported from future STL versions.
11 ///
12 /// These should be replaced with their STL counterparts as the C++ version LLVM
13 /// is compiled with is updated.
14 ///
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_ADT_STLFORWARDCOMPAT_H
18 #define LLVM_ADT_STLFORWARDCOMPAT_H
19 
20 #include <type_traits>
21 
22 namespace llvm {
23 
24 //===----------------------------------------------------------------------===//
25 // Features from C++20
26 //===----------------------------------------------------------------------===//
27 
28 template <typename T>
29 struct remove_cvref // NOLINT(readability-identifier-naming)
30 {
31  using type = std::remove_cv_t<std::remove_reference_t<T>>;
32 };
33 
34 template <typename T>
35 using remove_cvref_t // NOLINT(readability-identifier-naming)
37 
38 } // namespace llvm
39 
40 #endif // LLVM_ADT_STLFORWARDCOMPAT_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::remove_cvref
Definition: STLForwardCompat.h:29
remove_cvref_t
llvm::remove_cvref::type
std::remove_cv_t< std::remove_reference_t< T > > type
Definition: STLForwardCompat.h:31