[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 --- Comment #8 from Jonathan Wakely --- G++ allowed it because the mismatch was in a system header. If you use -Wsystem-headers then GCC 9.1 gives a warning about it: /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant: In instantiation of 'class std::variant': var.cc:14:44: required from here /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant:1559:34: warning: declaration of 'template constexpr decltype(auto) std::__detail::__variant::__get(_Vp&&)' has a different exception specifier [-Wsystem-headers] 1559 | friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& __v); | ^~~~ /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant:263:5: note: from previous declaration 'template constexpr decltype(auto) std::__detail::__variant::__get(_Variant&&) noexcept' 263 | __get(_Variant&& __v) noexcept | ^ If you use -pedantic-errors then you get an error.
[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 Evgeniy Dushistov changed: What|Removed |Added CC||dushistov at mail dot ru --- Comment #7 from Evgeniy Dushistov --- But, what about bug in gcc by itself, because of it doesn't report compile error, is it reported as one more bug?
[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Jonathan Wakely --- fixed on trunk and gcc-9-branch
[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 --- Comment #5 from Jonathan Wakely --- Author: redi Date: Fri May 10 22:23:10 2019 New Revision: 271083 URL: https://gcc.gnu.org/viewcvs?rev=271083&root=gcc&view=rev Log: PR libstdc++/90397 fix std::variant friend declaration Clang diagnoses insert inconsistent noexcept-specifier on the friend declaration of __get. Add . PR libstdc++/90397 * include/std/variant (variant): Add noexcept to friend declaration. Modified: branches/gcc-9-branch/libstdc++-v3/ChangeLog branches/gcc-9-branch/libstdc++-v3/include/std/variant
[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 --- Comment #4 from Jonathan Wakely --- Author: redi Date: Fri May 10 21:41:19 2019 New Revision: 271079 URL: https://gcc.gnu.org/viewcvs?rev=271079&root=gcc&view=rev Log: PR libstdc++/90397 fix std::variant friend declarations Clang diagnoses the inconsistent noexcept-specifier on the friend declaration of __get. Add it, and also on __get_storage. PR libstdc++/90397 * include/std/variant (_Variant_storage::_M_storage()) (_Variant_storage::_M_reset())) (_Variant_storage::_M_storage())): Add noexcept. (__get_storage): Likewise. (variant): Add noexcept to friend declarations for __get and __get_storage. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/std/variant
[Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90397 --- Comment #3 from philip.salvaggio at mac dot com --- Yep! I added the noexcept on there on my local version and that also resolved the issue.