Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
barche committed Dec 12, 2024
1 parent b36e1e0 commit 7d18f58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/jlcxx/jlcxx_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@
#define __JLCXX_STR(x) __JLCXX_STR_HELPER(x)
#define JLCXX_VERSION_STRING __JLCXX_STR(JLCXX_VERSION_MAJOR) "." __JLCXX_STR(JLCXX_VERSION_MINOR) "." __JLCXX_STR(JLCXX_VERSION_PATCH)

#if defined(__has_include) && !defined(__FreeBSD__) && !defined(JLCXX_FORCE_RANGES_OFF)
# if __has_include (<ranges>)
// Apple Clang doesn't really support ranges fully until __cpp_lib_ranges==202207L (AppleClang 16)
#if defined(__cpp_lib_ranges) && !defined(JLCXX_FORCE_RANGES_OFF)
# if (defined(__clang__) && defined(__apple_build_version__)) || defined _MSC_VER
# if __cpp_lib_ranges >= 202207L
# define JLCXX_HAS_RANGES
# endif
# elif __cpp_lib_ranges >= 201911L
# define JLCXX_HAS_RANGES
# endif
#endif
Expand Down
12 changes: 12 additions & 0 deletions src/jlcxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,4 +457,16 @@ JLCXX_API void cxxwrap_init(const std::string& envpath)
}
}

#ifdef _MSC_VER

namespace detail
{

template class BasicArg<false>;
template class BasicArg<true>;

}

#endif

}

0 comments on commit 7d18f58

Please sign in to comment.