[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [lmi-commits] master 5c6922b 4/6: Replace boost::optional with
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] [lmi-commits] master 5c6922b 4/6: Replace boost::optional with std::experimental::optional |
Date: |
Sat, 24 Feb 2018 23:37:26 +0100 |
On Sat, 24 Feb 2018 17:26:45 -0500 (EST) Greg Chicares <address@hidden> wrote:
GC> branch: master
GC> commit 5c6922b57266fd496176ce47b8cda5e787e57d02
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC>
GC> Replace boost::optional with std::experimental::optional
I have to apply the following patch to compile this code with MSVS 2017:
---------------------------------- >8 --------------------------------------
diff --git a/rate_table.cpp b/rate_table.cpp
index 49f85f160..71d6d7b1e 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -49,8 +49,13 @@
#include <stdexcept>
#include <utility> // make_pair(), swap()
+#ifdef _MSC_VER
+#include <optional>
+namespace Exp { using std::optional; }
+#else
#include <experimental/optional>
namespace Exp {using std::experimental::optional;}
+#endif
// Note about error handling in this code: with a few exceptions (e.g.
// strict_parse_number), most of the functions in this file throw on error.
---------------------------------- >8 --------------------------------------
I can/will submit it as a PR if you agree, but I'd also like to know
what's the advantage of using this "Exp" namespace rather just bringing
std::experimental::optional in the global namespace itself?
VZ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [lmi] [lmi-commits] master 5c6922b 4/6: Replace boost::optional with std::experimental::optional,
Vadim Zeitlin <=