2 ms·
> can it be used as a type name of a variable or function argument? If I understand correctly, placeholders may work for this. This use is described in the "Pr
by matt_d 10y ago
> can it be used as a type name of a variable or function argument?
If I understand correctly, placeholders may work for this. This use is described in the "Programming with placeholders" section of the "Introducing concepts" article: https://accu.org/index.php/journals/2157 https://accu.org/index.php/journals/2157
The remaining articles in Andrew Sutton's C++ concepts series are pretty good, too; so, just in case anyone is interested, here are the links:
- "Defining Concepts" - https://accu.org/index.php/journals/2198 https://accu.org/index.php/journals/2198
- "Overloading with Concepts" - https://accu.org/index.php/journals/2316 https://accu.org/index.php/journals/2316
- lobster_johnson 10y agoIf I understand the first article about placeholders correctly, concepts are indeed intended to be used where you can use ordinary types, just like traits. That looks really cool, if it ends up in the standard.