Skip to content

Commit f016437

Browse files
Dawn Perchikzygoloid
authored andcommitted
P0074R0 Making std::owner_less more flexible
1 parent be5adfb commit f016437

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

source/utilities.tex

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6679,7 +6679,7 @@
66796679

66806680
\begin{codeblock}
66816681
namespace std {
6682-
template<class T> struct owner_less;
6682+
template<class T = void> struct owner_less;
66836683

66846684
template<class T> struct owner_less<shared_ptr<T> > {
66856685
typedef bool result_type;
@@ -6698,6 +6698,19 @@
66986698
bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const;
66996699
bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const;
67006700
};
6701+
6702+
template<> struct owner_less<void> {
6703+
template<class T, class U>
6704+
bool operator()(shared_ptr<T> const&, shared_ptr<U> const&) const;
6705+
template<class T, class U>
6706+
bool operator()(shared_ptr<T> const&, weak_ptr<U> const&) const;
6707+
template<class T, class U>
6708+
bool operator()(weak_ptr<T> const&, shared_ptr<U> const&) const;
6709+
template<class T, class U>
6710+
bool operator()(weak_ptr<T> const&, weak_ptr<U> const&) const;
6711+
6712+
typedef unspecified is_transparent;
6713+
};
67016714
}
67026715
\end{codeblock}
67036716

0 commit comments

Comments
 (0)