Since C++14 constexpr-functions can return void
. What is the point in using void constexpr-functions, because they can't make any side-effects?
Asked
Active
Viewed 66 times
2

DeiDei
- 10,205
- 6
- 55
- 80

Alexey Markov
- 1,546
- 2
- 23
- 41
-
https://stackoverflow.com/a/29261434/707111, https://stackoverflow.com/questions/29261276/constexpr-void-function-rejected#comment51547488_29262339 – Ry- Feb 24 '18 at 19:19
-
1`constexpr` member functions can mutate state – Justin Feb 24 '18 at 19:20