microsoft / GSL

Guidelines Support Library
Other
6.14k stars 738 forks source link

Resolve MSVC warning C5260 #1049

Closed dmitrykobets-msft closed 2 years ago

dmitrykobets-msft commented 2 years ago

MSVC warning C5260 says namespace-scope constexpr variables should be marked inline or static for C++20 header units. ("warning C5260: the constant variable 'X' has internal linkage in an included header file context, but external linkage in imported header unit context; consider declaring it 'inline' as well if it will be shared across translation units, or 'static' to express intent to use it local to this translation unit").