Skip to content

Commit eea0f93

Browse files
dzzz2001claude
andauthored
Fix C++17 inline constexpr to support C++11 (#6957)
Replace `inline constexpr` with `static constexpr` in ylmcoef.h to eliminate C++17 dependency, as the project only supports up to C++11. Closes #6956 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8929b2d commit eea0f93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/source_base/ylmcoef.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ constexpr int YLMCOEF_SIZE = 36;
1212
// GPU version: must use numeric constants (CUDA doesn't support runtime init for __device__)
1313
__device__ static const double ylmcoef[YLMCOEF_SIZE] = {
1414
#else
15-
inline constexpr double ylmcoef[YLMCOEF_SIZE] = {
15+
// Use static constexpr for C++11 compatibility (inline variables require C++17)
16+
static constexpr double ylmcoef[YLMCOEF_SIZE] = {
1617
#endif
1718
0.28209479177387813964, // 1.0 / sqrt(ModuleBase::FOUR_PI)
1819
0.48860251190291992263, // sqrt (3.0 / ModuleBase::FOUR_PI)

0 commit comments

Comments
 (0)