From 19d5bf5f04eb44db6fcce283de4478cb9064a8bd Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 22 Jan 2018 17:39:29 +0200 Subject: [PATCH] clang++ 3.8 and below requires a user-provided default constructor --- include/boost/system/error_code.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 7be7005..f40a99e 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -348,6 +348,12 @@ class generic_error_category: public error_category { public: + // clang++ 3.8 and below: initialization of const object + // requires a user-provided default constructor + BOOST_SYSTEM_CONSTEXPR generic_error_category() BOOST_SYSTEM_NOEXCEPT + { + } + const char * name() const BOOST_SYSTEM_NOEXCEPT { return "generic"; @@ -360,6 +366,10 @@ class system_error_category: public error_category { public: + BOOST_SYSTEM_CONSTEXPR system_error_category() BOOST_SYSTEM_NOEXCEPT + { + } + const char * name() const BOOST_SYSTEM_NOEXCEPT { return "system";