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
[DoNotMerge][C++Seminar] define all in header file #6629
base: master
Are you sure you want to change the base?
Conversation
To trigger regression tests:
|
|
||
/** @brief Manually fix the seed. */ | ||
static std::optional<uint64_t> manual_seed; | ||
static void SetManualSeed(int64_t seed); | ||
static inline std::optional<uint64_t> manual_seed; |
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 didn't use inline previously, does this change the scope of the variable?
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.
it's for allowing definition within class instead of outside. As for scope, I think every translation unit has the identical instance of ::manual_seed
no matter definitions are in header file or cc file.
Description
What's the problem you hit if this PR is applied? @frozenbugs
Checklist
Please feel free to remove inapplicable items for your PR.
Changes