Skip to content

Instantly share code, notes, and snippets.

@orivej
Created November 27, 2020 11:11
Show Gist options
  • Save orivej/b7783dfd3d9b9269ee65152365c5d810 to your computer and use it in GitHub Desktop.
Save orivej/b7783dfd3d9b9269ee65152365c5d810 to your computer and use it in GitHub Desktop.
osrm sol c++17 patch
--- a/third_party/sol2/sol2/sol.hpp
+++ b/third_party/sol2/sol2/sol.hpp
@@ -7487,10 +7487,87 @@ namespace sol {
template <typename R, typename O, typename... Args>
struct wrapper<R(O:: *)(Args..., ...) const volatile &&> : public member_function_wrapper<R(O:: *)(Args..., ...) const volatile &, R, O, Args...> {
};
+#ifdef __cpp_noexcept_function_type
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) noexcept> : public member_function_wrapper<R(O:: *)(Args...), R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const noexcept> : public member_function_wrapper<R(O:: *)(Args...) const, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const volatile noexcept> : public member_function_wrapper<R(O:: *)(Args...) const volatile, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) & noexcept> : public member_function_wrapper<R(O:: *)(Args...) &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const & noexcept> : public member_function_wrapper<R(O:: *)(Args...) const &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const volatile & noexcept> : public member_function_wrapper<R(O:: *)(Args...) const volatile &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) & noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) const & noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) const &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) const volatile & noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) const volatile &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) && noexcept> : public member_function_wrapper<R(O:: *)(Args...) &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const && noexcept> : public member_function_wrapper<R(O:: *)(Args...) const &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args...) const volatile && noexcept> : public member_function_wrapper<R(O:: *)(Args...) const volatile &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) && noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) const && noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) const &, R, O, Args...> {
+
+ };
+
+ template <typename R, typename O, typename... Args>
+ struct wrapper<R(O:: *)(Args..., ...) const volatile && noexcept> : public member_function_wrapper<R(O:: *)(Args..., ...) const volatile &, R, O, Args...> {
+
+ };
+#endif
+
} // sol
// end of sol/wrapper.hpp
namespace sol {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment