Skip to content

Commit 4eaa6c5

Browse files
committed
Fix comment
1 parent e7d3f31 commit 4eaa6c5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libcxx/include/__memory/compressed_pair.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
5252
// member3 - offset: 8, size: 8
5353
//
5454
// Furthermore, that alignment must be the same as what was used in the old __compressed_pair layout, so we must
55-
// handle reference types specially since alignof(T&) == alignof(T). See https://github.com/llvm/llvm-project/issues/118559.
55+
// handle reference types specially since alignof(T&) == alignof(T).
56+
// See https://github.com/llvm/llvm-project/issues/118559.
5657

5758
#ifndef _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING
5859

5960
template <class _Tp>
60-
struct __compressed_pair_alignment : integral_constant<size_t, _LIBCPP_ALIGNOF(_Tp)> {};
61+
inline const size_t __compressed_pair_alignment = _LIBCPP_ALIGNOF(_Tp);
6162

6263
template <class _Tp>
63-
struct __compressed_pair_alignment<_Tp&> : integral_constant<size_t, _LIBCPP_ALIGNOF(void*)> {};
64+
inline const size_t __compressed_pair_alignment<_Tp&> = _LIBCPP_ALIGNOF(void*);
6465

6566
template <class _ToPad,
6667
bool _Empty = ((is_empty<_ToPad>::value && !__libcpp_is_final<_ToPad>::value) ||
@@ -73,16 +74,15 @@ template <class _ToPad>
7374
class __compressed_pair_padding<_ToPad, true> {};
7475

7576
# define _LIBCPP_COMPRESSED_PAIR(T1, Initializer1, T2, Initializer2) \
76-
_LIBCPP_NO_UNIQUE_ADDRESS \
77-
__attribute__((__aligned__(::std::__compressed_pair_alignment<T2>::value))) T1 Initializer1; \
77+
_LIBCPP_NO_UNIQUE_ADDRESS __attribute__((__aligned__(::std::__compressed_pair_alignment<T2>))) T1 Initializer1; \
7878
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T1> _LIBCPP_CONCAT3(__padding1_, __LINE__, _); \
7979
_LIBCPP_NO_UNIQUE_ADDRESS T2 Initializer2; \
8080
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T2> _LIBCPP_CONCAT3(__padding2_, __LINE__, _)
8181

8282
# define _LIBCPP_COMPRESSED_TRIPLE(T1, Initializer1, T2, Initializer2, T3, Initializer3) \
8383
_LIBCPP_NO_UNIQUE_ADDRESS \
84-
__attribute__((__aligned__(::std::__compressed_pair_alignment<T2>::value), \
85-
__aligned__(::std::__compressed_pair_alignment<T3>::value))) T1 Initializer1; \
84+
__attribute__((__aligned__(::std::__compressed_pair_alignment<T2>), \
85+
__aligned__(::std::__compressed_pair_alignment<T3>))) T1 Initializer1; \
8686
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T1> _LIBCPP_CONCAT3(__padding1_, __LINE__, _); \
8787
_LIBCPP_NO_UNIQUE_ADDRESS T2 Initializer2; \
8888
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T2> _LIBCPP_CONCAT3(__padding2_, __LINE__, _); \

0 commit comments

Comments
 (0)