Complete exercises 00-33 - #105
Open
aoshuo-tian wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
完成 learning-cxx exercises 00-33。
特殊说明:
exercise05 按题意移除了第二个 constexpr。由于朴素递归计算 fibonacci(90) 的运行时间过长,进一步将 ANS_N 从 90 调整为 20,以确保本地测试和 CI 能够在合理时间内完成。
exercise26 中 sizeof(std::vector) 的结果与编译器和标准库实现有关。代码根据编译环境设置预期值:Windows/MSVC 使用 32,Ubuntu CI 使用 40,从而兼容两个平台的测试。
CI 测试结果
GitHub Actions 已在 Ubuntu 和 Windows 环境中运行成功:
查看成功的 CI 运行记录
本地执行
xmake run summary的结果为:34/34全部通过。