I tried this, and finally I have a solution.
The basic idea is:
Try latest mingw64 distribution for compilation for availability of latest c++2a support.
Try Code::Blocks mingw64 distribution for debugging with an older gdb.
Do the above, the same time.
- Download latest mingw64 g++(10.1) and gdb(9.1) for windows from here:
www.winlibs.com (sorry for ad, but I use that version of mingw64).
- This version has gdb(9.1) compiled without python support.
- Place that mingw64 distribution on c:\program files\mingw64
- Download latest Code::Blocks with mingw64 which has g++(8.1) and gdb(8.1).
- This version has gdb(8.1) compiled with python support.
- Place that mingw64 distribution on c:\program files\mingw
- Use for compilation g++(10.1) from c:\program files\mingw64 distribution
- Use for debugging gdb(8.1) from c:\program files\mingw distribution, but first place "source $(TARGET_COMPILER_DIR)etc\gdbinit" on debugger initialization commands,as previous posts stated.