diff --git a/cpp/type/define.hpp.erb b/cpp/type/define.hpp.erb index c13aa163..d9d3fb1a 100644 --- a/cpp/type/define.hpp.erb +++ b/cpp/type/define.hpp.erb @@ -52,7 +52,6 @@ struct define<> { if(o.type != type::ARRAY) { throw type_error(); } } }; - <%0.upto(GENERATION_LIMIT) {|i|%> template , typename A<%=j%><%}%>> struct define, A<%=j%><%}%>> { @@ -79,11 +78,10 @@ struct define, A<%=j%><%}%>> { }; <%}%> -define<> make_define() +inline define<> make_define() { return define<>(); } - <%0.upto(GENERATION_LIMIT) {|i|%> template , typename A<%=j%><%}%>> define, A<%=j%><%}%>> make_define(A0& a0<%1.upto(i) {|j|%>, A<%=j%>& a<%=j%><%}%>) @@ -92,7 +90,6 @@ define, A<%=j%><%}%>> make_define(A0& a0<%1.upto(i) {|j|%>, } <%}%> - } // namespace type } // namespace msgpack