blob: 299ddb732707e0fcb68aee068df6f576cb130deb (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
From 38700e207e076a391f30ef66ad90d03e7543006e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20=C5=A0=C5=A5astn=C3=BD?=
<premysl.stastny@hotmail.com>
Date: Sun, 26 May 2019 18:36:02 +0200
Subject: [PATCH] Solving problem with g++8 and new boost libs:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
osrm-backend/src/storage/io_config.cpp:18:89: error: call of overloaded ‘is_regular_file(<brace-enclosed initializer list>)’ is ambiguous
if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()}))
^
In file included from /usr/local/include/boost/filesystem.hpp:17,
from /home/premy/packages/osrm-backend/include/storage/io_config.hpp:8,
from /home/premy/packages/osrm-backend/src/storage/io_config.cpp:1:
/usr/local/include/boost/filesystem/operations.hpp:473:8: note: candidate: ‘bool boost::filesystem::is_regular_file(const boost::filesystem::path&)’
bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));}
^~~~~~~~~~~~~~~
In file included from /usr/local/include/boost/filesystem.hpp:17,
---
src/storage/io_config.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/storage/io_config.cpp b/src/storage/io_config.cpp
index 82d8a914e3..e100a93174 100644
--- a/src/storage/io_config.cpp
+++ b/src/storage/io_config.cpp
@@ -12,10 +12,12 @@ namespace storage
{
bool IOConfig::IsValid() const
{
+ namespace fs = boost::filesystem;
+
bool success = true;
for (auto &fileName : required_input_files)
{
- if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()}))
+ if (!fs::is_regular_file(fs::status(base_path.string() + fileName.string())))
{
util::Log(logWARNING) << "Missing/Broken File: " << base_path.string()
<< fileName.string();
@@ -24,5 +26,5 @@ bool IOConfig::IsValid() const
}
return success;
}
-}
-}
+} // namespace storage
+} // namespace osrm
|