[vlc-commits] Fix a few MSVC specific conditions

Hugo Beauzée-Luyssen git at videolan.org
Mon May 18 00:26:09 CEST 2015


libvlcpp | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon May 18 00:23:50 2015 +0200| [27bbfad9c2a9c0680ad9a965dd8f2f867eb31164] | committer: Hugo Beauzée-Luyssen

Fix a few MSVC specific conditions

VS2015 (partially) supports constexpr

> http://git.videolan.org/gitweb.cgi/libvlcpp.git/?a=commit;h=27bbfad9c2a9c0680ad9a965dd8f2f867eb31164
---

 vlcpp/Media.hpp  |    2 +-
 vlcpp/common.hpp |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlcpp/Media.hpp b/vlcpp/Media.hpp
index e10d44a..4aa0be3 100644
--- a/vlcpp/Media.hpp
+++ b/vlcpp/Media.hpp
@@ -46,7 +46,7 @@ private:
         Seek,
         Close,
     };
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
     static constexpr unsigned int NbEvents = 4;
 #else
     static const unsigned int NbEvents = 4;
diff --git a/vlcpp/common.hpp b/vlcpp/common.hpp
index a514af6..df21975 100644
--- a/vlcpp/common.hpp
+++ b/vlcpp/common.hpp
@@ -231,7 +231,7 @@ namespace VLC
         template <typename OpenCb, BoxingStrategy Strategy_>
         struct GuessBoxingStrategy
         {
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
             static constexpr BoxingStrategy Strategy = Strategy_;
 #else
             static const BoxingStrategy Strategy = Strategy_;
@@ -243,7 +243,7 @@ namespace VLC
         template <BoxingStrategy Strategy_>
         struct GuessBoxingStrategy<std::nullptr_t, Strategy_>
         {
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
             static constexpr BoxingStrategy Strategy = BoxingStrategy::None;
 #else
             static const BoxingStrategy Strategy = BoxingStrategy::None;



More information about the vlc-commits mailing list