ipc_param_traits.h 886 B

12345678910111213141516171819202122232425262728293031323334
  1. // 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. #ifndef IPC_IPC_PARAM_TRAITS_H_
  5. #define IPC_IPC_PARAM_TRAITS_H_
  6. // Our IPC system uses the following partially specialized header to define how
  7. // a data type is read, written and logged in the IPC system.
  8. namespace IPC {
  9. namespace internal {
  10. template <typename T>
  11. struct AlwaysFalse {
  12. static const bool value = false;
  13. };
  14. } // namespace internal
  15. template <class P> struct ParamTraits {
  16. static_assert(internal::AlwaysFalse<P>::value,
  17. "Cannot find the IPC::ParamTraits specialization. Did you "
  18. "forget to include the corresponding header file?");
  19. };
  20. template <class P>
  21. struct SimilarTypeTraits {
  22. typedef P Type;
  23. };
  24. } // namespace IPC
  25. #endif // IPC_IPC_PARAM_TRAITS_H_