meta.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // MessagePack for C++ static resolution routine
  3. //
  4. // Copyright (C) 2015 KONDO Takatoshi
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef MSGPACK_V1_META_HPP
  11. #define MSGPACK_V1_META_HPP
  12. #if !defined(MSGPACK_USE_CPP03)
  13. #include "msgpack/v1/meta_decl.hpp"
  14. namespace msgpack {
  15. /// @cond
  16. MSGPACK_API_VERSION_NAMESPACE(v1) {
  17. /// @endcond
  18. namespace detail {
  19. template<bool...values> struct all_of_imp
  20. : std::is_same<bool_pack<values..., true>, bool_pack<true, values...>>{};
  21. template<bool...values> struct any_of_imp {
  22. static const bool value = !std::is_same<bool_pack<values..., false>, bool_pack<false, values...>>::value;
  23. };
  24. } // namespace detail
  25. template<std::size_t... Is> struct seq {};
  26. template<std::size_t N, std::size_t... Is>
  27. struct gen_seq : gen_seq<N-1, N-1, Is...> {};
  28. template<std::size_t... Is>
  29. struct gen_seq<0, Is...> : seq<Is...> {};
  30. /// @cond
  31. } // MSGPACK_API_VERSION_NAMESPACE(v1)
  32. /// @endcond
  33. } // namespace msgpack
  34. #endif // !defined(MSGPACK_USE_CPP03)
  35. #endif // MSGPACK_V1_META_HPP