Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function_traits.h add reference qualified overloads #378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/rttr/detail/misc/function_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,30 @@ namespace detail
template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile> : function_traits<R (Args...)> {using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) &> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const&> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) volatile&> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile&> : function_traits<R (Args...)> {using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) &&> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const&&> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) volatile&&> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile&&> : function_traits<R (Args...)> {using class_type = C; };

#ifndef RTTR_NO_CXX17_NOEXCEPT_FUNC_TYPE
template<typename R, typename... Args>
struct function_traits<R (*)(Args...) noexcept> : function_traits<R (Args...)> { };
Expand All @@ -147,6 +171,30 @@ namespace detail

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile noexcept> : function_traits<R (Args...)> {using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) & noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const& noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) volatile& noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile& noexcept> : function_traits<R (Args...)> {using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) && noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const&& noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) volatile&& noexcept> : function_traits<R (Args...)> { using class_type = C; };

template<typename R, typename C, typename... Args>
struct function_traits<R (C::*)(Args...) const volatile&& noexcept> : function_traits<R (Args...)> {using class_type = C; };
#endif

template<typename T>
Expand Down