[libcxx-commits] [PATCH] D131082: [libcxx] Add _LIBCPP_NODEBUG to std::conditional related typedfs

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 9 09:26:35 PDT 2022


dblaikie updated this revision to Diff 451186.
dblaikie added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131082/new/

https://reviews.llvm.org/D131082

Files:
  libcxx/include/__type_traits/conditional.h


Index: libcxx/include/__type_traits/conditional.h
===================================================================
--- libcxx/include/__type_traits/conditional.h
+++ libcxx/include/__type_traits/conditional.h
@@ -36,17 +36,22 @@
 using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;
 
 template <bool _Bp, class _If, class _Then>
-    struct _LIBCPP_TEMPLATE_VIS conditional {typedef _If type;};
+struct _LIBCPP_TEMPLATE_VIS conditional {
+  _LIBCPP_NODEBUG typedef _If type;
+};
 template <class _If, class _Then>
-    struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;};
+struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {
+  _LIBCPP_NODEBUG typedef _Then type;
+};
 
 #if _LIBCPP_STD_VER > 11
 template <bool _Bp, class _IfRes, class _ElseRes>
-using conditional_t = typename conditional<_Bp, _IfRes, _ElseRes>::type;
+using conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _IfRes, _ElseRes>::type;
 #endif
 
 // Helper so we can use "conditional_t" in all language versions.
-template <bool _Bp, class _If, class _Then> using __conditional_t = typename conditional<_Bp, _If, _Then>::type;
+template <bool _Bp, class _If, class _Then>
+using __conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _If, _Then>::type;
 
 _LIBCPP_END_NAMESPACE_STD
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131082.451186.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220809/38a47d03/attachment.bin>


More information about the libcxx-commits mailing list