File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -846,20 +846,17 @@ namespace po {
846
846
namespace detail {
847
847
template < typename fun_t , typename ... args_t >
848
848
class is_invocable_sfinae {
849
- using false_t = char [ 1 ];
850
- using true_t = char [ 2 ];
851
-
852
849
template < typename _fun_t , typename ... _args_t >
853
- static false_t & test ( ... );
850
+ static std::false_type test ( ... );
854
851
template < typename _fun_t , typename ... _args_t >
855
- static true_t & test ( decltype ( std::declval< _fun_t >()( std::declval< _args_t >()... ) )* );
852
+ static std::true_type test ( decltype ( std::declval< _fun_t >()( std::declval< _args_t >()... ) )* );
856
853
857
854
public:
858
- static constexpr bool value = sizeof ( test< fun_t , args_t ... >( 0 ) ) == sizeof ( true_t );
855
+ using type = decltype ( test< fun_t , args_t ... >( 0 ) );
859
856
};
860
857
}
861
858
template < typename fun_t , typename ... args_t >
862
- struct is_invocable : public std ::integral_constant< bool , detail::is_invocable_sfinae< fun_t , args_t ... >::value > {
859
+ struct is_invocable : public detail ::is_invocable_sfinae< fun_t , args_t ... >::type {
863
860
};
864
861
865
862
struct callback_base {
You can’t perform that action at this time.
0 commit comments