-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
[v3] Concepts List #377
Comments
I think a central discussion where we, the maintainers, talk about the C++ Concepts is necessary, I've been inspired by the one created by @tehsphinx obviously, great idea. 😄 I hope this will promote contribution from everyone. |
Great idea to discuss this.
|
|
To summarize:
|
We could leave |
For now that would suffice. I am not 100% on board with the name 'reflection' though. It clashes directly with what I would expect to find coming from Java or C#.
I am all for that, |
I've updated the issue with the updated Concepts from exercism/v3#887 |
Hello there, As I have seen that the C++ Functions is recommended from the Concepts list, however it has not yet been added to the repository, therefore can I give it a shot? Here are the parts that I initially plan to include:
Feel free to add more suggestion. |
This is inspired by exercism/v3#167.
C++ reference
Concepts
The C++ concept exercises are based on concepts. The list below contains the concepts that have been identified for the C++ language.
Object-oriented
The core OO features a C++ developer should know about are:
Functional
C++ is a very flexible language, so lots of functional concepts apply to it:
const
ness)auto
, FTAD, and CTAD)Memory management
Functions
General
<type_traits>
)Types
std::span
andstd::string_view
)std::variant
)std::pair
,std::tuple
)Advanced topics
union
)Concept interpretation
The concept exercises use the following concepts:
numbers-basic
int
anddouble
, and understand that the former represents whole numbers, and the latter floating-point numbers. Know of basic operators such as multiplication and comparison. Know where it's documented, or at least how to search for it.numbers-integral
int
,long
,long long
(with unsigned and fixed-width variants). Know when to use which type.numbers-floating-point
float
,double
andlong double
. Know when to use which type.strings-basic
std::string
type. Know of some basic functions (like looking up a character at a position, or slicing the string). Know where it's documented, or at least how to search for it.strings-formatting
chrono-basic
<chrono>
header. Know of the existence of all three standard clocks and when to use them. Know how to access the current time. Know how to compare dates. Know how to convert a string to a chrono time point and vice versa. Know where it's documented, or at least how to search for it.enums-basic
enum class
keyword. Know how to define enum members. Know how to use an enumerators. Know where it's documented, or at least how to search for itenums-advanced
casts-basic
static_cast
.conditionals
if
orswitch
statement).conditional-injection
if constexpr
.bitwise-operations
iteration-basic
for
).arrays-basic
std::array
type. Know how to define an array. Know how to access elements in an array by index. Know how to iterate over elements in an array. Know of some basic functions (like finding the index of an element in an array). Know where it's documented, or at least how to search for it.vectors-basic
std::vector
type. Know how to define an array. Know how to access elements in an vector by index. Know the unique properties of a vector. Know of some basic functions (like adding an element to a vector). Know where it's documented, or at least how to search for it.maps-basic
std::map
andstd::unordered_map
types. Know how to define an map. Know how to access elements in an map by key. Know the unique properties of a map. Know of some basic functions (like adding an element to a map). Know where it's documented, or at least how to search for it.sets-basic
std::set
andstd::unordered_set
types. Know how to define an set. Know how to access elements in a set. Know the unique properties of a set. Know of some basic functions (like adding an element to a set). Know where it's documented, or at least how to search for it.This also indicates that for example
strings-basic
does not teach using custom formatting strings and thatnumbers-basic
does not teach about integer undefined-behavior.The text was updated successfully, but these errors were encountered: