 template <typename T>
 __host__ __device__ __forceinline__
 #if (__CUDACC_VER_MAJOR__ >11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ >= 2))
-#ifndef _WIN32
-constexpr
-#endif
+THRUST_OPTIONAL_CPP11_CONSTEXPR
 #endif
 bool _cmp_less(const T& lhs, const T& rhs) {
     bool lhsRe = isnan(lhs.real());

template <typename T>
__host__ __device__ __forceinline__ 
#if (__CUDACC_VER_MAJOR__ >11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ >= 2))
#ifndef _WIN32
constexpr
#endif
#endif
bool _tuple_less(const tuple<size_t, T>& lhs,
                                                     const tuple<size_t, T>& rhs) {

#include <thrust/sort.h>
#include <thrust/tuple.h>
#include <thrust/execution_policy.h>
#include <thrust/optional.h>
#include "cupy_thrust.h"


