From 836facdcdf4b4ef8610aac43affdc8b62ef11aa7 Mon Sep 17 00:00:00 2001 From: Naios Date: Tue, 16 Jun 2015 20:01:44 +0200 Subject: [PATCH] Fix detection of mutable function pointers --- fluent/functional_unwrap.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fluent/functional_unwrap.hpp b/fluent/functional_unwrap.hpp index 8d24541..4584f4e 100644 --- a/fluent/functional_unwrap.hpp +++ b/fluent/functional_unwrap.hpp @@ -64,16 +64,26 @@ namespace fu struct unwrap_function_impl> : unwrap_function_impl<_RTy(_ATy...)> { }; - /// Function pointers + /// Const function pointers template struct unwrap_function_impl<_RTy(*const)(_ATy...)> : unwrap_function_impl<_RTy(_ATy...)> { }; - /// Class Method pointers + /// Mutable function pointers + template + struct unwrap_function_impl<_RTy(*)(_ATy...)> + : unwrap_function_impl<_RTy(_ATy...)> { }; + + /// Const class method pointers template struct unwrap_function_impl<_RTy(_CTy::*)(_ATy...) const> : unwrap_function_impl<_RTy(_ATy...)> { }; + /// Mutable class method pointers + template + struct unwrap_function_impl<_RTy(_CTy::*)(_ATy...)> + : unwrap_function_impl<_RTy(_ATy...)> { }; + /// Pack in fu::identity template struct unwrap_function_impl>