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 <>


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 <>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to