You can use this: Use min({a,b,c}) instead of min(a,min(b,c)).
C++ is evolving ,are you?
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | Um_nik | 164 |
2 | cry | 160 |
2 | maomao90 | 160 |
4 | -is-this-fft- | 159 |
5 | atcoder_official | 158 |
5 | awoo | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | maroonrk | 152 |
10 | Dominater069 | 149 |
You can use this: Use min({a,b,c}) instead of min(a,min(b,c)).
C++ is evolving ,are you?
Name |
---|
that feature has existed since C++11, so around 10 years ago
Then why does it give error on my compiler? I'm using gcc 4.3.0
I think GCC 4 is too old
At least here it says std::max with initializer list being a parameter has existed since C++11
Does adding
-std=c++0x
option to the compiler command line make it work? That's an older name of the C++11 draft before it got finalized. Ancient compilers may accept it.We know.