Add Visual Studio 2015 support

This commit is contained in:
Dainis Jonitis
2015-08-11 09:46:17 +03:00
parent 091715671c
commit 8f8d1800bd
2 changed files with 7 additions and 6 deletions

View File

@@ -71,11 +71,11 @@ namespace type {
template< std::size_t I>
typename tuple_element<I, base >::type&
get() { return std::get<I>(*this); }
get() & { return std::get<I>(*this); }
template< std::size_t I>
typename tuple_element<I, base >::type const&
get() const { return std::get<I>(*this); }
get() const& { return std::get<I>(*this); }
template< std::size_t I>
typename tuple_element<I, base >::type&&

View File

@@ -21,10 +21,11 @@
#include "msgpack/versioning.hpp"
#if !defined(MSGPACK_USE_CPP03)
// If MSVC would support C++11 completely,
// then 'defined(_MSC_VER)' would replace with
// '_MSC_VER < XXXX'
# if (__cplusplus < 201103L) || defined(_MSC_VER)
# if defined(_MSC_VER)
# if _MSC_VER < 1900
# define MSGPACK_USE_CPP03
# endif
# elif (__cplusplus < 201103L)
# define MSGPACK_USE_CPP03
# endif
#endif // MSGPACK_USE_CPP03