[Bug libstdc++/113007] `std::variant` converting constructor and `operator=` compile while the C++ Standard says they must not

2023-12-14 Thread paul.skeptic at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113007 --- Comment #7 from Pavel Novikov --- (In reply to Jonathan Wakely from comment #5&6) Got it. Thank you for taking the time to expansively explain what I left out, and confirming my understanding. Now it's time to file a bug in MSVC's standar

[Bug libstdc++/113007] `std::variant` converting constructor and `operator=` compile while the C++ Standard says they must not

2023-12-14 Thread paul.skeptic at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113007 --- Comment #4 from Pavel Novikov --- Interesting. Thank you for explanation. Indeed the standard says all over that narrowing conversion in initialization is prohibited, though this code compiles: int i = 42; bool b[] = {i}; // narrow

[Bug libstdc++/113007] New: `std::variant` converting constructor and `operator=` compile while the C++ Standard says they must not

2023-12-13 Thread paul.skeptic at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113007 Bug ID: 113007 Summary: `std::variant` converting constructor and `operator=` compile while the C++ Standard says they must not Product: gcc Version: 13.2.1 Status: UNCO