คำถามติดแท็ก eigen

4
การเปลี่ยนแปลงที่เปลี่ยนแปลงใน C ++ 20 หรือการถดถอยใน clang-trunk / gcc-trunk เมื่อทำการโอเวอร์โหลดการเปรียบเทียบความเท่าเทียมกันกับค่าตอบแทนที่ไม่ใช่บูลีน?
รหัสต่อไปนี้รวบรวมดีกับ clang-trunk ในโหมด c ++ 17 แต่แบ่งในโหมด c ++ 2a (c ++ 20 ที่กำลังมาถึง): // Meta struct describing the result of a comparison struct Meta {}; struct Foo { Meta operator==(const Foo&) {return Meta{};} Meta operator!=(const Foo&) {return Meta{};} }; int main() { Meta res = (Foo{} != Foo{}); } …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.