From d77f3ef4a4e7de3c2e926ee6faa4c6942fa2c657 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 25 Jul 2018 21:01:45 +0000 Subject: [PATCH] Make compile with gcc 4.8.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Victor Zverovich. This fixes an error when compiling `` 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() { ^ .../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(); ^ ``` Reviewed as https://reviews.llvm.org/D49813 llvm-svn: 337962 --- libcxx/src/experimental/filesystem/filesystem_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/src/experimental/filesystem/filesystem_common.h b/libcxx/src/experimental/filesystem/filesystem_common.h index 7be167460161..43453a0ad0a4 100644 --- a/libcxx/src/experimental/filesystem/filesystem_common.h +++ b/libcxx/src/experimental/filesystem/filesystem_common.h @@ -118,11 +118,11 @@ T error_value(); template <> _LIBCPP_CONSTEXPR_AFTER_CXX11 void error_value() {} template <> -constexpr bool error_value() { +bool error_value() { return false; } template <> -constexpr uintmax_t error_value() { +uintmax_t error_value() { return uintmax_t(-1); } template <>