fs/Traits: add macro PATH_LITERAL()
This commit is contained in:
@@ -41,12 +41,12 @@ namespace FOpenMode {
|
||||
/**
|
||||
* Open mode for writing text files.
|
||||
*/
|
||||
constexpr PathTraitsFS::const_pointer WriteText = "w";
|
||||
constexpr PathTraitsFS::const_pointer WriteText = PATH_LITERAL("w");
|
||||
|
||||
/**
|
||||
* Open mode for appending text files.
|
||||
*/
|
||||
constexpr PathTraitsFS::const_pointer AppendText = "a";
|
||||
constexpr PathTraitsFS::const_pointer AppendText = PATH_LITERAL("a");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define PATH_LITERAL(s) (s)
|
||||
|
||||
/**
|
||||
* This class describes the nature of a native filesystem path.
|
||||
*/
|
||||
@@ -48,7 +50,7 @@ struct PathTraitsFS {
|
||||
static constexpr value_type SEPARATOR = '/';
|
||||
#endif
|
||||
|
||||
static constexpr const_pointer CURRENT_DIRECTORY = ".";
|
||||
static constexpr const_pointer CURRENT_DIRECTORY = PATH_LITERAL(".");
|
||||
|
||||
static constexpr bool IsSeparator(value_type ch) {
|
||||
return
|
||||
|
Reference in New Issue
Block a user