On Wednesday, 19 September 2018 at 00:05:15 UTC, Jonathan M Davis
wrote:
On Tuesday, September 18, 2018 10:58:39 AM MDT aliak via
Digitalmars-d- announce wrote:
This will break compilation of current code that has an
explicit copy constructor, and the fix is simply to add the
attribute @implicit.
In that case, why not just use a transitional compiler switch?
Why force everyone to mark their copy constructors with
@implicit forever? The whole point of adding the attribute was
to avoid breaking existing code.
- Jonathan M Davis
What about a command-line switch that just detects copy
constructors?
LLVM 8 supposedly has a new feature which breaks compatibility
for casts from float -> int:
Floating-point casts—converting a floating point number to an
integer by discarding the data after the decimal—has been
optimized, but in a way that might cause problems for developers
who rely on undefined behavior around this feature. Clang has a
new command-line switch to detect this issue.
Could we do copy-constructors in a similar way?