Fix emulator build error
[platform/framework/web/chromium-efl.git] / base / functional / callback_tags.h
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This defines helpful tags for dealing with Callbacks. Those tags can be used
6 // to construct special callbacks. This lives in its own file to avoid circular
7 // dependencies.
8
9 #ifndef BASE_FUNCTIONAL_CALLBACK_TAGS_H_
10 #define BASE_FUNCTIONAL_CALLBACK_TAGS_H_
11
12 namespace base::internal {
13
14 struct NullCallbackTag {
15   template <typename Signature>
16   struct WithSignature {};
17 };
18
19 struct DoNothingCallbackTag {
20   template <typename Signature>
21   struct WithSignature {};
22
23   template <typename... BoundArgs>
24   struct WithBoundArguments {
25     std::tuple<BoundArgs...> bound_args;
26
27     constexpr explicit WithBoundArguments(BoundArgs... args)
28         : bound_args(std::forward<BoundArgs>(args)...) {}
29   };
30 };
31
32 }  // namespace base::internal
33
34 #endif  // BASE_FUNCTIONAL_CALLBACK_TAGS_H_