From 66656f7044605c3b006bdfc12ed2219b318f0154 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 13 Jun 2021 20:45:50 +0300 Subject: [PATCH] Use copy-init instead of direct-init for older clangs --- include/boost/system/detail/error_code.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index 46fd1bd..4c40e9c 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -313,7 +313,7 @@ public: { if( flags_ != 1 ) { - std::error_code e2( *this ); + std::error_code e2 = *this; ::new( d2_ ) std::error_code( e2 ); flags_ = 1; }