[PATCH] D49813: [libc++] Make <experimental/filesystem> compile with gcc 4.8.5
Victor Zverovich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 25 11:44:54 PDT 2018
vitaut created this revision.
vitaut added a reviewer: EricWF.
Herald added subscribers: ldionne, christof.
This fixes an error when compiling `<experimental/filesystem>` with gcc 4.8.5:
.../libcxx/src/experimental/filesystem/filesystem_common.h:137:34:
error: redeclaration ‘T
std::experimental::filesystem::v1::detail::{anonymous}::error_value() [with T =
bool]’ d
iffers in ‘constexpr’
constexpr bool error_value<bool>() {
^
.../libcxx/src/experimental/filesystem/filesystem_common.h:133:3:
error: from previous declaration ‘T
std::experimental::filesystem::v1::detail::{anonymous}::error_value() [with T
= bool]’
T error_value();
^
Repository:
rCXX libc++
https://reviews.llvm.org/D49813
Files:
src/experimental/filesystem/filesystem_common.h
Index: src/experimental/filesystem/filesystem_common.h
===================================================================
--- src/experimental/filesystem/filesystem_common.h
+++ src/experimental/filesystem/filesystem_common.h
@@ -134,11 +134,11 @@
template <>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void error_value<void>() {}
template <>
-constexpr bool error_value<bool>() {
+bool error_value<bool>() {
return false;
}
template <>
-constexpr uintmax_t error_value<uintmax_t>() {
+uintmax_t error_value<uintmax_t>() {
return uintmax_t(-1);
}
template <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49813.157328.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180725/b41fa37a/attachment.bin>
More information about the cfe-commits
mailing list