Skip to content

Commit 8f45505

Browse files
committed
Mode sanity checks linux only
1 parent ef0383f commit 8f45505

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

matplotlibcpp.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,12 @@ template <> struct select_npy_type<uint64_t> { const static NPY_TYPES type = NPY
350350

351351
// Sanity checks; comment them out or change the numpy type below if you're compiling on
352352
// a platform where they don't apply
353-
static_assert(sizeof(long long) == 8);
354-
template <> struct select_npy_type<long long> { const static NPY_TYPES type = NPY_INT64; };
355-
static_assert(sizeof(unsigned long long) == 8);
356-
template <> struct select_npy_type<unsigned long long> { const static NPY_TYPES type = NPY_UINT64; };
353+
#ifdef __linux__
354+
static_assert(sizeof(long long) == 8);
355+
template <> struct select_npy_type<long long> { const static NPY_TYPES type = NPY_INT64; };
356+
static_assert(sizeof(unsigned long long) == 8);
357+
template <> struct select_npy_type<unsigned long long> { const static NPY_TYPES type = NPY_UINT64; };
358+
#endif
357359

358360
template<typename Numeric>
359361
PyObject* get_array(const std::vector<Numeric>& v)

0 commit comments

Comments
 (0)