With a bit of fiddeling you can use every kind of bracket to basically make function calls in c++
Here are the links to the snippets, all compile and run
Rust: https://godbolt.org/z/bM3d7bG14
With a bit of fiddeling you can use every kind of bracket to basically make function calls in c++
Here are the links to the snippets, all compile and run
Rust: https://godbolt.org/z/bM3d7bG14
Good point regarding the {} implementation.
I disagree slightly regarding your point that these aren’t function calls. Yes technically they are different things but effectively they are functions, I cann pass arguments and get a result based on some operations.
Of course not all of these can do anything but only the constexpr value is actually pretty limited. The other ones are straight up functions