C++模板别名和部分模板类特化

Ank*_*Dev 5 c++ g++ language-lawyer clang++

当使用模板别名作为声明部分特化的模板类的参数时,我面临着某种意外的结果.在某些情况下,我甚至观察到GCC 8.2和Clang 6.0.0不同意结果.可以在下面找到说明我的案例的代码.

// A template struct named Foo.
template<typename>
struct Foo {};

// A template alias for type Foo.
template<typename TYPE>
using AliasFoo = Foo<TYPE>;

// A variadic template alias for type Foo.
template<typename... ARGS>
using VariadicAliasFoo = Foo<ARGS...>;

// A template struct named Bar.
template<template<typename...> class TEMPLATE, typename TYPE>
struct Bar
{
  static constexpr bool value = false;
};

// Partial specialization of template struct Bar.
template<template<typename...> class TEMPLATE, typename... ARGS>
struct Bar< TEMPLATE, TEMPLATE<ARGS...> >
{
  static constexpr bool value = true;
};


// The main function.
int main()
{
  // These compile time assertions are satisfied (as expected).
  static_assert(Bar<Foo, Foo<int> >::value, "");
  static_assert(Bar<Foo, AliasFoo<int> >::value, "");
  static_assert(Bar<Foo, VariadicAliasFoo<int> >::value, "");

  // These compile time assertions fails with Clang 6.0.0 but succeed with GCC 8.2
  static_assert(Bar<AliasFoo, Foo<int> >::value, "");
  static_assert(Bar<AliasFoo, AliasFoo<int> >::value, "");
  static_assert(Bar<AliasFoo, VariadicAliasFoo<int> >::value, "");

  // These compile time assertions fails with Clang 6.0.0 and GCC 8.2.
  static_assert(Bar<VariadicAliasFoo, Foo<int> >::value, "");
  static_assert(Bar<VariadicAliasFoo, AliasFoo<int> >::value, "");
  static_assert(Bar<VariadicAliasFoo, VariadicAliasFoo<int> >::value, "");

  // Always return zero.
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

我的问题是,根据标准(c ++ 17),上面代码中最后六个编译时断言的结果应该是什么?