// sfinae types
template<typename _Res>
- struct __enable_if_void : enable_if<is_void<_Res>::value, int> { };
+ using __enable_if_void
+ = typename enable_if<is_void<_Res>{}>::type;
+
template<typename _Res>
- struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { };
+ using __disable_if_void
+ = typename enable_if<!is_void<_Res>{}, _Result>::type;
// Call unqualified
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- _Result
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __disable_if_void<_Res>::type = 0)
+ __disable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
{
return _M_f(_Mu<_Bound_args>()
(std::get<_Indexes>(_M_bound_args), __args)...);
// Call unqualified, return void
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- void
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __enable_if_void<_Res>::type = 0)
+ __enable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
{
_M_f(_Mu<_Bound_args>()
(std::get<_Indexes>(_M_bound_args), __args)...);
// Call as const
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- _Result
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __disable_if_void<_Res>::type = 0) const
+ __disable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
{
return _M_f(_Mu<_Bound_args>()
(std::get<_Indexes>(_M_bound_args), __args)...);
// Call as const, return void
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- void
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __enable_if_void<_Res>::type = 0) const
+ __enable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
{
_M_f(_Mu<_Bound_args>()
(std::get<_Indexes>(_M_bound_args), __args)...);
// Call as volatile
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- _Result
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __disable_if_void<_Res>::type = 0) volatile
+ __disable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
{
return _M_f(_Mu<_Bound_args>()
(__volget<_Indexes>(_M_bound_args), __args)...);
// Call as volatile, return void
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- void
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __enable_if_void<_Res>::type = 0) volatile
+ __enable_if_void<_Res>
+ __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
{
_M_f(_Mu<_Bound_args>()
(__volget<_Indexes>(_M_bound_args), __args)...);
// Call as const volatile
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- _Result
- __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
- typename __disable_if_void<_Res>::type = 0) const volatile
+ __disable_if_void<_Res>
+ __call(tuple<_Args...>&& __args,
+ _Index_tuple<_Indexes...>) const volatile
{
return _M_f(_Mu<_Bound_args>()
(__volget<_Indexes>(_M_bound_args), __args)...);
// Call as const volatile, return void
template<typename _Res, typename... _Args, std::size_t... _Indexes>
- void
+ __enable_if_void<_Res>
__call(tuple<_Args...>&& __args,
- _Index_tuple<_Indexes...>,
- typename __enable_if_void<_Res>::type = 0) const volatile
+ _Index_tuple<_Indexes...>) const volatile
{
_M_f(_Mu<_Bound_args>()
(__volget<_Indexes>(_M_bound_args), __args)...);