Skip to content

Commit e40bbba

Browse files
authored
[libc++][NFC] Reformat some deduction guides (#160085)
They're not formatted correctly anymore, since clang-format was updated.
1 parent 2c6adc9 commit e40bbba

File tree

5 files changed

+33
-41
lines changed

5 files changed

+33
-41
lines changed

libcxx/include/map

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,9 +1353,8 @@ template <class _Key,
13531353
class _Allocator = allocator<pair<const _Key, _Tp>>,
13541354
class = enable_if_t<!__is_allocator<_Compare>::value, void>,
13551355
class = enable_if_t<__is_allocator<_Allocator>::value, void>>
1356-
map(initializer_list<pair<_Key, _Tp>>,
1357-
_Compare = _Compare(),
1358-
_Allocator = _Allocator()) -> map<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;
1356+
map(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare(), _Allocator = _Allocator())
1357+
-> map<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;
13591358

13601359
template <class _InputIterator,
13611360
class _Allocator,
@@ -1374,8 +1373,8 @@ map(from_range_t, _Range&&, _Allocator)
13741373
# endif
13751374

13761375
template <class _Key, class _Tp, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>
1377-
map(initializer_list<pair<_Key, _Tp>>,
1378-
_Allocator) -> map<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
1376+
map(initializer_list<pair<_Key, _Tp>>, _Allocator)
1377+
-> map<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
13791378
# endif
13801379

13811380
# ifndef _LIBCPP_CXX03_LANG
@@ -1911,9 +1910,8 @@ template <class _Key,
19111910
class _Allocator = allocator<pair<const _Key, _Tp>>,
19121911
class = enable_if_t<!__is_allocator<_Compare>::value, void>,
19131912
class = enable_if_t<__is_allocator<_Allocator>::value, void>>
1914-
multimap(initializer_list<pair<_Key, _Tp>>,
1915-
_Compare = _Compare(),
1916-
_Allocator = _Allocator()) -> multimap<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;
1913+
multimap(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare(), _Allocator = _Allocator())
1914+
-> multimap<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;
19171915

19181916
template <class _InputIterator,
19191917
class _Allocator,
@@ -1932,8 +1930,8 @@ multimap(from_range_t, _Range&&, _Allocator)
19321930
# endif
19331931

19341932
template <class _Key, class _Tp, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>
1935-
multimap(initializer_list<pair<_Key, _Tp>>,
1936-
_Allocator) -> multimap<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
1933+
multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
1934+
-> multimap<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
19371935
# endif
19381936

19391937
# ifndef _LIBCPP_CXX03_LANG

libcxx/include/set

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -925,15 +925,13 @@ template <class _InputIterator,
925925
class _Allocator,
926926
class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
927927
class = enable_if_t<__is_allocator<_Allocator>::value, void>>
928-
set(_InputIterator,
929-
_InputIterator,
930-
_Allocator) -> set<__iter_value_type<_InputIterator>, less<__iter_value_type<_InputIterator>>, _Allocator>;
928+
set(_InputIterator, _InputIterator, _Allocator)
929+
-> set<__iter_value_type<_InputIterator>, less<__iter_value_type<_InputIterator>>, _Allocator>;
931930

932931
# if _LIBCPP_STD_VER >= 23
933932
template <ranges::input_range _Range, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>
934-
set(from_range_t,
935-
_Range&&,
936-
_Allocator) -> set<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
933+
set(from_range_t, _Range&&, _Allocator)
934+
-> set<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
937935
# endif
938936

939937
template <class _Key, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>
@@ -1373,9 +1371,8 @@ template <class _Key,
13731371
class _Allocator = allocator<_Key>,
13741372
class = enable_if_t<__is_allocator<_Allocator>::value, void>,
13751373
class = enable_if_t<!__is_allocator<_Compare>::value, void>>
1376-
multiset(initializer_list<_Key>,
1377-
_Compare = _Compare(),
1378-
_Allocator = _Allocator()) -> multiset<_Key, _Compare, _Allocator>;
1374+
multiset(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator())
1375+
-> multiset<_Key, _Compare, _Allocator>;
13791376

13801377
template <class _InputIterator,
13811378
class _Allocator,
@@ -1386,9 +1383,8 @@ multiset(_InputIterator, _InputIterator, _Allocator)
13861383

13871384
# if _LIBCPP_STD_VER >= 23
13881385
template <ranges::input_range _Range, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>
1389-
multiset(from_range_t,
1390-
_Range&&,
1391-
_Allocator) -> multiset<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
1386+
multiset(from_range_t, _Range&&, _Allocator)
1387+
-> multiset<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
13921388
# endif
13931389

13941390
template <class _Key, class _Allocator, class = enable_if_t<__is_allocator<_Allocator>::value, void>>

libcxx/include/stack

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,12 @@ template <class _InputIterator,
315315
class _Alloc,
316316
__enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0,
317317
__enable_if_t<__is_allocator<_Alloc>::value, int> = 0>
318-
stack(_InputIterator,
319-
_InputIterator,
320-
_Alloc) -> stack<__iter_value_type<_InputIterator>, deque<__iter_value_type<_InputIterator>, _Alloc>>;
318+
stack(_InputIterator, _InputIterator, _Alloc)
319+
-> stack<__iter_value_type<_InputIterator>, deque<__iter_value_type<_InputIterator>, _Alloc>>;
321320

322321
template <ranges::input_range _Range, class _Alloc, __enable_if_t<__is_allocator<_Alloc>::value, int> = 0>
323-
stack(from_range_t,
324-
_Range&&,
325-
_Alloc) -> stack<ranges::range_value_t<_Range>, deque<ranges::range_value_t<_Range>, _Alloc>>;
322+
stack(from_range_t, _Range&&, _Alloc)
323+
-> stack<ranges::range_value_t<_Range>, deque<ranges::range_value_t<_Range>, _Alloc>>;
326324

327325
# endif
328326

libcxx/include/unordered_map

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,12 +2035,12 @@ template <class _Key,
20352035
class = enable_if_t<!is_integral<_Hash>::value>,
20362036
class = enable_if_t<!__is_allocator<_Pred>::value>,
20372037
class = enable_if_t<__is_allocator<_Allocator>::value>>
2038-
unordered_multimap(
2039-
initializer_list<pair<_Key, _Tp>>,
2040-
typename allocator_traits<_Allocator>::size_type = 0,
2041-
_Hash = _Hash(),
2042-
_Pred = _Pred(),
2043-
_Allocator = _Allocator()) -> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>;
2038+
unordered_multimap(initializer_list<pair<_Key, _Tp>>,
2039+
typename allocator_traits<_Allocator>::size_type = 0,
2040+
_Hash = _Hash(),
2041+
_Pred = _Pred(),
2042+
_Allocator = _Allocator())
2043+
-> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>;
20442044

20452045
template <class _InputIterator,
20462046
class _Allocator,

libcxx/include/unordered_set

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -937,13 +937,13 @@ template <ranges::input_range _Range,
937937
class = enable_if_t<!is_integral<_Hash>::value>,
938938
class = enable_if_t<!__is_allocator<_Pred>::value>,
939939
class = enable_if_t<__is_allocator<_Allocator>::value>>
940-
unordered_set(
941-
from_range_t,
942-
_Range&&,
943-
typename allocator_traits<_Allocator>::size_type = 0,
944-
_Hash = _Hash(),
945-
_Pred = _Pred(),
946-
_Allocator = _Allocator()) -> unordered_set<ranges::range_value_t<_Range>, _Hash, _Pred, _Allocator>; // C++23
940+
unordered_set(from_range_t,
941+
_Range&&,
942+
typename allocator_traits<_Allocator>::size_type = 0,
943+
_Hash = _Hash(),
944+
_Pred = _Pred(),
945+
_Allocator = _Allocator())
946+
-> unordered_set<ranges::range_value_t<_Range>, _Hash, _Pred, _Allocator>; // C++23
947947
# endif
948948

949949
template <class _Tp,

0 commit comments

Comments
 (0)