Design #1631
Use filesystem::path instead of string (packageDir, CoCoAManFileName)
Description
In some files we use std::string
to represent paths to files.
Replace these with values of type filesystem::path
(or boost:filesystem::path
until we move to C++17)
Related issues
History
#1 Updated by John Abbott over 2 years ago
- Related to Bug #1397: Crashes if CoCoAHelp.xml is missing added
#2 Updated by John Abbott over 2 years ago
It seems that filesystem::path
was introduced in C++17.
Anna asks whether we should start compiling with standard C++17 instead of C++14.
The alternative is to use the BOOST impl: this requires writing the prefix boost::
, but is otherwise compatible.
Note that Main.C
includes boost/filesystem.hpp
See also comment 10 in issue #1397
#3 Updated by John Abbott over 2 years ago
- Related to Design #1632: C++17: notes about updating added
#4 Updated by John Abbott over 2 years ago
The global packageDir
should probably also be of type boost::filesystem::path
.
Currently it is std::string
and declared in Interpreter.H
but defined in OnlineHelp.C
(weird?!?)
#5 Updated by Anna Maria Bigatti over 2 years ago
- Subject changed from Use filesystem::path instead of string to Use filesystem::path instead of string (packageDir, CoCoAManFileName)