Commit 5ced6fe799e5ec8ee5ecbc8b20220f5ffd606fac

Authored by Jordi Inglada
1 parent a4e471c9
Exists in master

Check gcc 82 for filesystem

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
include/cbutils.h
... ... @@ -31,6 +31,7 @@
31 31 #if __GNUC__ == 8
32 32 #if __GNUC_MINOR__ == 2
33 33 #include <filesystem>
  34 +#define GCC82
34 35 #else
35 36 #include <experimental/filesystem>
36 37 #endif
... ... @@ -91,7 +92,11 @@ bool contains(std::string s, std::vector&lt;std::string&gt; patterns)
91 92 // ----------------- File IO ---------------------------------------------------
92 93 namespace file
93 94 {
  95 +#ifndef GCC82
94 96 namespace fs = std::experimental::filesystem;
  97 +#else
  98 +namespace fs = std::filesystem;
  99 +#endif
95 100 //Reads a text file and returns a vector of lines
96 101 std::vector<std::string> read_lines(const std::string& fname)
97 102 {
... ...