-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: yet another C++20 migration #2341
Conversation
i hate c++ |
0c0ee58
to
3956633
Compare
|
yes. I had to add
I'm suspecting it's related to gradle, investigating
could you clarify? should i downgrade the requirement to macOS 11?
should i add build matrix target or ask for help to other windows users? i'm unable to access windows atm
do you mean the auto returns? |
I was concerned about dropping support for osx 11, which people still may be using, but our download stats show up as single digits for OSX, and there's no way to tell which exact versions people use, so I guess it doesn't matter much...
Cygwin can be fixed at a later time if needed then, it's rather obscure and usually works as long as the MSYS build works. MXE build doesn't need Windows to compile: it's a cross-build from Linux, and can be tested on Github by enabling actions in settings of a BN fork and then pushing to Cataclysm-BN/.github/workflows/release.yml Lines 87 to 100 in 8761440
I meant as in moving to other formatting tools that support the spaceship operator, like |
i see. i think we could wait until astyle 3.2 (which supports spaceship operator) , and until then ignore those lines since we won't be using spaceship operator more than 10 times. as for the android build failure, this looks like due to outdated gradle version. |
c0c78b1
to
91233b5
Compare
NUM_SEASONS ) ) % NUM_SEASONS; | ||
const size_t next_season = ( current_season + 1 ) % NUM_SEASONS; | ||
num_seasons ) ) % num_seasons; | ||
const size_t next_season = ( current_season + 1 ) % num_seasons; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to %
unsigned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess it's okay, as divider(num_seasons) is 4. i could change them to int.
90f4c29
to
f24a9a0
Compare
(copied from discord) possible solution:
|
also 1) fix incomplete achievement_requirement 2) remove user defined copy constructor: error: definition of implicit copy assignment operator for 'point_with_value' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy] Co-authored-by: AngelicosPhosphoros <[email protected]>
cannot use spaceship operator until llvm/llvm-project#43670
1. add `concepts_utility.h` for storing useful concepts related headers. 2. uses `Arithmatic` concepts to ensure they're numbers. 3. uses spaceship operator for comparison. 4. uses auto and arrow returns to make templates readable. 5. make fabs and fmod constexpr. Co-authored-by: Coolthulhu <[email protected]>
it works as a false positive on spaceship operators `<=>`
Co-authored-by: Brett Dong <[email protected]>
fixed by using legacy comparison operators clang-tidy 12 used by cata-clang-tidy cannot handle spaceship operator see: cataclysmbnteam#2341 (comment)
used old operators again, confirmed it compiles in clang++ |
oh it's no use trying to remove
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is still stuck on the tidy plugin, we could try porting DDA's migration to LLVM 16
CleverRaven/Cataclysm-DDA#65381
At the very least, this would simplify our tidy workflow since clang-tidy-16 supports plugins "out of the box" (we don't have to compile a hacked version for local testing).
closing as this is stuck on #3028 which also is unlikely to be merged in near future |
Summary
SUMMARY: Build "Migrate to C++20"
Purpose of change
continuation of #1624 and #2003
Describe the solution
quantity<V, U>
using c++20 features (concept, <=>)Todos