blob: ba484e0faad1135172a0e2b3e9935842e07b9866 [file] [log] [blame]
Avi Drissmanea1be232022-09-14 23:29:061// Copyright 2010 The Chromium Authors
erg@google.com939856a2010-08-24 20:29:022// 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_
erg@google.com939856a2010-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
erg@google.com939856a2010-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?");
erg@google.com939856a2010-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_