lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master c0c53dd 2/2: Add 'constexpr' for C++17 only


From: Greg Chicares
Subject: [lmi-commits] [lmi] master c0c53dd 2/2: Add 'constexpr' for C++17 only
Date: Sun, 19 Mar 2017 12:16:28 -0400 (EDT)

branch: master
commit c0c53dd0248f2b4212979cf74f9b861789671813
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Add 'constexpr' for C++17 only
    
    See:
      http://lists.nongnu.org/archive/html/lmi/2017-03/msg00104.html
---
 bourn_cast.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bourn_cast.hpp b/bourn_cast.hpp
index 293afdd..3703b1f 100644
--- a/bourn_cast.hpp
+++ b/bourn_cast.hpp
@@ -70,6 +70,9 @@
 /// which may be an independent redesign.
 
 template<typename To, typename From>
+#if 201402L < __cplusplus
+constexpr
+#endif // 201402L < __cplusplus
 inline To bourn_cast(From from)
 {
     using to_traits   = std::numeric_limits<To>;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]