constexpr does not imply inline for non-static variables (C++17 inline variables)
While constexpr does imply inline for functions, it does not have that effect for non-static variables, considering C++17 inline variables.
익명(175.223)2019-12-10 17:41
답글
accepted된 constexpr 함수에 대한거 말고 그 밑에 inline 변수의 경우에 대해 설명한거 읽어보삼
익명(175.223)2019-12-10 17:42
constexpr을 써도 되는 상황에서는 inline 안붙여도 되는게 보통이자 (o) constexpr이면 무조건 inline이다 (x)
https://stackoverflow.com/questions/14391272/does-constexpr-imply-inline
constexpr does not imply inline for non-static variables (C++17 inline variables) While constexpr does imply inline for functions, it does not have that effect for non-static variables, considering C++17 inline variables.
accepted된 constexpr 함수에 대한거 말고 그 밑에 inline 변수의 경우에 대해 설명한거 읽어보삼
constexpr을 써도 되는 상황에서는 inline 안붙여도 되는게 보통이자 (o) constexpr이면 무조건 inline이다 (x)
보통이라고 쓴 이유는 외부링크 가져야만 하는 경우가 있어서
https://higaski.at/constexpr-does-not-imply-inline/