 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 _real_less(const T& lhs, const T& rhs) {
     #if  (defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__))

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 _cmp_less(const T& lhs, const T& rhs) {
    bool lhsRe = isnan(lhs.real());

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


