llvm-project/libcxx/test/std/numerics
Arthur O'Dwyer 469d18c064 [libc++] Fix result-type and value_type computation in <valarray>.
The `operator[]` of `_UnaryOp` and `_BinaryOp` returns the result of
calling `__op_`, so its return type should be `__result_type`, not
e.g. `_A0::value_type`. However, `_UnaryOp::value_type` also should
never have been `_A0::value_type`; it needs to be the correct type
for the result of the unary op, e.g. `bool` when the op is `logical_not`.

This turns out to matter when multiple operators are nested, e.g.
`+(v == v)` needs to have a `value_type` of `bool`, not `int`,
even when `v` is of type `valarray<int>`.

Differential Revision: https://reviews.llvm.org/D103416
2021-06-05 12:29:36 -04:00
..
bit [libc++] Some fixes to the <bit> utilities. 2021-05-18 19:56:30 -04:00
c.math [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
cfenv/cfenv.syn [libc++] Remove obsolete 'newlib' Lit Feature 2020-06-12 14:08:18 -04:00
complex.number [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
numarray [libc++] Fix result-type and value_type computation in <valarray>. 2021-06-05 12:29:36 -04:00
numbers [libc++][test] Portably silence warnings 2020-10-19 08:33:58 -07:00
numeric.ops [libcxx][nfc] prefixes test type `input_iterator` with `cpp17_` 2021-05-02 05:02:59 +00:00
numeric.requirements Support tests in freestanding 2019-02-04 20:31:13 +00:00
numerics.general Support tests in freestanding 2019-02-04 20:31:13 +00:00
rand [libc++] Remove unused variable warnings 2021-06-03 09:43:08 -04:00