[propagate_const.ctor] Conditional explicit in C++20
frederick-vs-ja opened this issue · 2 comments
LFTS v3 has been rebased onto C++20, so the note in [propagate_const.ctor]/1 is no longer accurate, and we can make use of conditional explicit to specify these constructors.
Can we remove the Note and two Remarks, and replace see below with explicit(expr) (also in [propagate_const.overview])?
@jwakely: do you think that's sufficiently editorial, covered by the general permission to modernize implied by the rebasing paper?
Yes, I think that makes sense to do as a postscript to that rebase.
In the IS we use explicit( see below ) and keep a Remarks: element for the condition, although that's because the conditions are usually non-trivial. For these two constructors it wouldn't be too ugly to use explicit(!is_convertible_v<U&&, T>) and remove the Remarks: element.
N.B. U&& could be written as simply U because is_convertible<From, To> is defined in terms of declval<From>() which returns From&&. So it makes no difference whether you use U or U&&, it's checking for convertibility from U&& to T either way.