タグ付けされた質問 「eigen」

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 of overloaded …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.