| commit | bb69a8db5da21f3c6b289d010eaa64e757387dca | [log] [tgz] |
|---|---|---|
| author | Antonio Sanchez <cantonios@google.com> | Thu Nov 12 13:12:00 2020 -0800 |
| committer | Antonio Sánchez <cantonios@google.com> | Sat Nov 14 05:50:42 2020 +0000 |
| tree | 960d5e2b32d1bd0bbe016c897c6b3de941f2b7b3 | |
| parent | 90f6d9d23e49143a868a03fea552117c3fceec5a [diff] |
Explicit casts of S -> std::complex<T> When calling `internal::cast<S, std::complex<T>>(x)`, clang often generates an implicit conversion warning due to an implicit cast from type `S` to `T`. This currently affects the following tests: - `basicstuff` - `bfloat16_float` - `cxx11_tensor_casts` The implicit cast leads to widening/narrowing float conversions. Widening warnings only seem to be generated by clang (`-Wdouble-promotion`). To eliminate the warning, we explicitly cast the real-component first from `S` to `T`. We also adjust tests to use `internal::cast` instead of `static_cast` when a complex type may be involved.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.