cpp03_define_array_decl.hpp.erb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // MessagePack for C++ static resolution routine
  3. //
  4. // Copyright (C) 2008-2016 FURUHASHI Sadayuki and 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_CPP03_DEFINE_ARRAY_DECL_HPP
  11. #define MSGPACK_V1_CPP03_DEFINE_ARRAY_DECL_HPP
  12. #include "msgpack/versioning.hpp"
  13. namespace msgpack {
  14. /// @cond
  15. MSGPACK_API_VERSION_NAMESPACE(v1) {
  16. /// @endcond
  17. namespace type {
  18. /// @cond
  19. <% GENERATION_LIMIT = 31 %>
  20. template <typename A0 = void<%1.upto(GENERATION_LIMIT+1) {|i|%>, typename A<%=i%> = void<%}%>>
  21. struct define_array;
  22. /// @endcond
  23. define_array<> make_define_array();
  24. /// @cond
  25. <%0.upto(GENERATION_LIMIT) {|i|%>
  26. template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
  27. inline define_array<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_define_array(A0& a0<%1.upto(i) {|j|%>, A<%=j%>& a<%=j%><%}%>);
  28. <%}%>
  29. /// @endcond
  30. } // namespace type
  31. /// @cond
  32. } // MSGPACK_API_VERSION_NAMESPACE(v1)
  33. /// @endcond
  34. } // namespace msgpack
  35. #endif // MSGPACK_V1_CPP03_DEFINE_ARRAY_DECL_HPP