Skip to content

Commit

Permalink
General cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSonzogni committed Jun 29, 2024
1 parent 7e65204 commit c94b4e3
Show file tree
Hide file tree
Showing 19 changed files with 628 additions and 639 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ option(DIAGON_UBSAN "Set to ON to enable undefined behavior sanitizer" OFF)

include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

#-------------------------------------------------------------------------------

Expand Down
58 changes: 29 additions & 29 deletions src/filesystem.hpp
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
#if defined(__cpp_lib_filesystem)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#elif defined(__cpp_lib_experimental_filesystem)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#elif !defined(__has_include)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#elif __has_include(<filesystem>)
#ifdef _MSC_VER
#if __has_include(<yvals_core.h>)
#include <yvals_core.h>
#if defined(_HAS_CXX17) && _HAS_CXX17
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#endif
#endif
#if defined(__cpp_lib_filesystem)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#elif defined(__cpp_lib_experimental_filesystem)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#elif !defined(__has_include)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#elif __has_include(<filesystem>)
#ifdef _MSC_VER
#if __has_include(<yvals_core.h>)
#include <yvals_core.h>
#if defined(_HAS_CXX17) && _HAS_CXX17
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#endif
#endif

#ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#endif
#ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#endif

#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#endif
#elif __has_include(<experimental/filesystem>)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#else
#error Could not find system header "<filesystem>" or "<experimental/filesystem>"
#endif
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
#endif
#elif __has_include(<experimental/filesystem>)
#define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
#else
#error Could not find system header "<filesystem>" or "<experimental/filesystem>"
#endif

#if INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
#include <experimental/filesystem>
#if INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
#include <experimental/filesystem>

namespace std {
namespace filesystem = experimental::filesystem;
}

#else
#include <filesystem>
#endif
#else
#include <filesystem>
#endif
#endif
Loading

0 comments on commit c94b4e3

Please sign in to comment.