Project

General

Profile

Design #1631

Use filesystem::path instead of string (packageDir, CoCoAManFileName)

Added by John Abbott over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
enhancing/improving
Target version:
Start date:
12 Nov 2021
Due date:
% Done:

0%

Estimated time:
Spent time:

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

Related to CoCoA-5 - Bug #1397: Crashes if CoCoAHelp.xml is missingClosed2020-01-21

Related to CoCoALib - Design #1632: C++17: notes about updatingNew2021-11-12

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)

Also available in: Atom PDF