blob: 9aaeb5e506bb9764a317de2733be321422a29cf7 [file] [log] [blame]
erg@google.comb16c8a62010-08-25 05:29:02 +09001// 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_
erg@google.comb16c8a62010-08-25 05:29:02 +09007
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 Shenf0ea0752017-07-19 07:43:11 +090012namespace internal {
13
14template <typename T>
15struct AlwaysFalse {
16 static const bool value = false;
17};
18
19} // namespace internal
erg@google.comb16c8a62010-08-25 05:29:02 +090020
21template <class P> struct ParamTraits {
Yuzhu Shenf0ea0752017-07-19 07:43:11 +090022 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.comb16c8a62010-08-25 05:29:02 +090025};
26
27template <class P>
28struct SimilarTypeTraits {
29 typedef P Type;
30};
31
32} // namespace IPC
33
34#endif // IPC_IPC_PARAM_TRAITS_H_