| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Taken from cppcheck-opensource/cppcheck#4785. |
Sorry, something went wrong.
|
I might spin out the class into a separate repo (as public domain) as this seems like something useful in general. |
Sorry, something went wrong.
|
This fails to compile with GCC before 15: simplecpp.cpp:1742:37: error: operands to ‘?:’ have different types ‘const simplecpp::constness_ptr<simplecpp::Token>’ and ‘std::nullptr_t’
1742 | valueToken = argtok ? argtok->next : nullptr;
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
And with Visual Studio: 6>C:\a\simplecpp\simplecpp\simplecpp.cpp(1742,54): error C2446: ':': no conversion from 'nullptr' to 'const simplecpp::constness_ptr<simplecpp::Token>' [C:\a\simplecpp\simplecpp\simplecpp_obj.vcxproj]
C:\a\simplecpp\simplecpp\simplecpp.cpp(1742,54):
Constructor for class 'simplecpp::constness_ptr<simplecpp::Token>' is declared 'explicit'
|
Sorry, something went wrong.
|
We do not actually need to actually implement the class. As this is a compile-time check it would be enough to have a simple wrapper which does nothing and having a compile-time switch which makes it an alias for std::experimental::propagate_const. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.