Timeline for C++20 concepts for container and allocator
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 28, 2022 at 11:44 | answer | added | Toby Speight | timeline score: 2 | |
| Feb 28, 2022 at 11:26 | history | edited | Toby Speight |
edited tags
|
|
| Jan 26, 2021 at 14:59 | comment | added | isnullxbh |
Sorry, you're right. I was inattentive and thought that this requires is nested in other requires. Sorry again.
|
|
| Jan 26, 2021 at 14:31 | comment | added | PHD |
As stated here, requires does two things: specifying constraints and boolean expression. The one used in my code represents the latter. Therefore, there's nothing wrong with it.
|
|
| Jan 26, 2021 at 14:28 | comment | added | PHD |
@isnullxbh I think you misunderstood what I said. A single requires clause is used to apply constraints on subsequent stuff (function, class). The first requires from requires requires also does the same thing. But the latter one is a boolean constant expression. Unless you intentionally nest requires inside requires block just like the example you gave, a single requires is valid.
|
|
| Jan 26, 2021 at 14:05 | comment | added | isnullxbh | Check the following example. GCC doesn't compile it (without second requires), Clang generates a warning. | |
| Jan 26, 2021 at 13:46 | comment | added | PHD |
@isnullxbh requires requires only applies to function and class. When declaring concept, a single requires clause serves as a boolean expression.
|
|
| Jan 26, 2021 at 7:52 | comment | added | isnullxbh |
Add requires before requires (C a). Explanation: stackoverflow.com/questions/54200988/…
|
|
| Jan 1, 2021 at 6:00 | history | tweeted | twitter.com/StackCodeReview/status/1344886075425255425 | ||
| Aug 24, 2020 at 4:03 | review | First posts | |||
| Aug 24, 2020 at 4:04 | |||||
| Aug 24, 2020 at 3:57 | history | asked | PHD | CC BY-SA 4.0 |