Skip to content
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

proposal: Recommendation on Class Member Function Declaration #777

Open
lovelxc opened this issue Nov 23, 2024 · 0 comments
Open

proposal: Recommendation on Class Member Function Declaration #777

lovelxc opened this issue Nov 23, 2024 · 0 comments

Comments

@lovelxc
Copy link

lovelxc commented Nov 23, 2024

While reviewing the project code, I noticed that there are cases where class member functions are declared with static inline. However, in modern C++(since C++17), the semantics of inline has changed. For class member functions, simply using static is sufficient to achieve a similar effect and is more concise and in line with modern C++ standards.

For more detailed explanations, please refer to: cppref. It is recommended that developers consider adjusting such declarations in the code to optimize the code structure and adhere to more appropriate programming practices.

@lovelxc lovelxc changed the title Recommendation on Class Member Function Declaration proposal: Recommendation on Class Member Function Declaration Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant