Skip to content

[span.cons] thinks that to_address() can throw, but it can't #3534

@StephanTLavavej

Description

@StephanTLavavej

N4842 22.7.3.2 [span.cons]/6 and /9 say: "Throws: When and what to_address(first) throws."

But 20.10.2 [memory.syn] and 20.10.4 [pointer.conversion] require both overloads of to_address() to be noexcept:

template<class T> constexpr T* to_address(T* p) noexcept;
template<class Ptr> auto to_address(const Ptr& p) noexcept;

Therefore, [span.cons]/6 and [span.cons]/9 should be removed editorially.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions