const char* cannot be used as a constant value for std::char_traits::length

前端 未结 0 330
感情败类
感情败类 2021-01-16 15:28

I have the following code:

constexpr uint32_t countWords(const char* str) {
    constexpr std::size_t length = std::char_traits::length(str);
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题