Streaming operator for generated types was moved into the type's namespace

This commit is contained in:
Pavel Kirienko
2014-03-09 21:13:37 +04:00
parent 3dc5183317
commit ee1de9ab2e
@@ -249,6 +249,13 @@ ${define_yaml_streamer(t.cpp_full_type_name, t.fields)}
}
% for nsc in t.cpp_namespace_components:
namespace ${nsc}
{
% endfor
namespace
{
<%def name="define_streaming_operator(type_name)">
template <typename Stream>
inline Stream& operator<<(Stream& s, ${type_name}::ParameterType obj)
@@ -264,3 +271,8 @@ ${define_streaming_operator(t.cpp_full_type_name + '::Response')}
${define_streaming_operator(t.cpp_full_type_name)}
% endif
}
% for nsc in t.cpp_namespace_components:
}
% endfor