diff --git a/shared_ptr.htm b/shared_ptr.htm index d08ff7f..dc0c2cb 100644 --- a/shared_ptr.htm +++ b/shared_ptr.htm @@ -121,7 +121,7 @@ void bad() bool unique() const; // never throws long use_count() const; // never throws - operator implementation-defined-type () const; // never throws + operator unspecified-bool-type () const; // never throws void swap(shared_ptr<T> & b); // never throws }; @@ -145,6 +145,11 @@ void bad() shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r); // never throws } +
[It might be convenient to relax the requirements on shared_ptr's + signature, allowing an additional, defaulted, template parameter. This would + help in detecting possible ODR violations. On the other hand, using shared_ptr + as an argument to a template template parameter requires an exact + signature match.]
typedef T element_type;@@ -413,7 +418,9 @@ q = p; specialization for consistency and legality reasons, as std::less is required to return the results of operator<, and many standard algorithms use operator< instead of std::less - for comparisons when a predicate is not supplied. + for comparisons when a predicate is not supplied. Composite objects, like std::pair, + also implement their operator< in terms of their contained + subobjects' operator<.
The rest of the comparison operators are omitted by design.]
template<typename T>