blob: 9aaeb5e506bb9764a317de2733be321422a29cf7 [file] [log] [blame]
[email protected]939856a2010-08-24 20:29:021// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef IPC_IPC_PARAM_TRAITS_H_
6#define IPC_IPC_PARAM_TRAITS_H_
[email protected]939856a2010-08-24 20:29:027
8// Our IPC system uses the following partially specialized header to define how
9// a data type is read, written and logged in the IPC system.
10
11namespace IPC {
Yuzhu Shen09d59252017-07-18 22:43:1112namespace internal {
13
14template <typename T>
15struct AlwaysFalse {
16 static const bool value = false;
17};
18
19} // namespace internal
[email protected]939856a2010-08-24 20:29:0220
21template <class P> struct ParamTraits {
Yuzhu Shen09d59252017-07-18 22:43:1122 static_assert(internal::AlwaysFalse<P>::value,
23 "Cannot find the IPC::ParamTraits specialization. Did you "
24 "forget to include the corresponding header file?");
[email protected]939856a2010-08-24 20:29:0225};
26
27template <class P>
28struct SimilarTypeTraits {
29 typedef P Type;
30};
31
32} // namespace IPC
33
34#endif // IPC_IPC_PARAM_TRAITS_H_