Skip to content

Commit e6bcad9

Browse files
authored
Merge pull request #672 from evoskuil/master
Fix missing template<>.
2 parents 17b929d + 4c137e1 commit e6bcad9

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/messages/json/body.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace libbitcoin {
2222
namespace network {
2323
namespace json {
2424

25-
// Force compilation.
26-
template struct body<json_value>;
25+
////// Force compilation.
26+
////template struct body<json_value>;
2727

2828
} // namespace json
2929
} // namespace network

src/messages/rpc/body.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ BC_PUSH_WARNING(NO_POINTER_ARITHMETIC)
3838
// rpc::body::reader
3939
// ----------------------------------------------------------------------------
4040

41+
template <>
4142
size_t body<rpc::request_t>::reader::
4243
put(const buffer_type& buffer, boost_code& ec) NOEXCEPT
4344
{
@@ -90,6 +91,7 @@ put(const buffer_type& buffer, boost_code& ec) NOEXCEPT
9091
return parsed;
9192
}
9293

94+
template <>
9395
void body<rpc::request_t>::reader::
9496
finish(boost_code& ec) NOEXCEPT
9597
{
@@ -119,13 +121,15 @@ finish(boost_code& ec) NOEXCEPT
119121
}
120122
}
121123

124+
template <>
122125
size_t body<rpc::response_t>::reader::
123126
put(const buffer_type&, boost_code&) NOEXCEPT
124127
{
125128
BC_ASSERT(false);
126129
return {};
127130
}
128131

132+
template <>
129133
void body<rpc::response_t>::reader::
130134
finish(boost_code&) NOEXCEPT
131135
{
@@ -135,6 +139,7 @@ finish(boost_code&) NOEXCEPT
135139
// rpc::body::writer
136140
// ----------------------------------------------------------------------------
137141

142+
template <>
138143
void body<rpc::response_t>::writer::
139144
init(boost_code& ec) NOEXCEPT
140145
{
@@ -161,6 +166,7 @@ init(boost_code& ec) NOEXCEPT
161166
serializer_.reset(&value_.model);
162167
}
163168

169+
template <>
164170
body<rpc::response_t>::writer::out_buffer
165171
body<rpc::response_t>::writer::
166172
get(boost_code& ec) NOEXCEPT
@@ -180,12 +186,14 @@ get(boost_code& ec) NOEXCEPT
180186
return out_buffer{ std::make_pair(buffer(&line, sizeof(line)), !more) };
181187
}
182188

189+
template <>
183190
void body<rpc::request_t>::writer::
184191
init(boost_code&) NOEXCEPT
185192
{
186193
BC_ASSERT(false);
187194
}
188195

196+
template <>
189197
body<rpc::request_t>::writer::out_buffer
190198
body<rpc::request_t>::writer::
191199
get(boost_code&) NOEXCEPT
@@ -198,9 +206,9 @@ BC_POP_WARNING()
198206
BC_POP_WARNING()
199207
BC_POP_WARNING()
200208

201-
// Force compilation.
202-
template struct body<rpc::value_type<rpc::request_t>>;
203-
template struct body<rpc::value_type<rpc::response_t>>;
209+
////// Force compilation.
210+
////template struct body<rpc::value_type<rpc::request_t>>;
211+
////template struct body<rpc::value_type<rpc::response_t>>;
204212

205213
} // namespace rpc
206214
} // namespace network

0 commit comments

Comments
 (0)