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 | 3803 |
2 | jiangly | 3707 |
3 | Benq | 3627 |
4 | ecnerwala | 3584 |
5 | orzdevinwang | 3573 |
6 | Geothermal | 3569 |
6 | cnnfls_csy | 3569 |
8 | Radewoosh | 3542 |
9 | jqdai0815 | 3532 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 164 |
2 | awoo | 163 |
3 | adamant | 162 |
4 | maroonrk | 152 |
5 | -is-this-fft- | 151 |
6 | nor | 150 |
7 | atcoder_official | 147 |
8 | TheScrasse | 146 |
9 | Petr | 145 |
10 | SecondThread | 142 |
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.