This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello,
I noticed that std::max is implemented as:
//return __a < __b ? __b : __a; if (__a < __b) return __b; return __a;
Notice how it doesn't use the ?: code but the "if" version instead. Looking at the history, this seems to come from SGI. Does someone know why it was done this way?
The reason I am asking is that if I add ?: support for vector types (à la OpenCL), with "if" std::max will still fail on vectors, but with ?: it would suddenly become accepted.
-- Marc Glisse
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |