@@ -15,7 +15,7 @@ terms of the MIT license. A copy of the license can be found in the file
1515// ------------------------------------------------------
1616
1717#ifdef __cplusplus
18- #if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11
18+ #if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER > 1900) // C++11
1919 #define mi_attr_noexcept noexcept
2020 #else
2121 #define mi_attr_noexcept throw ()
@@ -30,7 +30,7 @@ terms of the MIT license. A copy of the license can be found in the file
3030 #define mi_decl_nodiscard __attribute__ ((warn_unused_result))
3131#elif defined(_HAS_NODISCARD)
3232 #define mi_decl_nodiscard _NODISCARD
33- #elif (_MSC_VER >= 1700)
33+ #elif defined(_MSC_VER) && (_MSC_VER >= 1700)
3434 #define mi_decl_nodiscard _Check_return_
3535#else
3636 #define mi_decl_nodiscard
@@ -513,7 +513,7 @@ mi_decl_nodiscard mi_decl_export mi_decl_restrict void* mi_heap_alloc_new_n(mi_h
513513
514514#include < cstddef> // std::size_t
515515#include < cstdint> // PTRDIFF_MAX
516- #if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11
516+ #if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER > 1900) // C++11
517517#include < type_traits> // std::true_type
518518#include < utility> // std::forward
519519#endif
@@ -527,7 +527,7 @@ template<class T> struct _mi_stl_allocator_common {
527527 typedef value_type* pointer;
528528 typedef value_type const * const_pointer;
529529
530- #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900)) // C++11
530+ #if ((__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER > 1900)) // C++11
531531 using propagate_on_container_copy_assignment = std::true_type;
532532 using propagate_on_container_move_assignment = std::true_type;
533533 using propagate_on_container_swap = std::true_type;
@@ -562,7 +562,7 @@ template<class T> struct mi_stl_allocator : public _mi_stl_allocator_common<T> {
562562 mi_decl_nodiscard pointer allocate (size_type count, const void * = 0 ) { return static_cast <pointer>(mi_new_n (count, sizeof (value_type))); }
563563 #endif
564564
565- #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900)) // C++11
565+ #if ((__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER > 1900)) // C++11
566566 using is_always_equal = std::true_type;
567567 #endif
568568};
@@ -571,7 +571,7 @@ template<class T1,class T2> bool operator==(const mi_stl_allocator<T1>& , const
571571template <class T1 ,class T2 > bool operator !=(const mi_stl_allocator<T1 >& , const mi_stl_allocator<T2 >& ) mi_attr_noexcept { return false ; }
572572
573573
574- #if (__cplusplus >= 201103L) || (_MSC_VER >= 1900) // C++11
574+ #if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1900) // C++11
575575#define MI_HAS_HEAP_STL_ALLOCATOR 1
576576
577577#include < memory> // std::shared_ptr
@@ -591,7 +591,7 @@ template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : publi
591591 mi_decl_nodiscard pointer allocate (size_type count, const void * = 0 ) { return static_cast <pointer>(mi_heap_alloc_new_n (this ->heap .get (), count, sizeof (value_type))); }
592592 #endif
593593
594- #if ((__cplusplus >= 201103L) || (_MSC_VER > 1900)) // C++11
594+ #if ((__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER > 1900)) // C++11
595595 using is_always_equal = std::false_type;
596596 #endif
597597
0 commit comments