simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

ambiguous `simplecpp::TokenList` constructors with >= C++17

Open firewave opened this issue 1 month ago • 0 comments

Calling simplecpp::TokenList with a char buffer will lead to a compilation failure because of ambiguous constructors:

/home/user/CLionProjects/cppcheck/externals/simplecpp/./simplecpp.h:254:9: note: candidate constructor
  254 |         TokenList(std::string_view data, std::vector<std::string> &filenames, const std::string &filename=std::string(), OutputList *outputList = nullptr)
      |         ^
/home/user/CLionProjects/cppcheck/externals/simplecpp/./simplecpp.h:271:9: note: candidate constructor
  271 |         TokenList(const std::string &filename, std::vector<std::string> &filenames, OutputList *outputList = nullptr);
      |         ^

Fixing #424 might make this more explicit when we no longer allow the filename to be provided via the vector and the explicit parameter.

firewave avatar Nov 13 '25 17:11 firewave