Skip to content

Commit

Permalink
Removed a few unused items
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Sep 14, 2024
1 parent 0c79239 commit 5991052
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 101 deletions.
75 changes: 10 additions & 65 deletions include/boost/leaf/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cassert>
# 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 <cassert>
# define BOOST_LEAF_ASSERT assert
#endif

////////////////////////////////////////
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -285,6 +232,4 @@
// Configure TLS access
#include <boost/leaf/config/tls.hpp>

////////////////////////////////////////

#endif // BOOST_LEAF_CONFIG_HPP_INCLUDED
12 changes: 0 additions & 12 deletions include/boost/leaf/config/tls_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,6 @@ namespace tls
static_assert(sizeof(std::intptr_t) >= sizeof(unsigned), "Incompatible tls_array implementation");
write_ptr<Tag>((Tag *) (void *) (std::intptr_t) x);
}

template <class Tag>
void uint_increment() noexcept
{
write_uint<Tag>(read_uint<Tag>() + 1);
}

template <class Tag>
void uint_decrement() noexcept
{
write_uint<Tag>(read_uint<Tag>() - 1);
}
}

} }
Expand Down
12 changes: 0 additions & 12 deletions include/boost/leaf/config/tls_cpp11.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ namespace tls
{
tagged_uint<Tag>::x = x;
}

template <class Tag>
void uint_increment() noexcept
{
++tagged_uint<Tag>::x;
}

template <class Tag>
void uint_decrement() noexcept
{
--tagged_uint<Tag>::x;
}
}

} }
Expand Down
12 changes: 0 additions & 12 deletions include/boost/leaf/config/tls_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ namespace tls
{
tagged_uint<Tag>::x = x;
}

template <class Tag>
void uint_increment() noexcept
{
++tagged_uint<Tag>::x;
}

template <class Tag>
void uint_decrement() noexcept
{
--tagged_uint<Tag>::x;
}
}

} }
Expand Down

0 comments on commit 5991052

Please sign in to comment.