[PATCH] D56622: [Algorithm] Add make_const_ref corresponding to make_const_ptr
Stephen Kelly via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 12 07:27:19 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL351009: [Algorithm] Add make_const_ref corresponding to make_const_ptr (authored by steveire, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56622/new/
https://reviews.llvm.org/D56622
Files:
llvm/trunk/include/llvm/ADT/STLExtras.h
Index: llvm/trunk/include/llvm/ADT/STLExtras.h
===================================================================
--- llvm/trunk/include/llvm/ADT/STLExtras.h
+++ llvm/trunk/include/llvm/ADT/STLExtras.h
@@ -75,6 +75,12 @@
using type =
typename std::add_pointer<typename std::add_const<T>::type>::type;
};
+
+template <typename T> struct make_const_ref {
+ using type = typename std::add_lvalue_reference<
+ typename std::add_const<T>::type>::type;
+};
+
//===----------------------------------------------------------------------===//
// Extra additions to <functional>
//===----------------------------------------------------------------------===//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56622.181442.patch
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190112/2efabece/attachment.bin>
More information about the llvm-commits
mailing list