aboutsummaryrefslogtreecommitdiff
path: root/absl/functional/function_ref.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/functional/function_ref.h')
-rw-r--r--absl/functional/function_ref.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/functional/function_ref.h b/absl/functional/function_ref.h
index 2b9139d3..96cece55 100644
--- a/absl/functional/function_ref.h
+++ b/absl/functional/function_ref.h
@@ -137,6 +137,14 @@ class FunctionRef<R(Args...)> {
absl::functional_internal::Invoker<R, Args...> invoker_;
};
+// Allow const qualified function signatures. Since FunctionRef requires
+// constness anyway we can just make this a no-op.
+template <typename R, typename... Args>
+class FunctionRef<R(Args...) const> : public FunctionRef<R(Args...)> {
+ public:
+ using FunctionRef<R(Args...)>::FunctionRef;
+};
+
ABSL_NAMESPACE_END
} // namespace absl