Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

concept identifier is undefined VS 2022

$
0
0

I am trying to understand the use of concepts in c++. I have written the simplest possible concept as follows.

template<typename T> concept A = true;

I'm writing my code in Visual Studio 2022 with the language standard set to: Preview - Features from the Latest C++ Working Draft (/std:c++latest).

warning STL4038: The contents of <concepts> are available only with C++20 concepts support.Severity    Code    Description Project File    Line    Suppression StateError   C2061   syntax error: identifier 'A'    Chapter21   C:\Users\justi\source\repos\Chapter21\templates.h   4   Error (active)  E0020   identifier "concept" is undefined   Chapter21   C:\Users\justi\source\repos\Chapter21\templates.h   4   

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>