digitalmars.D.learn - A small difference between cdouble and std.complex
- bearophile (18/18) Nov 18 2013 This shows a difference between the deprecated built-in complex
This shows a difference between the deprecated built-in complex numbers and std.complex: void main() { import std.complex: complex; const cdouble cd; pragma(msg, typeof(cd.re)); const acc = complex(1, 2); pragma(msg, typeof(acc.re)); } It prints: double const(double) Is such difference important and worth fixing? It has caused a small problem when I have ported some code from cdouble to Complex, that contained typeof(data[0].re) where data was a cdouble[]. Bye, bearophile
Nov 18 2013