File: ZXFilesystem.h

package info (click to toggle)
zxing-cpp 1.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,860 kB
  • sloc: cpp: 49,035; python: 150; javascript: 31; makefile: 11
file content (26 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
* Copyright 2019 Axel Waggershauser.
*/
// SPDX-License-Identifier: Apache-2.0

#pragma once

#if __has_include(<filesystem>)
#  include <filesystem>
#  ifdef __cpp_lib_filesystem
     namespace fs = std::filesystem;
#  endif
#endif
#if !defined(__cpp_lib_filesystem) && __has_include(<experimental/filesystem>)
#  include <experimental/filesystem>
#  ifdef __cpp_lib_experimental_filesystem
     namespace fs = std::experimental::filesystem;
#  endif
#endif

#if !defined(__cpp_lib_filesystem) && !defined(__cpp_lib_experimental_filesystem)
#  error need standard filesystem library from c++-17 or the Filesystem TR
#endif

// compiling this with clang (e.g. version 6) might require linking against libc++experimental.a or libc++fs.a.
// E.g.: CMAKE_EXE_LINKER_FLAGS = -L/usr/local/Cellar/llvm/6.0.1/lib -lc++experimental