개발/C++

[정적분석] Misra Rule-15_5_3 This function call in namespace scope may cause the program to terminate.Security Problems

heidiee 2024. 7. 2. 11:51
std::optional<std::string> convertUserKey(const std::string_view& key,  std::string userId = "") const;

 

이런 코드에서 userId를 정의한 부분에 Misra 에러가 발생했다.

noexcept  를 넣으면 해결이 될까?