-frelaxed-template-template-args: "error: pack expansion used as argument for non-pack parameter of alias template" with constrained alias template (original) (raw)

Motivation:

#include <boost/hana/type.hpp> template requires(true) using U = int; auto t = boost::hana::template_(boost::hana::type_c);

Reduced:

template requires(true) using U = int; template<template<typename ...> class, class> struct S {}; template S<U, T> f(); auto t = f();

compiled with -frelaxed-template-template-args gives:

:2:31: error: pack expansion used as argument for non-pack parameter of alias template template class, class> struct S {};

(we need -frelaxed-template-template-args for other reasons)
Workaround: use std::enable_if_t to constrain alias template instead.