Timeline for Min function accepting varying number of arguments in C++17
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 15, 2019 at 23:54 | history | edited | Snowhawk | CC BY-SA 4.0 |
deleted 5 characters in body
|
Mar 15, 2019 at 23:49 | history | edited | Snowhawk | CC BY-SA 4.0 |
deleted 5 characters in body
|
Mar 15, 2019 at 20:40 | history | edited | Snowhawk | CC BY-SA 4.0 |
added 126 characters in body
|
Mar 15, 2019 at 20:30 | history | edited | Snowhawk | CC BY-SA 4.0 |
added 396 characters in body
|
Mar 15, 2019 at 13:33 | comment | added | chris |
@Lingxi, Yeah, constexpr has come a long way since its introduction. C++20 will include the ability to make std::vector constexpr and will actually include a constexprified vector, unless something big changes in the next year.
|
|
Mar 15, 2019 at 13:25 | comment | added | Lingxi | @chris Oh my. I didn't expect compiler to be that smart, given the address-of operator in action here. | |
Mar 15, 2019 at 12:59 | comment | added | chris | @Lingxi, It's fine with constexpr | |
Mar 15, 2019 at 12:00 | vote | accept | Lingxi | ||
Mar 15, 2019 at 12:00 | comment | added | Lingxi |
The only disadvantage I can see in your solution is that it cannot be constexpr . Or am I wrong?
|
|
Mar 15, 2019 at 11:54 | comment | added | Lingxi | Oh, the fold expression is performed on the comma operator. What a trick, but very nice! | |
Mar 15, 2019 at 11:52 | comment | added | Lingxi | Wow O_O Need some time to digest. | |
Mar 15, 2019 at 10:18 | history | answered | Snowhawk | CC BY-SA 4.0 |