The following code
#include <cstdint>
template<typename T>
struct allo{};
template <typename T, std::size_t a = alignof(T)>
struct AA{
constexpr std::size_t align() { return a; }
};
template<template <typename> typename AT>
struct SAR{
};
using UHR = SAR<allo>;
using AHR = SAR<AA>;
int main()
{
UHR u;
AHR a;
return 0;
}
is accepted by GCC with -std=c++17, but rejected by GCC with std=c++14 and clang (regardless of the C++ dialect).
https://godbolt.org/z/xaE56Y5Pj
Which compiler is right? Is this some change in C++17 that clang hasn't implemented?