From 72ea1ef8462a94cb23a838dc570319f1249fea51 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 27 Aug 2020 01:21:56 +0300 Subject: [PATCH] Extract enable_if into its own header --- include/boost/system/detail/enable_if.hpp | 32 +++++++++++++++++++++++ include/boost/system/error_code.hpp | 12 +-------- 2 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 include/boost/system/detail/enable_if.hpp diff --git a/include/boost/system/detail/enable_if.hpp b/include/boost/system/detail/enable_if.hpp new file mode 100644 index 0000000..7f3d70b --- /dev/null +++ b/include/boost/system/detail/enable_if.hpp @@ -0,0 +1,32 @@ +#ifndef BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED +#define BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED + +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0 +// http://www.boost.org/LICENSE_1_0.txt + +namespace boost +{ + +namespace system +{ + +namespace detail +{ + +template struct enable_if +{ + typedef T type; +}; + +template struct enable_if +{ +}; + +} // namespace detail + +} // namespace system + +} // namespace boost + +#endif // #ifndef BOOST_SYSTEM_DETAIL_ENABLE_IF_HPP_INCLUDED diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 1dccb4f..2ca6b92 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -108,20 +109,9 @@ static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_catego #endif -// enable_if - namespace detail { -template struct enable_if -{ - typedef T type; -}; - -template struct enable_if -{ -}; - // failed_impl #if !defined(BOOST_SYSTEM_HAS_CONSTEXPR)