proxygen
traits.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <type_traits>
19 
20 namespace folly {
21 namespace fibers {
22 
36 namespace detail {
37 
38 template <typename F>
40 
41 template <typename Ret, typename T, typename First, typename... Args>
42 struct ExtractFirstArg<Ret (T::*)(First, Args...)> {
43  typedef First type;
44 };
45 
46 template <typename Ret, typename T, typename First, typename... Args>
47 struct ExtractFirstArg<Ret (T::*)(First, Args...) const> {
48  typedef First type;
49 };
50 
51 template <typename Ret, typename First, typename... Args>
52 struct ExtractFirstArg<Ret(First, Args...)> {
53  typedef First type;
54 };
55 
56 } // namespace detail
57 
58 template <typename F, typename Enable = void>
59 struct FirstArgOf;
60 
62 template <typename F>
63 struct FirstArgOf<F, typename std::enable_if<!std::is_class<F>::value>::type> {
64  typedef typename detail::ExtractFirstArg<
66 };
67 
69 template <typename F>
70 struct FirstArgOf<F, typename std::enable_if<std::is_class<F>::value>::type> {
72 };
73 
74 } // namespace fibers
75 } // namespace folly
PskType type
STL namespace.
folly::std T
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
detail::ExtractFirstArg< typename std::remove_pointer< F >::type >::type type
Definition: traits.h:65
const
Definition: upload.py:398