Created on 2014-02-14.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N3936.
Change [pointer.traits.types] as indicated:
typedef see below element_type;-1- Type: Ptr::element_type if
such a type existsthe qualified-id Ptr::element_type is valid and denotes a type ([temp.deduct]); otherwise, T if Ptr is a class template instantiation of the form SomePointer<T, Args>, where Args is zero or more type arguments; otherwise, the specialization is ill-formed.typedef see below difference_type;-2- Type: Ptr::difference_type if
such a type existsthe qualified-id Ptr::difference_type is valid and denotes a type ([temp.deduct]); otherwise, std::ptrdiff_t.template <class U> using rebind = see below;-3- Alias template: Ptr::rebind<U> if
such a type existsthe qualified-id Ptr::rebind<U> is valid and denotes a type ([temp.deduct]); otherwise, SomePointer<U, Args> if Ptr is a class template instantiation of the form SomePointer<T, Args>, where Args is zero or more type arguments; otherwise, the instantiation of rebind is ill-formed.
Change [allocator.uses.trait] p1 as indicated:
template <class T, class Alloc> struct uses_allocator;-1- Remarks: automatically detects whether T has a nested allocator_type that is convertible from Alloc. Meets the BinaryTypeTrait requirements (20.10.1). The implementation shall provide a definition that is derived from true_type if
a typethe qualified-id T::allocator_typeexistsis valid and denotes a type ([temp.deduct]) and is_convertible<Alloc, T::allocator_type>::value != false, otherwise it shall be derived from false_type. […]
Change [allocator.traits.types] as indicated:
typedef see below pointer;-1- Type: Alloc::pointer if
such a type existsthe qualified-id Alloc::pointer is valid and denotes a type ([temp.deduct]); otherwise, value_type*.typedef see below const_pointer;-2- Type: Alloc::const_pointer if
such a type existsthe qualified-id Alloc::const_pointer is valid and denotes a type ([temp.deduct]); otherwise, pointer_traits<pointer>::rebind<const value_type>.typedef see below void_pointer;-3- Type: Alloc::void_pointer if
such a type existsthe qualified-id Alloc::void_pointer is valid and denotes a type ([temp.deduct]); otherwise, pointer_traits<pointer>::rebind<void>.typedef see below const_void_pointer;-4- Type: Alloc::const_void_pointer if
such a type existsthe qualified-id Alloc::const_void_pointer is valid and denotes a type ([temp.deduct]); otherwise, pointer_traits<pointer>::rebind<const void>.typedef see below difference_type;-5- Type: Alloc::difference_type if
such a type existsthe qualified-id Alloc::difference_type is valid and denotes a type ([temp.deduct]); otherwise, pointer_traits<pointer>::difference_type.typedef see below size_type;-6- Type: Alloc::size_type if
such a type existsthe qualified-id Alloc::size_type is valid and denotes a type ([temp.deduct]); otherwise, make_unsigned_t<difference_type>.typedef see below propagate_on_container_copy_assignment;-7- Type: Alloc::propagate_on_container_copy_assignment if
such a type existsthe qualified-id Alloc::propagate_on_container_copy_assignment is valid and denotes a type ([temp.deduct]); otherwise, false_type.typedef see below propagate_on_container_move_assignment;-8- Type: Alloc::propagate_on_container_move_assignment if
such a type existsthe qualified-id Alloc::propagate_on_container_move_assignment is valid and denotes a type ([temp.deduct]); otherwise, false_type.typedef see below propagate_on_container_swap;-9- Type: Alloc::propagate_on_container_swap if
such a type existsthe qualified-id Alloc::propagate_on_container_swap is valid and denotes a type ([temp.deduct]); otherwise, false_type.template <class T> using rebind_alloc = see below;-10- Alias template: Alloc::rebind<T>::other if
such a type existsthe qualified-id Alloc::rebind<T>::other is valid and denotes a type ([temp.deduct]); otherwise, Alloc<T, Args> if Alloc is a class template instantiation of the form Alloc<U, Args>, where Args is zero or more type arguments; otherwise, the instantiation of rebind_alloc is ill-formed.
Change [unique.ptr.single] p3 as indicated:
-3- If the
typequalified-id remove_reference_t<D>::pointerexistsis valid and denotes a type ([temp.deduct]), then unique_ptr<T, D>::pointer shall be a synonym for remove_reference_t<D>::pointer. […]
Change [sequence.reqmts] p3 as indicated:
-3- In Tables 100 and 101, X denotes a sequence container class, a denotes a value of X containing elements of type T, A denotes X::allocator_type if
it existsthe qualified-id X::allocator_type is valid and denotes a type ([temp.deduct]) and std::allocator<T> if it doesn't, […]
[ 2014-05-18 Library reflector vote ]
The issue has been identified as Tentatively Ready based on six votes in favour.
[ 2014-05-16, Daniel provides wording ]
LWG 2299 addressed a N.B. comment pointing out that recently added wording about a type existing was not clear what happens if the type exists but is inaccessible. There are 16 pre-existing uses of the same language in the library that should use the same wording used to resolve 2299.
The relevant paragraphs are:
[unique.ptr.single]
[pointer.traits.types] [allocator.uses.trait] [allocator.traits.types] [sequence.reqmts]History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2014-11-08 19:44:42 | admin | set | status: voting -> wp |
2014-11-04 10:26:50 | admin | set | status: ready -> voting |
2014-05-19 19:21:24 | admin | set | messages: + msg6957 |
2014-05-19 19:21:24 | admin | set | status: new -> ready |
2014-05-16 19:08:29 | admin | set | messages: + msg6947 |
2014-05-16 19:08:29 | admin | set | messages: + msg6946 |
2014-02-14 00:00:00 | admin | create |