This question is not limited to the built-in C++11 pointer types (shared_ptr etc) but includes any custom pointer type that could be potentially defined in C++ and included as part of a standards-compliant allocator.
Could the construction of a non-trivial pointer, such as that supplied by a custom allocator (std::allocator_traits<Alloc>::pointer) throw an exception and if so, why?
[allocator.requirements]/4 An allocator type
X
shall satisfy the requirements ofCopyConstructible
(17.6.3.1). TheX::pointer
,X::const_pointer
,X::void_pointer
, andX::const_void_pointer
types shall satisfy the requirements ofNullablePointer
(17.6.3.3). No constructor, comparison operator, copy operation, move operation, or swap operation on these types shall exit via an exception...
Emphasis mine