Skip to content

Commit 7e11174

Browse files
committed
Corrected the gcc 6.3 build
1 parent 32adc97 commit 7e11174

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/boost/function/function_base.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ namespace network_boost {
308308
if (op == clone_functor_tag || op == move_functor_tag) {
309309
const functor_type* in_functor =
310310
reinterpret_cast<const functor_type*>(&in_buffer.data);
311-
new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
311+
void *address = &out_buffer.data;
312+
new (address) functor_type(*in_functor);
312313

313314
if (op == move_functor_tag) {
314315
functor_type* f = reinterpret_cast<functor_type*>(&in_buffer.data);

src/boost/function/function_template.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,8 @@ namespace network_boost {
569569
void
570570
assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
571571
{
572-
new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
572+
void *address = &functor.data;
573+
new (address) FunctionObj(f);
573574
}
574575
template<typename FunctionObj,typename Allocator>
575576
void

0 commit comments

Comments
 (0)