From 5991052a6bb59ebc39557b4fc1ac734af16c01b7 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Fri, 13 Sep 2024 21:46:56 -0700 Subject: [PATCH] Removed a few unused items --- include/boost/leaf/config.hpp | 75 +++-------------------- include/boost/leaf/config/tls_array.hpp | 12 ---- include/boost/leaf/config/tls_cpp11.hpp | 12 ---- include/boost/leaf/config/tls_globals.hpp | 12 ---- 4 files changed, 10 insertions(+), 101 deletions(-) diff --git a/include/boost/leaf/config.hpp b/include/boost/leaf/config.hpp index 00286153..a744c101 100644 --- a/include/boost/leaf/config.hpp +++ b/include/boost/leaf/config.hpp @@ -5,47 +5,32 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// The following is based in part on Boost Config. - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Martin Wille 2003. -// (C) Copyright Guillaume Melquiond 2003. - -#ifndef BOOST_LEAF_ASSERT -# include -# define BOOST_LEAF_ASSERT assert -#endif - -//////////////////////////////////////// - #ifdef BOOST_LEAF_TLS_FREERTOS - # ifndef BOOST_LEAF_EMBEDDED # define BOOST_LEAF_EMBEDDED # endif - #endif -//////////////////////////////////////// - #ifdef BOOST_LEAF_EMBEDDED - # ifndef BOOST_LEAF_CFG_DIAGNOSTICS # define BOOST_LEAF_CFG_DIAGNOSTICS 0 # endif - # ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR # define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 0 # endif - # ifndef BOOST_LEAF_CFG_STD_STRING # define BOOST_LEAF_CFG_STD_STRING 0 # endif - # ifndef BOOST_LEAF_CFG_CAPTURE # define BOOST_LEAF_CFG_CAPTURE 0 # endif +#endif + +//////////////////////////////////////// +#ifndef BOOST_LEAF_ASSERT +# include +# define BOOST_LEAF_ASSERT assert #endif //////////////////////////////////////// @@ -130,78 +115,40 @@ //////////////////////////////////////// -// Configure BOOST_LEAF_NO_EXCEPTIONS, unless already #defined #ifndef BOOST_LEAF_NO_EXCEPTIONS - +// The following is based in part on Boost Config. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Martin Wille 2003. +// (C) Copyright Guillaume Melquiond 2003. # if defined(__clang__) && !defined(__ibmxl__) // Clang C++ emulates GCC, so it has to appear early. - # if !__has_feature(cxx_exceptions) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__DMC__) -// Digital Mars C++ - -# if !defined(_CPPUNWIND) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__GNUC__) && !defined(__ibmxl__) // GNU C++: - # if !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__KCC) -// Kai C++ - -# if !defined(_EXCEPTIONS) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__CODEGEARC__) // CodeGear - must be checked for before Borland - # if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - -# elif defined(__BORLANDC__) -// Borland - -# if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - -# elif defined(__MWERKS__) -// Metrowerks CodeWarrior - -# if !__option(exceptions) -# define BOOST_LEAF_NO_EXCEPTIONS -# endif - # elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) // IBM z/OS XL C/C++ - # if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) # define BOOST_LEAF_NO_EXCEPTIONS # endif - # elif defined(__ibmxl__) // IBM XL C/C++ for Linux (Little Endian) - # if !__has_feature(cxx_exceptions) # define BOOST_LEAF_NO_EXCEPTIONS # endif - # elif defined(_MSC_VER) // Microsoft Visual C++ -// // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER - # if !_CPPUNWIND # define BOOST_LEAF_NO_EXCEPTIONS # endif @@ -285,6 +232,4 @@ // Configure TLS access #include -//////////////////////////////////////// - #endif // BOOST_LEAF_CONFIG_HPP_INCLUDED diff --git a/include/boost/leaf/config/tls_array.hpp b/include/boost/leaf/config/tls_array.hpp index 7408f8cb..456e50f9 100644 --- a/include/boost/leaf/config/tls_array.hpp +++ b/include/boost/leaf/config/tls_array.hpp @@ -139,18 +139,6 @@ namespace tls static_assert(sizeof(std::intptr_t) >= sizeof(unsigned), "Incompatible tls_array implementation"); write_ptr((Tag *) (void *) (std::intptr_t) x); } - - template - void uint_increment() noexcept - { - write_uint(read_uint() + 1); - } - - template - void uint_decrement() noexcept - { - write_uint(read_uint() - 1); - } } } } diff --git a/include/boost/leaf/config/tls_cpp11.hpp b/include/boost/leaf/config/tls_cpp11.hpp index bbce0ec3..9828c77a 100644 --- a/include/boost/leaf/config/tls_cpp11.hpp +++ b/include/boost/leaf/config/tls_cpp11.hpp @@ -65,18 +65,6 @@ namespace tls { tagged_uint::x = x; } - - template - void uint_increment() noexcept - { - ++tagged_uint::x; - } - - template - void uint_decrement() noexcept - { - --tagged_uint::x; - } } } } diff --git a/include/boost/leaf/config/tls_globals.hpp b/include/boost/leaf/config/tls_globals.hpp index 183d3e7c..5e9b1e90 100644 --- a/include/boost/leaf/config/tls_globals.hpp +++ b/include/boost/leaf/config/tls_globals.hpp @@ -64,18 +64,6 @@ namespace tls { tagged_uint::x = x; } - - template - void uint_increment() noexcept - { - ++tagged_uint::x; - } - - template - void uint_decrement() noexcept - { - --tagged_uint::x; - } } } }