Skip to content

Commit 7d18f58

Browse files
committed
Fix windows build
1 parent b36e1e0 commit 7d18f58

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

include/jlcxx/jlcxx_config.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@
2323
#define __JLCXX_STR(x) __JLCXX_STR_HELPER(x)
2424
#define JLCXX_VERSION_STRING __JLCXX_STR(JLCXX_VERSION_MAJOR) "." __JLCXX_STR(JLCXX_VERSION_MINOR) "." __JLCXX_STR(JLCXX_VERSION_PATCH)
2525

26-
#if defined(__has_include) && !defined(__FreeBSD__) && !defined(JLCXX_FORCE_RANGES_OFF)
27-
# if __has_include (<ranges>)
26+
// Apple Clang doesn't really support ranges fully until __cpp_lib_ranges==202207L (AppleClang 16)
27+
#if defined(__cpp_lib_ranges) && !defined(JLCXX_FORCE_RANGES_OFF)
28+
# if (defined(__clang__) && defined(__apple_build_version__)) || defined _MSC_VER
29+
# if __cpp_lib_ranges >= 202207L
30+
# define JLCXX_HAS_RANGES
31+
# endif
32+
# elif __cpp_lib_ranges >= 201911L
2833
# define JLCXX_HAS_RANGES
2934
# endif
3035
#endif

src/jlcxx.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,16 @@ JLCXX_API void cxxwrap_init(const std::string& envpath)
457457
}
458458
}
459459

460+
#ifdef _MSC_VER
461+
462+
namespace detail
463+
{
464+
465+
template class BasicArg<false>;
466+
template class BasicArg<true>;
467+
468+
}
469+
470+
#endif
471+
460472
}

0 commit comments

Comments
 (0)