@@ -990,13 +990,13 @@ class vtable<property<IsThrowing, HasStrongExceptGuarantee, FormalArgs...>> {
990
990
991
991
// / Invoke the function at the given index
992
992
template <std::size_t Index, typename ... Args>
993
- constexpr auto invoke (Args&&... args) const {
993
+ constexpr decltype ( auto ) invoke(Args&&... args) const {
994
994
auto thunk = invoke_table_t ::template fetch<Index>(vtable_);
995
995
return thunk (std::forward<Args>(args)...);
996
996
}
997
997
// / Invoke the function at the given index
998
998
template <std::size_t Index, typename ... Args>
999
- constexpr auto invoke (Args&&... args) const volatile {
999
+ constexpr decltype ( auto ) invoke(Args&&... args) const volatile {
1000
1000
auto thunk = invoke_table_t ::template fetch<Index>(vtable_);
1001
1001
return thunk (std::forward<Args>(args)...);
1002
1002
}
@@ -1208,7 +1208,7 @@ class erasure : internal_capacity_holder<typename Config::capacity> {
1208
1208
// / We define this out of class to be able to forward the qualified
1209
1209
// / erasure correctly.
1210
1210
template <std::size_t Index, typename Erasure, typename ... Args>
1211
- static constexpr auto invoke (Erasure&& erasure, Args&&... args) {
1211
+ static constexpr decltype ( auto ) invoke(Erasure&& erasure, Args&&... args) {
1212
1212
auto const capacity = erasure.capacity ();
1213
1213
return erasure.vtable_ .template invoke <Index>(
1214
1214
std::forward<Erasure>(erasure).opaque_ptr (), capacity,
@@ -1324,7 +1324,7 @@ class erasure<false, Config,
1324
1324
}
1325
1325
1326
1326
template <std::size_t Index, typename Erasure, typename ... T>
1327
- static constexpr auto invoke (Erasure&& erasure, T&&... args) {
1327
+ static constexpr decltype ( auto ) invoke(Erasure&& erasure, T&&... args) {
1328
1328
auto thunk = invoke_table_t ::template fetch<Index>(erasure.invoke_table_ );
1329
1329
return thunk (&(erasure.view_ ), 0UL , std::forward<T>(args)...);
1330
1330
}
0 commit comments