Questions tagged «eigen3»

4
使用非布尔返回值重载相等比较时,C ++ 20中的更改中断还是clang-trunk / gcc-trunk中的回归?
以下代码在c ++ 17模式下使用clang-trunk可以正常编译,但在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{}); } 它还可以使用gcc-trunk或clang-9.0.0进行编译:https : //godbolt.org/z/8GGT78 clang-trunk和错误-std=c++2a: <source>:12:19: error: use …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.