mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
The current implementation of `complex<_Tp>` assumes that int `int` is implicitly convertible to `_Tp`, e.g., when using `complex<_Tp>(1)`. This patch transforms the implicit conversions into explicit type casts. As a result, `std::complex` is now able to support more types. One example is the type `Eigen::Half` from https://eigen.tuxfamily.org/dox-devel/Half_8h_source.html which does not implement implicit type conversions. libstdc++-v3/ChangeLog: * include/std/complex (polar, __complex_sqrt, pow) (__complex_pow_unsigned): Use explicit conversions from int to the complex value_type.
file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory. It contains brief building instructions and notes on how to configure the library in interesting ways.