-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0956ec7
commit 5c27e1a
Showing
2,357 changed files
with
451,554 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// | ||
// boost/assert.hpp - BOOST_ASSERT(expr) | ||
// BOOST_ASSERT_MSG(expr, msg) | ||
// BOOST_VERIFY(expr) | ||
// BOOST_VERIFY_MSG(expr, msg) | ||
// BOOST_ASSERT_IS_VOID | ||
// | ||
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. | ||
// Copyright (c) 2007, 2014 Peter Dimov | ||
// Copyright (c) Beman Dawes 2011 | ||
// Copyright (c) 2015 Ion Gaztanaga | ||
// | ||
// 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 | ||
// | ||
// Note: There are no include guards. This is intentional. | ||
// | ||
// See http://www.boost.org/libs/assert/assert.html for documentation. | ||
// | ||
|
||
// | ||
// Stop inspect complaining about use of 'assert': | ||
// | ||
// boostinspect:naassert_macro | ||
// | ||
|
||
// | ||
// BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID | ||
// | ||
|
||
#undef BOOST_ASSERT | ||
#undef BOOST_ASSERT_MSG | ||
#undef BOOST_ASSERT_IS_VOID | ||
|
||
#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) | ||
|
||
# define BOOST_ASSERT(expr) ((void)0) | ||
# define BOOST_ASSERT_MSG(expr, msg) ((void)0) | ||
# define BOOST_ASSERT_IS_VOID | ||
|
||
#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) | ||
|
||
#include <boost/config.hpp> // for BOOST_LIKELY | ||
#include <boost/current_function.hpp> | ||
|
||
namespace boost | ||
{ | ||
void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined | ||
void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined | ||
} // namespace boost | ||
|
||
#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) | ||
#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) | ||
|
||
#else | ||
|
||
# include <assert.h> // .h to support old libraries w/o <cassert> - effect is the same | ||
|
||
# define BOOST_ASSERT(expr) assert(expr) | ||
# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) | ||
#if defined(NDEBUG) | ||
# define BOOST_ASSERT_IS_VOID | ||
#endif | ||
|
||
#endif | ||
|
||
// | ||
// BOOST_VERIFY, BOOST_VERIFY_MSG | ||
// | ||
|
||
#undef BOOST_VERIFY | ||
#undef BOOST_VERIFY_MSG | ||
|
||
#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) | ||
|
||
# define BOOST_VERIFY(expr) ((void)(expr)) | ||
# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) | ||
|
||
#else | ||
|
||
# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) | ||
# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) | ||
|
||
#endif |
194 changes: 194 additions & 0 deletions
194
src/search/ext/boost_dependencies/boost/assert/source_location.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
#ifndef BOOST_ASSERT_SOURCE_LOCATION_HPP_INCLUDED | ||
#define BOOST_ASSERT_SOURCE_LOCATION_HPP_INCLUDED | ||
|
||
// http://www.boost.org/libs/assert | ||
// | ||
// Copyright 2019, 2021 Peter Dimov | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/config.hpp> | ||
#include <boost/cstdint.hpp> | ||
#include <iosfwd> | ||
#include <string> | ||
#include <cstdio> | ||
#include <cstring> | ||
|
||
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L | ||
# include <source_location> | ||
#endif | ||
|
||
namespace boost | ||
{ | ||
|
||
struct source_location | ||
{ | ||
private: | ||
|
||
char const * file_; | ||
char const * function_; | ||
boost::uint_least32_t line_; | ||
boost::uint_least32_t column_; | ||
|
||
public: | ||
|
||
BOOST_CONSTEXPR source_location() BOOST_NOEXCEPT: file_( "" ), function_( "" ), line_( 0 ), column_( 0 ) | ||
{ | ||
} | ||
|
||
BOOST_CONSTEXPR source_location( char const * file, boost::uint_least32_t ln, char const * function, boost::uint_least32_t col = 0 ) BOOST_NOEXCEPT: file_( file ), function_( function ), line_( ln ), column_( col ) | ||
{ | ||
} | ||
|
||
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L | ||
|
||
BOOST_CONSTEXPR source_location( std::source_location const& loc ) BOOST_NOEXCEPT: file_( loc.file_name() ), function_( loc.function_name() ), line_( loc.line() ), column_( loc.column() ) | ||
{ | ||
} | ||
|
||
#endif | ||
|
||
BOOST_CONSTEXPR char const * file_name() const BOOST_NOEXCEPT | ||
{ | ||
return file_; | ||
} | ||
|
||
BOOST_CONSTEXPR char const * function_name() const BOOST_NOEXCEPT | ||
{ | ||
return function_; | ||
} | ||
|
||
BOOST_CONSTEXPR boost::uint_least32_t line() const BOOST_NOEXCEPT | ||
{ | ||
return line_; | ||
} | ||
|
||
BOOST_CONSTEXPR boost::uint_least32_t column() const BOOST_NOEXCEPT | ||
{ | ||
return column_; | ||
} | ||
|
||
#if defined(BOOST_MSVC) | ||
# pragma warning( push ) | ||
# pragma warning( disable: 4996 ) | ||
#endif | ||
|
||
#if ( defined(_MSC_VER) && _MSC_VER < 1900 ) || ( defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) ) | ||
# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::sprintf(buffer, format, arg) | ||
#else | ||
# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::snprintf(buffer, sizeof(buffer)/sizeof(buffer[0]), format, arg) | ||
#endif | ||
|
||
std::string to_string() const | ||
{ | ||
unsigned long ln = line(); | ||
|
||
if( ln == 0 ) | ||
{ | ||
return "(unknown source location)"; | ||
} | ||
|
||
std::string r = file_name(); | ||
|
||
char buffer[ 16 ]; | ||
|
||
BOOST_ASSERT_SNPRINTF( buffer, ":%lu", ln ); | ||
r += buffer; | ||
|
||
unsigned long co = column(); | ||
|
||
if( co ) | ||
{ | ||
BOOST_ASSERT_SNPRINTF( buffer, ":%lu", co ); | ||
r += buffer; | ||
} | ||
|
||
char const* fn = function_name(); | ||
|
||
if( *fn != 0 ) | ||
{ | ||
r += " in function '"; | ||
r += fn; | ||
r += '\''; | ||
} | ||
|
||
return r; | ||
} | ||
|
||
#undef BOOST_ASSERT_SNPRINTF | ||
|
||
#if defined(BOOST_MSVC) | ||
# pragma warning( pop ) | ||
#endif | ||
|
||
inline friend bool operator==( source_location const& s1, source_location const& s2 ) BOOST_NOEXCEPT | ||
{ | ||
return std::strcmp( s1.file_, s2.file_ ) == 0 && std::strcmp( s1.function_, s2.function_ ) == 0 && s1.line_ == s2.line_ && s1.column_ == s2.column_; | ||
} | ||
|
||
inline friend bool operator!=( source_location const& s1, source_location const& s2 ) BOOST_NOEXCEPT | ||
{ | ||
return !( s1 == s2 ); | ||
} | ||
}; | ||
|
||
template<class E, class T> std::basic_ostream<E, T> & operator<<( std::basic_ostream<E, T> & os, source_location const & loc ) | ||
{ | ||
os << loc.to_string(); | ||
return os; | ||
} | ||
|
||
} // namespace boost | ||
|
||
#if defined(BOOST_DISABLE_CURRENT_LOCATION) | ||
|
||
# define BOOST_CURRENT_LOCATION ::boost::source_location() | ||
|
||
#elif defined(BOOST_MSVC) && BOOST_MSVC >= 1935 | ||
|
||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCSIG(), __builtin_COLUMN()) | ||
|
||
#elif defined(BOOST_MSVC) && BOOST_MSVC >= 1926 | ||
|
||
// std::source_location::current() is available in -std:c++20, but fails with consteval errors before 19.31, and doesn't produce | ||
// the correct result under 19.31, so prefer the built-ins | ||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION(), __builtin_COLUMN()) | ||
|
||
#elif defined(BOOST_MSVC) | ||
|
||
// __LINE__ is not a constant expression under /ZI (edit and continue) for 1925 and before | ||
|
||
# define BOOST_CURRENT_LOCATION_IMPL_1(x) BOOST_CURRENT_LOCATION_IMPL_2(x) | ||
# define BOOST_CURRENT_LOCATION_IMPL_2(x) (x##0 / 10) | ||
|
||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, BOOST_CURRENT_LOCATION_IMPL_1(__LINE__), "") | ||
|
||
#elif defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L && !defined(__NVCC__) | ||
|
||
// Under nvcc, __builtin_source_location is not constexpr | ||
// https://github.com/boostorg/assert/issues/32 | ||
|
||
# define BOOST_CURRENT_LOCATION ::boost::source_location(::std::source_location::current()) | ||
|
||
#elif defined(BOOST_CLANG) && BOOST_CLANG_VERSION >= 90000 | ||
|
||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION(), __builtin_COLUMN()) | ||
|
||
#elif defined(BOOST_GCC) && BOOST_GCC >= 70000 | ||
|
||
// The built-ins are available in 4.8+, but are not constant expressions until 7 | ||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION()) | ||
|
||
#elif defined(BOOST_GCC) && BOOST_GCC >= 50000 | ||
|
||
// __PRETTY_FUNCTION__ is allowed outside functions under GCC, but 4.x suffers from codegen bugs | ||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, __PRETTY_FUNCTION__) | ||
|
||
#else | ||
|
||
// __func__ macros aren't allowed outside functions, but BOOST_CURRENT_LOCATION is | ||
# define BOOST_CURRENT_LOCATION ::boost::source_location(__FILE__, __LINE__, "") | ||
|
||
#endif | ||
|
||
#endif // #ifndef BOOST_ASSERT_SOURCE_LOCATION_HPP_INCLUDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
//----------------------------------------------------------------------------- | ||
// boost blank.hpp header file | ||
// See http://www.boost.org for updates, documentation, and revision history. | ||
//----------------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2003 | ||
// Eric Friedman | ||
// | ||
// 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) | ||
|
||
#ifndef BOOST_BLANK_HPP | ||
#define BOOST_BLANK_HPP | ||
|
||
#include "boost/blank_fwd.hpp" | ||
|
||
#if !defined(BOOST_NO_IOSTREAM) | ||
#include <iosfwd> // for std::basic_ostream forward declare | ||
#include "boost/detail/templated_streams.hpp" | ||
#endif // BOOST_NO_IOSTREAM | ||
|
||
#include "boost/type_traits/integral_constant.hpp" | ||
#include "boost/type_traits/is_empty.hpp" | ||
#include "boost/type_traits/is_pod.hpp" | ||
#include "boost/type_traits/is_stateless.hpp" | ||
|
||
namespace boost { | ||
|
||
struct blank | ||
{ | ||
}; | ||
|
||
// type traits specializations | ||
// | ||
|
||
template <> | ||
struct is_pod< blank > | ||
: boost::true_type | ||
{ | ||
}; | ||
|
||
template <> | ||
struct is_empty< blank > | ||
: boost::true_type | ||
{ | ||
}; | ||
|
||
template <> | ||
struct is_stateless< blank > | ||
: boost::true_type | ||
{ | ||
}; | ||
|
||
// relational operators | ||
// | ||
|
||
inline bool operator==(const blank&, const blank&) | ||
{ | ||
return true; | ||
} | ||
|
||
inline bool operator<=(const blank&, const blank&) | ||
{ | ||
return true; | ||
} | ||
|
||
inline bool operator>=(const blank&, const blank&) | ||
{ | ||
return true; | ||
} | ||
|
||
inline bool operator!=(const blank&, const blank&) | ||
{ | ||
return false; | ||
} | ||
|
||
inline bool operator<(const blank&, const blank&) | ||
{ | ||
return false; | ||
} | ||
|
||
inline bool operator>(const blank&, const blank&) | ||
{ | ||
return false; | ||
} | ||
|
||
// streaming support | ||
// | ||
#if !defined(BOOST_NO_IOSTREAM) | ||
|
||
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) | ||
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( | ||
BOOST_TEMPLATED_STREAM(ostream, E,T)& out | ||
, const blank& | ||
) | ||
{ | ||
// (output nothing) | ||
return out; | ||
} | ||
|
||
#endif // BOOST_NO_IOSTREAM | ||
|
||
} // namespace boost | ||
|
||
#endif // BOOST_BLANK_HPP |
Oops, something went wrong.