This is a follow-up to the following question: SFINAE in variadic constructor
I wrote that some code such as
template<typename... Args>
StrongAlias(Args&&... args) noexcept(noexcept(T(std::declval<Args>()...)))
: value(std::forward<Args>(args)...) {}
would disable the StrongAlias
constructor in the case where T
isn't constructible from the argument types, but another user told me that this wouldn't work because the exception specification isn't part of the immediate context.
Is the exception specification not part of the immediate context? I can't see why this would be the case.