Re: gcc 11 compatibility?



Thanks! I have manually changed all the bad constructors in those header files, and it works now. Hope the next release of glibmm will include those fixes in the repository :D

On 5/19/21 1:18 AM, Kjell Ahlstedt wrote:
Den 2021-05-18 kl. 17:51, skrev Mike Liao via gtkmm-list:
I've recently updated my gcc to version 11, and I can't compile my project under thec++20 standard.

Here is part of the errors gcc reports:

/usr/include/glibmm-2.68/glibmm/variant.h:910:24: error: expected unqualified-id before ‘)’ token
  910 |   Variant<VariantBase>();
      |                        ^
/usr/include/glibmm-2.68/glibmm/variant.h:971:25: error: expected unqualified-id before ‘)’ token
  971 |   Variant< Variant<T> >();
      |                         ^
/
Does this have anything to do with some new rules introduced in c++20?

Yes, C++20 is stricter in some  respects, and gcc 11 is more C++20 compliant than gcc 10. Glib::Variant has been updated in the git repository, but not yet in any released version of glibmm. See https://gitlab.gnome.org/GNOME/glibmm/-/merge_requests/50



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]