[libcxx-commits] [libcxx] 6d751c4 - [libc++] [ranges] Use "inline constexpr bool" not "constexpr bool" for helpers.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 28 15:53:14 PST 2022


Author: Arthur O'Dwyer
Date: 2022-02-28T18:52:54-05:00
New Revision: 6d751c410d6f5400c2c26d47e5033679fbd736d6

URL: https://github.com/llvm/llvm-project/commit/6d751c410d6f5400c2c26d47e5033679fbd736d6
DIFF: https://github.com/llvm/llvm-project/commit/6d751c410d6f5400c2c26d47e5033679fbd736d6.diff

LOG: [libc++] [ranges] Use "inline constexpr bool" not "constexpr bool" for helpers.

Reviewed as part of D118616.

Added: 
    

Modified: 
    libcxx/include/__ranges/reverse_view.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h
index 0d4f3d9dfff7b..9c736ea9bc7dc 100644
--- a/libcxx/include/__ranges/reverse_view.h
+++ b/libcxx/include/__ranges/reverse_view.h
@@ -112,22 +112,22 @@ namespace ranges {
   namespace views {
   namespace __reverse {
     template<class _Tp>
-    constexpr bool __is_reverse_view = false;
+    inline constexpr bool __is_reverse_view = false;
 
     template<class _Tp>
-    constexpr bool __is_reverse_view<reverse_view<_Tp>> = true;
+    inline constexpr bool __is_reverse_view<reverse_view<_Tp>> = true;
 
     template<class _Tp>
-    constexpr bool __is_sized_reverse_subrange = false;
+    inline constexpr bool __is_sized_reverse_subrange = false;
 
     template<class _Iter>
-    constexpr bool __is_sized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, subrange_kind::sized>> = true;
+    inline constexpr bool __is_sized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, subrange_kind::sized>> = true;
 
     template<class _Tp>
-    constexpr bool __is_unsized_reverse_subrange = false;
+    inline constexpr bool __is_unsized_reverse_subrange = false;
 
     template<class _Iter, subrange_kind _Kind>
-    constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = _Kind == subrange_kind::unsized;
+    inline constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = _Kind == subrange_kind::unsized;
 
     template<class _Tp>
     struct __unwrapped_reverse_subrange {


        


More information about the libcxx-commits mailing list