Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:02

0001 //
0002 // Copyright 2022 Mateusz Loskot <mateusz at loskot dot net>
0003 //
0004 // Distributed under the Boost Software License, Version 1.0
0005 // See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt
0007 //
0008 #ifndef BOOST_GIL_IO_DETAIL_FILESYSTEM_HPP
0009 #define BOOST_GIL_IO_DETAIL_FILESYSTEM_HPP
0010 
0011 #include <boost/config.hpp>
0012 
0013 #if !defined(BOOST_GIL_IO_USE_BOOST_FILESYSTEM) && !defined(BOOST_NO_CXX17_HDR_FILESYSTEM)
0014 #if defined(__cpp_lib_filesystem)
0015 #include <filesystem>
0016 #define BOOST_GIL_IO_USE_STD_FILESYSTEM
0017 #elif defined(__cpp_lib_experimental_filesystem)
0018 #include <experimental/filesystem>
0019 #define BOOST_GIL_IO_USE_STD_FILESYSTEM
0020 #define BOOST_GIL_IO_USE_STD_EXPERIMENTAL_FILESYSTEM
0021 #endif
0022 #endif // !BOOST_GIL_IO_USE_BOOST_FILESYSTEM && !BOOST_NO_CXX17_HDR_FILESYSTEM
0023 
0024 #if !defined(BOOST_GIL_IO_USE_STD_FILESYSTEM)
0025 // Disable warning: conversion to 'std::atomic<int>::__integral_type {aka int}' from 'long int' may alter its value
0026 #if defined(BOOST_CLANG)
0027 #pragma clang diagnostic push
0028 #pragma clang diagnostic ignored "-Wshorten-64-to-32"
0029 #endif
0030 
0031 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0032 #pragma GCC diagnostic push
0033 #pragma GCC diagnostic ignored "-Wconversion"
0034 #endif
0035 
0036 #define BOOST_FILESYSTEM_VERSION 3
0037 #include <boost/filesystem.hpp>
0038 #define BOOST_GIL_IO_USE_BOOST_FILESYSTEM
0039 
0040 #if defined(BOOST_CLANG)
0041 #pragma clang diagnostic pop
0042 #endif
0043 
0044 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
0045 #pragma GCC diagnostic pop
0046 #endif
0047 
0048 #endif
0049 
0050 namespace boost { namespace gil { namespace detail {
0051 
0052 #if defined(BOOST_GIL_IO_USE_STD_EXPERIMENTAL_FILESYSTEM)
0053 namespace filesystem = std::experimental::filesystem;
0054 #elif defined(BOOST_GIL_IO_USE_STD_FILESYSTEM)
0055 namespace filesystem = std::filesystem;
0056 #else
0057 #if !defined(BOOST_GIL_IO_USE_BOOST_FILESYSTEM)
0058 #error "Boost.Filesystem is required if C++17 <filesystem> is not available"
0059 #endif
0060 namespace filesystem = boost::filesystem;
0061 #endif
0062 
0063 }}} // namespace boost::gil::detail
0064 
0065 #endif