qt/component.h has a function named 'requires'. When including this header in a project that is building with C++20 this will result in a compile error since requires is a reserved keyword in C++20
In file included from /usr/include/AppStreamQt/pool.h:28,
from /home/nico/kde/src/plasma-workspace/applets/kicker/plugin/actionlist.cpp:45:
/usr/include/AppStreamQt/component.h:195:36: error: expected unqualified-id before 'requires'
195 | QList<AppStream::Relation> requires() const;
The text was updated successfully, but these errors were encountered:
good question. I'd say we introduce a new alternative name, mark the old one as deprecated and ifdef the old one out when building against C++20. People upgrading to C++20 are going to have a breakage, but that way we'd avoid/postpone the breakage for people with older C++
In C++20 requires is a reserved keyword
This results in a build failure when a C++20 project includes component.h
To avoid the issue the method gets a new name (requiresComponents). The old method is marked as deprecated and hidden when building in C++20 mode
Fixesximion#342
In C++20 requires is a reserved keyword
This results in a build failure when a C++20 project includes component.h
To avoid the issue the method gets a new name (requirements). The old method is marked as deprecated and hidden when building in C++20 mode
Fixesximion#342
qt/component.h has a function named 'requires'. When including this header in a project that is building with C++20 this will result in a compile error since requires is a reserved keyword in C++20
The text was updated successfully, but these errors were encountered: