Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/messages/json/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace libbitcoin {
namespace network {
namespace json {

// Force compilation.
template struct body<json_value>;
////// Force compilation.
////template struct body<json_value>;

} // namespace json
} // namespace network
Expand Down
14 changes: 11 additions & 3 deletions src/messages/rpc/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BC_PUSH_WARNING(NO_POINTER_ARITHMETIC)
// rpc::body::reader
// ----------------------------------------------------------------------------

template <>
size_t body<rpc::request_t>::reader::
put(const buffer_type& buffer, boost_code& ec) NOEXCEPT
{
Expand Down Expand Up @@ -90,6 +91,7 @@ put(const buffer_type& buffer, boost_code& ec) NOEXCEPT
return parsed;
}

template <>
void body<rpc::request_t>::reader::
finish(boost_code& ec) NOEXCEPT
{
Expand Down Expand Up @@ -119,13 +121,15 @@ finish(boost_code& ec) NOEXCEPT
}
}

template <>
size_t body<rpc::response_t>::reader::
put(const buffer_type&, boost_code&) NOEXCEPT
{
BC_ASSERT(false);
return {};
}

template <>
void body<rpc::response_t>::reader::
finish(boost_code&) NOEXCEPT
{
Expand All @@ -135,6 +139,7 @@ finish(boost_code&) NOEXCEPT
// rpc::body::writer
// ----------------------------------------------------------------------------

template <>
void body<rpc::response_t>::writer::
init(boost_code& ec) NOEXCEPT
{
Expand All @@ -161,6 +166,7 @@ init(boost_code& ec) NOEXCEPT
serializer_.reset(&value_.model);
}

template <>
body<rpc::response_t>::writer::out_buffer
body<rpc::response_t>::writer::
get(boost_code& ec) NOEXCEPT
Expand All @@ -180,12 +186,14 @@ get(boost_code& ec) NOEXCEPT
return out_buffer{ std::make_pair(buffer(&line, sizeof(line)), !more) };
}

template <>
void body<rpc::request_t>::writer::
init(boost_code&) NOEXCEPT
{
BC_ASSERT(false);
}

template <>
body<rpc::request_t>::writer::out_buffer
body<rpc::request_t>::writer::
get(boost_code&) NOEXCEPT
Expand All @@ -198,9 +206,9 @@ BC_POP_WARNING()
BC_POP_WARNING()
BC_POP_WARNING()

// Force compilation.
template struct body<rpc::value_type<rpc::request_t>>;
template struct body<rpc::value_type<rpc::response_t>>;
////// Force compilation.
////template struct body<rpc::value_type<rpc::request_t>>;
////template struct body<rpc::value_type<rpc::response_t>>;

} // namespace rpc
} // namespace network
Expand Down
Loading