GCC 12 -std=c++20 does not allow current instantiation of a class template as constructor

Solution Unverified - Updated -

Issue

  • Why does GCC 12 -std=c++20 does not allow current instantiation of a class template to be used as a constructor and causing compilation issue?

  • Compilation issue while using '-std=c++20' flag and the same code can be compiled without any issues using the -std=c++17 flag.

Environment

  • Red Hat Enterprise Linux
  • gcc
  • g++

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content