Skip to content

Template template parameters and default arguments in C++17 (CWG150 + P0522R0) #42305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pkeir mannequin opened this issue Aug 11, 2019 · 3 comments
Closed

Template template parameters and default arguments in C++17 (CWG150 + P0522R0) #42305

pkeir mannequin opened this issue Aug 11, 2019 · 3 comments
Labels
bugzilla Issues migrated from bugzilla c++17 clang:frontend Language frontend issues, e.g. anything involving "Sema" duplicate Resolved as duplicate

Comments

@pkeir
Copy link
Mannequin

pkeir mannequin commented Aug 11, 2019

Bugzilla Link 42960
Version trunk
OS Linux
Attachments The MWE code described in the report.
CC @zygoloid

Extended Description

The code below will not compile with Clang, though it does with GCC (with the -std=c++17 flag and upwards).

template <typename T, typename = void>
struct jam;

template <template typename>
struct mata;

using type = mata;

This relates to CWG 150, which I believe was resolved by P0522R0. That is, since C++17, code such as that above should now be legal.

@zygoloid
Copy link
Mannequin

zygoloid mannequin commented Aug 11, 2019

See http://clang.llvm.org/cxx_status.html#p0522

Use -frelaxed-template-template-args to enable support for this feature for now.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@mizvekov
Copy link
Contributor

Duplicate of #42224

@mizvekov mizvekov marked this as a duplicate of #42224 Apr 27, 2024
@mizvekov mizvekov closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
@EugeneZelenko EugeneZelenko added duplicate Resolved as duplicate clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Apr 27, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 27, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (066609a1-1e53-4cd0-b6cb-efe5048c5913)

| | | | --- | --- | | Bugzilla Link | [42960](https://llvm.org/bz42960) | | Version | trunk | | OS | Linux | | Attachments | [The MWE code described in the report.](https://user-images.githubusercontent.com/92601693/143759618-0a508082-59dd-4dad-b5e7-25ee2c80590a.gz) | | CC | @zygoloid |

Extended Description

The code below will not compile with Clang, though it does with GCC (with the -std=c++17 flag and upwards).

template <typename T, typename = void>
struct jam;

template <template <typename> typename>
struct mata;

using type = mata<jam>;

This relates to CWG 150, which I believe was resolved by P0522R0. That is, since C++17, code such as that above should now be legal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++17 clang:frontend Language frontend issues, e.g. anything involving "Sema" duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

3 participants