Skip to content

-frelaxed-template-template-args: "error: pack expansion used as argument for non-pack parameter of alias template" with constrained alias template #62529

Closed
@ecatmur

Description

@ecatmur

Motivation:

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

Reduced:

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

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

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

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

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions