diff --git a/Documentation/development/technical_todo.md b/Documentation/development/technical_todo.md index a57a12bb4e..cbd3e5a56e 100644 --- a/Documentation/development/technical_todo.md +++ b/Documentation/development/technical_todo.md @@ -29,6 +29,9 @@ the version switch exists and can be tidied. ## C++14 {#todo_cpp_14} +This C++ standard version is already used by KiCad on the development branch, but much code +that pre-dates this version can be tidied. + Compiler support: * GCC: complete by GCC 5: [GCC C++14 support](https://gcc.gnu.org/projects/cxx-status.html#cxx14). @@ -48,6 +51,12 @@ Provides: can replace `boost::filesystem` and the Boost dependency can be dropped entirely from the CMake files. + +## C++20 {#todo_cpp_20} + +* `constexpr std::string` and `constexpr std::vector` can be used to initialize items: + * File extensions in `wildcards_and_files_ext.h` + # Compilers {#compilers} Some compilers have bugs or limitations to C++ standard support. diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index ac11afacdc..f51c4f70f0 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -91,10 +91,11 @@ enum { static const std::map& fileTypes() { /* - * This is wrapped inside a function to prevent a static initialization order fiasco with the file extension - * variables. Once C++20 is allowed in KiCad code, those file extensions can be made constexpr and this can - * be removed from a function call and placed in the file normally. - */ + * TODO(C++20): Clean this up + * This is wrapped inside a function to prevent a static initialization order fiasco with the file extension + * variables. Once C++20 is allowed in KiCad code, those file extensions can be made constexpr and this can + * be removed from a function call and placed in the file normally. + */ static const std::map fileTypes = { { ID_PANEL_FPLIB_ADD_KICADMOD, { "KiCad (folder with .kicad_mod files)", "", KiCadFootprintFileExtension, false, IO_MGR::KICAD_SEXP } },