GPSBabel / gpsbabel

GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers. Open Source and supported on MacOS, Windows, Linux, and more. Pointy clicky GUI or a command line version...
https://www.gpsbabel.org
GNU General Public License v2.0
470 stars 125 forks source link

Testing of various C++20 features #1207

Closed robertlipe closed 2 weeks ago

robertlipe commented 9 months ago

A little bit of everything just to see how well C++20 is supported. This is just a few commits for each major feature. If there's anything useful in this PR, I expect to have to pick it apart and cherry pick as I can't imagine this whole PR going in as one.

See related discussion on #1204.

tsteven4 commented 9 months ago

You had a bad merge on xcsv.cc. I think this is what you meant: xcsv.zip

tsteven4 commented 9 months ago

With the xcsv.cc I attached above, and actually including <format> after testing for it, on visual studio I get down to 7 errors, all in the MS supplied format include.

Severity    Code    Description Project File    Line    Suppression State
Error   C2338   static_assert failed: 'Cannot format an argument. To make type T formattable, provide a formatter<T> specialization. See N4928 [format.arg.store]/2 and [formatter.requirements].'  C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3648    
Error   C2665   'std::_Format_arg_traits<_Context>::_Phony_basic_format_arg_constructor': no overloaded function could convert all the argument types   C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    1873    
Error   C2993   'unknown-type': is not a valid type for non-type template parameter '_Test' C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3430    
Error   C2641   cannot deduce template arguments for 'std::formatter'   C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3432    
Error   C2783   'std::formatter<_Ty,_CharT> std::formatter(void)': could not deduce template argument for '_Ty' C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3432    
Error   C2780   'std::formatter<_Ty,_CharT> std::formatter(std::formatter<_Ty,_CharT>)': expects 1 arguments - 0 provided   C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3432    
Error   C2039   'parse': is not a member of 'std::formatter'    C:\Users\tstev\Source\Repos\upstream\out\build\x64-Debug\upstream   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\format    3433    
robertlipe commented 2 weeks ago

Actually, after I finally got through the merge noise in all this and could whwat was outstatnding, there's nothing to see here.

c++20, it is. Case closed.