编译器之间的嵌套模板类参数推导差异

bja*_*d_e 5 c++ language-lawyer template-argument-deduction c++17

下面的示例在gccmsvc中都可以正常编译:

template <typename>
struct Foo {
    template <typename T>
    struct Bar {
        Bar(T val): 
            val_(val) 
        {             
        }

        T val_;
    };
};

auto func() {
    return Foo<int>::Bar(3);
}
Run Code Online (Sandbox Code Playgroud)

clang中似乎需要一个额外的推导指南,以便编译:

template <typename>
struct Foo {
    template <typename T>
    struct Bar {
        Bar(T val): 
            val_(val) 
        {             
        }

        T val_;
    };

    template <typename T>
    Bar(T) -> Bar<T>; // deduction guide
};

auto func() {
    return Foo<int>::Bar(3);
}
Run Code Online (Sandbox Code Playgroud)

这个额外要求背后有什么理由吗?或者只是对标准中不清楚的东西的解释有所不同?