Is class template argument deduction supported for template types with default arguments which are used within another template type declaration? The following code does not compile with both Clang/GCC trunk, it fails on the line defining y:
#include <optional>
template <class T = char>
struct C {};
int main() {
C x;
std::optional<C> y;
}
(https://godbolt.org/z/SgxY90)
Modifying the code to read std::optional<C<>> y fixes the issue, but I am a bit surprised this is needed. Is this a compiler issue, or a known language limitation?