Author Topic: Change to C++17?  (Read 97 times)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1915
Change to C++17?
« on: Today at 02:04:03 pm »
There is an updated version of astyle library (3.6.18) that fixes some issues (see ticket 1643, but it uses the stupid C++17-only std::string_view and we currently are using C++11.

There is also some C++17-only code, like [fallthrough] in clangd_client, generating warnings.

Should we change to C++17?

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 604
  • L'ami de l'homme. The friend of man.
    • LETARTARE
Re: Change to C++17?
« Reply #1 on: Today at 03:03:09 pm »
Have you tried to compile the full version with C++17 (Win-xx, Linux-xx) ?
If so, what warnings have you obtained ?
CB-14011, plugins-sdk-2.26.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 604
  • L'ami de l'homme. The friend of man.
    • LETARTARE
Re: Change to C++17?
« Reply #2 on: Today at 03:18:30 pm »
Leap-15.6-64bits, wx-3.2.8;gtk3-u, gc-15.2
'r14003.cbp' ( no 'contrib' )
Here is the compilation log with 'C++17' :
CB-14011, plugins-sdk-2.26.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1915
Re: Change to C++17?
« Reply #3 on: Today at 04:38:02 pm »
Quote
Have you tried to compile the full version with C++17

I have not tried, developers must agree on the change beforehand. Changing the CBP is easy, the problem may come later from autotools.

Errors in Squirrel can be fixed, but it uses tricky memory accesses that may be a headache.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 865
Re: Change to C++17?
« Reply #4 on: Today at 05:49:27 pm »
Just to inform you that with my CodeBlocks_Windows.workspace, and setting my global variable cb_build.cpp_std to gnu++20, codeblocks compiles correctly as far as I have tested. Of course, this does not cover all build methods.
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.3, Msys2 Compilers 16.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).