-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pair.astuple, tuple.helper] Fix inconsistent class key in tuple_size…
…/tuple_element. (#2679) It was declared as a struct and specializations were classes.
- Loading branch information
1 parent
102a791
commit 6f34b05
Showing
2 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,8 +120,8 @@ | |
constexpr @\seebelow@ make_pair(T1&&, T2&&); | ||
|
||
// \ref{pair.astuple}, tuple-like access to pair | ||
template<class T> class tuple_size; | ||
template<size_t I, class T> class tuple_element; | ||
template<class T> struct tuple_size; | ||
template<size_t I, class T> struct tuple_element; | ||
|
||
template<class T1, class T2> struct tuple_size<pair<T1, T2>>; | ||
template<size_t I, class T1, class T2> struct tuple_element<I, pair<T1, T2>>; | ||
|
@@ -1018,20 +1018,20 @@ | |
constexpr T make_from_tuple(Tuple&& t); | ||
|
||
// \ref{tuple.helper}, tuple helper classes | ||
template<class T> class tuple_size; // not defined | ||
template<class T> class tuple_size<const T>; | ||
template<class T> class tuple_size<volatile T>; | ||
template<class T> class tuple_size<const volatile T>; | ||
template<class T> struct tuple_size; // not defined | ||
template<class T> struct tuple_size<const T>; | ||
template<class T> struct tuple_size<volatile T>; | ||
template<class T> struct tuple_size<const volatile T>; | ||
|
||
template<class... Types> class tuple_size<tuple<Types...>>; | ||
template<class... Types> struct tuple_size<tuple<Types...>>; | ||
|
||
template<size_t I, class T> class tuple_element; // not defined | ||
template<size_t I, class T> class tuple_element<I, const T>; | ||
template<size_t I, class T> class tuple_element<I, volatile T>; | ||
template<size_t I, class T> class tuple_element<I, const volatile T>; | ||
template<size_t I, class T> struct tuple_element; // not defined | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tkoeppe
Contributor
|
||
template<size_t I, class T> struct tuple_element<I, const T>; | ||
template<size_t I, class T> struct tuple_element<I, volatile T>; | ||
template<size_t I, class T> struct tuple_element<I, const volatile T>; | ||
|
||
template<size_t I, class... Types> | ||
class tuple_element<I, tuple<Types...>>; | ||
struct tuple_element<I, tuple<Types...>>; | ||
|
||
template<size_t I, class T> | ||
using tuple_element_t = typename tuple_element<I, T>::type; | ||
|
@@ -1794,14 +1794,13 @@ | |
\indexlibrary{\idxcode{tuple_size}}% | ||
\begin{itemdecl} | ||
template<class... Types> | ||
class tuple_size<tuple<Types...>> : public integral_constant<size_t, sizeof...(Types)> { }; | ||
struct tuple_size<tuple<Types...>> : public integral_constant<size_t, sizeof...(Types)> { }; | ||
\end{itemdecl} | ||
|
||
\indexlibrary{\idxcode{tuple_element}}% | ||
\begin{itemdecl} | ||
template<size_t I, class... Types> | ||
class tuple_element<I, tuple<Types...>> { | ||
public: | ||
struct tuple_element<I, tuple<Types...>> { | ||
using type = TI; | ||
}; | ||
\end{itemdecl} | ||
|
@@ -1819,9 +1818,9 @@ | |
|
||
\indexlibrary{\idxcode{tuple_size}}% | ||
\begin{itemdecl} | ||
template<class T> class tuple_size<const T>; | ||
template<class T> class tuple_size<volatile T>; | ||
template<class T> class tuple_size<const volatile T>; | ||
template<class T> struct tuple_size<const T>; | ||
template<class T> struct tuple_size<volatile T>; | ||
template<class T> struct tuple_size<const volatile T>; | ||
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
|
@@ -1857,9 +1856,9 @@ | |
|
||
\indexlibrary{\idxcode{tuple_element}}% | ||
\begin{itemdecl} | ||
template<size_t I, class T> class tuple_element<I, const T>; | ||
template<size_t I, class T> class tuple_element<I, volatile T>; | ||
template<size_t I, class T> class tuple_element<I, const volatile T>; | ||
template<size_t I, class T> struct tuple_element<I, const T>; | ||
template<size_t I, class T> struct tuple_element<I, volatile T>; | ||
template<size_t I, class T> struct tuple_element<I, const volatile T>; | ||
\end{itemdecl} | ||
|
||
\begin{itemdescr} | ||
|
Oh, eek, we need to revise the comment column here... oh well.