aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-22 20:30:08 +0100
committerGitHub <noreply@github.com>2023-12-22 20:30:08 +0100
commit6b4f46a6883f21c16eef367106167ea59932515e (patch)
tree5833709b16bba3948f15e88b9038229c5065605b /contrib
parenta8b737f2a6df02f6e45ed703246c75f0f4cf7a34 (diff)
downloadydb-6b4f46a6883f21c16eef367106167ea59932515e.tar.gz
Import libs 3 (#679)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h9
-rw-r--r--contrib/libs/poco/Foundation/src/UTF32Encoding.cpp42
-rw-r--r--contrib/python/importlib-metadata/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py42
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/diagnose.py21
-rw-r--r--contrib/python/importlib-metadata/py3/ya.make3
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index.hpp26
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp65
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp132
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp12
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp10
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp94
-rw-r--r--contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp77
-rw-r--r--contrib/restricted/boost/type_index/ya.make7
14 files changed, 237 insertions, 305 deletions
diff --git a/contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h b/contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h
index 6f8af525a66..02b10b8a7e6 100644
--- a/contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h
+++ b/contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h
@@ -68,6 +68,15 @@ public:
int convert(int ch, unsigned char* bytes, int length) const;
int queryConvert(const unsigned char* bytes, int length) const;
int sequenceLength(const unsigned char* bytes, int length) const;
+
+protected:
+ static int safeToInt(Poco::UInt32 value)
+ {
+ if (value <= 0x10FFFF)
+ return static_cast<int>(value);
+ else
+ return -1;
+ }
private:
bool _flipBytes;
diff --git a/contrib/libs/poco/Foundation/src/UTF32Encoding.cpp b/contrib/libs/poco/Foundation/src/UTF32Encoding.cpp
index db0cfe21d7f..687a48c96c1 100644
--- a/contrib/libs/poco/Foundation/src/UTF32Encoding.cpp
+++ b/contrib/libs/poco/Foundation/src/UTF32Encoding.cpp
@@ -30,22 +30,22 @@ const char* UTF32Encoding::_names[] =
const TextEncoding::CharacterMap UTF32Encoding::_charMap =
{
- /* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- /* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ /* 00 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 10 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 20 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 30 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 40 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 50 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 60 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 70 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 80 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* 90 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* a0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* b0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* c0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* d0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* e0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
+ /* f0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
};
@@ -118,7 +118,7 @@ const TextEncoding::CharacterMap& UTF32Encoding::characterMap() const
int UTF32Encoding::convert(const unsigned char* bytes) const
{
UInt32 uc;
- unsigned char* p = (unsigned char*) &uc;
+ unsigned char* p = reinterpret_cast<unsigned char*>(&uc);
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
@@ -129,7 +129,7 @@ int UTF32Encoding::convert(const unsigned char* bytes) const
ByteOrder::flipBytes(uc);
}
- return uc;
+ return safeToInt(uc);
}
@@ -138,7 +138,7 @@ int UTF32Encoding::convert(int ch, unsigned char* bytes, int length) const
if (bytes && length >= 4)
{
UInt32 ch1 = _flipBytes ? ByteOrder::flipBytes((UInt32) ch) : (UInt32) ch;
- unsigned char* p = (unsigned char*) &ch1;
+ unsigned char* p = reinterpret_cast<unsigned char*>(&ch1);
*bytes++ = *p++;
*bytes++ = *p++;
*bytes++ = *p++;
@@ -155,14 +155,14 @@ int UTF32Encoding::queryConvert(const unsigned char* bytes, int length) const
if (length >= 4)
{
UInt32 uc;
- unsigned char* p = (unsigned char*) &uc;
+ unsigned char* p = reinterpret_cast<unsigned char*>(&uc);
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
if (_flipBytes)
ByteOrder::flipBytes(uc);
- return uc;
+ ret = safeToInt(uc);
}
return ret;
diff --git a/contrib/python/importlib-metadata/py3/.dist-info/METADATA b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
index 9e58c1d38ef..a344859f174 100644
--- a/contrib/python/importlib-metadata/py3/.dist-info/METADATA
+++ b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib-metadata
-Version: 6.9.0
+Version: 7.0.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
index 8416afdbd64..cd015707b1a 100644
--- a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
@@ -3,7 +3,9 @@ import re
import abc
import csv
import sys
+import json
import email
+import types
import inspect
import pathlib
import operator
@@ -20,7 +22,6 @@ from ._compat import (
NullFinder,
StrPath,
install,
- pypy_partial,
)
from ._functools import method_cache, pass_none
from ._itertools import always_iterable, unique_everseen
@@ -131,34 +132,7 @@ class Sectioned:
return line and not line.startswith('#')
-class DeprecatedTuple:
- """
- Provide subscript item access for backward compatibility.
-
- >>> recwarn = getfixture('recwarn')
- >>> ep = EntryPoint(name='name', value='value', group='group')
- >>> ep[:]
- ('name', 'value', 'group')
- >>> ep[0]
- 'name'
- >>> len(recwarn)
- 1
- """
-
- # Do not remove prior to 2023-05-01 or Python 3.13
- _warn = functools.partial(
- warnings.warn,
- "EntryPoint tuple interface is deprecated. Access members by name.",
- DeprecationWarning,
- stacklevel=pypy_partial(2),
- )
-
- def __getitem__(self, item):
- self._warn()
- return self._key()[item]
-
-
-class EntryPoint(DeprecatedTuple):
+class EntryPoint:
"""An entry point as defined by Python packaging conventions.
See `the packaging docs on entry points
@@ -630,6 +604,16 @@ class Distribution(DeprecatedNonAbstract):
space = url_req_space(section.value)
yield section.value + space + quoted_marker(section.name)
+ @property
+ def origin(self):
+ return self._load_json('direct_url.json')
+
+ def _load_json(self, filename):
+ return pass_none(json.loads)(
+ self.read_text(filename),
+ object_hook=lambda data: types.SimpleNamespace(**data),
+ )
+
class DistributionFinder(MetaPathFinder):
"""
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/diagnose.py b/contrib/python/importlib-metadata/py3/importlib_metadata/diagnose.py
new file mode 100644
index 00000000000..e405471ac4d
--- /dev/null
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/diagnose.py
@@ -0,0 +1,21 @@
+import sys
+
+from . import Distribution
+
+
+def inspect(path):
+ print("Inspecting", path)
+ dists = list(Distribution.discover(path=[path]))
+ if not dists:
+ return
+ print("Found", len(dists), "packages:", end=' ')
+ print(', '.join(dist.name for dist in dists))
+
+
+def run():
+ for path in sys.path:
+ inspect(path)
+
+
+if __name__ == '__main__':
+ run()
diff --git a/contrib/python/importlib-metadata/py3/ya.make b/contrib/python/importlib-metadata/py3/ya.make
index cb87df460a0..4e4813824c9 100644
--- a/contrib/python/importlib-metadata/py3/ya.make
+++ b/contrib/python/importlib-metadata/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.9.0)
+VERSION(7.0.0)
LICENSE(Apache-2.0)
@@ -23,6 +23,7 @@ PY_SRCS(
importlib_metadata/_meta.py
importlib_metadata/_py39compat.py
importlib_metadata/_text.py
+ importlib_metadata/diagnose.py
)
RESOURCE_FILES(
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index.hpp
index 9ef884a8c4c..a37d0e16ee6 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index.hpp
@@ -20,26 +20,6 @@
# pragma once
#endif
-
-
-#include <boost/config/pragma_message.hpp>
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
- defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
- defined(BOOST_NO_CXX11_CONSTEXPR) || \
- defined(BOOST_NO_CXX11_NULLPTR) || \
- defined(BOOST_NO_CXX11_NOEXCEPT) || \
- defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
- defined(BOOST_NO_CXX11_FINAL) || \
- defined(BOOST_NO_CXX11_ALIGNOF) || \
- defined(BOOST_NO_CXX11_STATIC_ASSERT) || \
- defined(BOOST_NO_CXX11_SMART_PTR) || \
- defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || \
- defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
-
-BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.TypeIndex 1.82 and will be removed in Boost.TypeIndex 1.84.")
-
-#endif
-
#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
# error #include BOOST_TYPE_INDEX_USER_TYPEINDEX
# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
@@ -228,7 +208,7 @@ typedef type_index::type_info_t type_info;
/// \throw Nothing.
/// \return boost::typeindex::type_index with information about the specified type T.
template <class T>
-inline type_index type_id() BOOST_NOEXCEPT {
+inline type_index type_id() noexcept {
return type_index::type_id<T>();
}
@@ -248,7 +228,7 @@ inline type_index type_id() BOOST_NOEXCEPT {
/// \throw Nothing.
/// \return boost::typeindex::type_index with information about the specified type T.
template <class T>
-inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
+inline type_index type_id_with_cvr() noexcept {
return type_index::type_id_with_cvr<T>();
}
@@ -273,7 +253,7 @@ inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
/// \throw Nothing.
/// \return boost::typeindex::type_index with information about the specified variable.
template <class T>
-inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT {
+inline type_index type_id_runtime(const T& runtime_val) noexcept {
return type_index::type_id_runtime(runtime_val);
}
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp
index 818545b8891..d6717f3b8c7 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/ctti_type_index.hpp
@@ -22,10 +22,8 @@
#include <boost/type_index/detail/compile_time_type_info.hpp>
#include <cstring>
+#include <type_traits>
#include <boost/container_hash/hash.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_reference.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
@@ -58,24 +56,17 @@ namespace detail {
/// std::cout << ti.pretty_name();
/// \endcode
class ctti_data {
-#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
public:
ctti_data() = delete;
ctti_data(const ctti_data&) = delete;
ctti_data& operator=(const ctti_data&) = delete;
-#else
-private:
- ctti_data();
- ctti_data(const ctti_data&);
- ctti_data& operator=(const ctti_data&);
-#endif
};
} // namespace detail
/// Helper method for getting detail::ctti_data of a template parameter T.
template <class T>
-inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
+inline const detail::ctti_data& ctti_construct() noexcept {
// Standard C++11, 5.2.10 Reinterpret cast:
// An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue
// v of type "pointer to T1" is converted to the type "pointer to cv T2", the result is static_cast<cv
@@ -105,55 +96,55 @@ inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
class ctti_type_index: public type_index_facade<ctti_type_index, detail::ctti_data> {
const char* data_;
- inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT;
+ inline std::size_t get_raw_name_length() const noexcept;
- BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) noexcept
: data_(data)
{}
public:
typedef detail::ctti_data type_info_t;
- BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR inline ctti_type_index() noexcept
: data_(boost::detail::ctti<void>::n())
{}
- inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT
+ inline ctti_type_index(const type_info_t& data) noexcept
: data_(reinterpret_cast<const char*>(&data))
{}
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline const char* raw_name() const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline const char* name() const BOOST_NOEXCEPT;
+ inline const type_info_t& type_info() const noexcept;
+ BOOST_CXX14_CONSTEXPR inline const char* raw_name() const noexcept;
+ BOOST_CXX14_CONSTEXPR inline const char* name() const noexcept;
inline std::string pretty_name() const;
- inline std::size_t hash_code() const BOOST_NOEXCEPT;
+ inline std::size_t hash_code() const noexcept;
- BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
- BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const noexcept;
+ BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const noexcept;
template <class T>
- BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() noexcept;
template <class T>
- BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() noexcept;
template <class T>
- inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
+ inline static ctti_type_index type_id_runtime(const T& variable) noexcept;
};
-inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT {
+inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const noexcept {
return *reinterpret_cast<const detail::ctti_data*>(data_);
}
-BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const noexcept {
const char* const left = raw_name();
const char* const right = rhs.raw_name();
return /*left == right ||*/ !boost::typeindex::detail::constexpr_strcmp(left, right);
}
-BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const noexcept {
const char* const left = raw_name();
const char* const right = rhs.raw_name();
return /*left != right &&*/ boost::typeindex::detail::constexpr_strcmp(left, right) < 0;
@@ -161,37 +152,37 @@ BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index&
template <class T>
-BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
- typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_t;
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id() noexcept {
+ typedef typename std::remove_reference<T>::type no_ref_t;
+ typedef typename std::remove_cv<no_ref_t>::type no_cvr_t;
return ctti_type_index(boost::detail::ctti<no_cvr_t>::n());
}
template <class T>
-BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() noexcept {
return ctti_type_index(boost::detail::ctti<T>::n());
}
template <class T>
-inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT {
+inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) noexcept {
return variable.boost_type_index_type_id_runtime_();
}
-BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const noexcept {
return data_;
}
-BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const noexcept {
return data_;
}
-inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT {
- return std::strlen(raw_name() + detail::ctti_skip_size_at_end);
+inline std::size_t ctti_type_index::get_raw_name_length() const noexcept {
+ return std::strlen(raw_name() + detail::skip().size_at_end);
}
@@ -202,7 +193,7 @@ inline std::string ctti_type_index::pretty_name() const {
}
-inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT {
+inline std::size_t ctti_type_index::hash_code() const noexcept {
return boost::hash_range(raw_name(), raw_name() + get_raw_name_length());
}
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp
index c80808410dd..9d6129a8d0a 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/compile_time_type_info.hpp
@@ -13,10 +13,10 @@
/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index.
/// Not intended for inclusion from user's code.
-#include <cstring>
#include <boost/config.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/integral_constant.hpp>
+
+#include <cstring>
+#include <type_traits>
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
@@ -35,74 +35,87 @@
#define BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(str1, str2) __builtin_strcmp(str1, str2)
#endif
-#define BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(begin_skip, end_skip, runtime_skip, runtime_skip_until) \
- namespace boost { namespace typeindex { namespace detail { \
- BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_begin = begin_skip; \
- BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_end = end_skip; \
- BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime = runtime_skip; \
- BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[] = runtime_skip_until; \
- }}} /* namespace boost::typeindex::detail */ \
- /**/
/// @endcond
+namespace boost { namespace typeindex { namespace detail {
+ struct ctti_skip {
+ std::size_t size_at_begin;
+ std::size_t size_at_end;
+ const char* until_runtime;
+ std::size_t until_runtime_length;
+ };
+
+ template <std::size_t N>
+ constexpr ctti_skip make_ctti_skip(std::size_t size_at_begin,
+ std::size_t size_at_end,
+ bool more_at_runtime,
+ const char (&until_runtime)[N])
+ {
+ return ctti_skip{size_at_begin, size_at_end, until_runtime, more_at_runtime ? N - 1 : 0};
+ }
+
+ template <std::size_t N>
+ constexpr ctti_skip make_ctti_skip(std::size_t size_at_begin,
+ std::size_t size_at_end,
+ const char (&until_runtime)[N])
+ {
+ return ctti_skip{size_at_begin, size_at_end, until_runtime, N - 1};
+ }
+
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
/* Nothing to document. All the macro docs are moved to <boost/type_index.hpp> */
#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING)
-# include <boost/preprocessor/facilities/expand.hpp>
- BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING )
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING; }
#elif defined(_MSC_VER) && !defined(__clang__) && defined (BOOST_NO_CXX11_NOEXCEPT)
// sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(40, 10, ""); }
#elif defined(_MSC_VER) && !defined(__clang__) && !defined (BOOST_NO_CXX11_NOEXCEPT)
// sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(40, 19, ""); }
#elif defined(__clang__) && defined(__APPLE__)
// Someone made __clang_major__ equal to LLVM version rather than compiler version
// on APPLE platform.
//
// Using less efficient solution because there is no good way to detect real version of Clang.
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "???????????>::n() [T = int"
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(39, 1, "T = "); }
#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0))
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1
// note: checked on 3.0
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(39, 6, ""); }
#elif defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ > 0))
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int"
// note: checked on 3.1, 3.4
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(39, 1, "T = "); }
#elif defined(__EDG__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
// sizeof("static cha boost::detail::ctti<T>::s() [with I = 40U, T = ") - 1, sizeof("]") - 1
// note: checked on 4.14
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(58, 1, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(58, 1, ""); }
#elif defined(__EDG__) && defined(BOOST_NO_CXX14_CONSTEXPR)
// sizeof("static const char *boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
// note: checked on 4.14
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(57, 1, ""); }
#elif defined(__GNUC__) && (__GNUC__ < 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0u; T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(81, 1, false, "")
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0u; } T = ") - 1, sizeof("]") - 1
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(81, 1, ""); }
#elif defined(__GNUC__) && (__GNUC__ >= 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0; T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(80, 1, false, "")
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0; } T = ") - 1, sizeof("]") - 1
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(80, 1, ""); }
#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR)
// sizeof("static const char* boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(57, 1, ""); }
#elif defined(__ghs__)
// sizeof("static const char *boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(57, 1, ""); }
#else
// Deafult code for other platforms... Just skip nothing!
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(0, 0, false, "")
+constexpr ctti_skip skip() noexcept { return detail::make_ctti_skip(0, 0, ""); }
#endif
-#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS
-
-namespace boost { namespace typeindex { namespace detail {
template <bool Condition>
- BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
+ BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() noexcept {
+ static_assert(
Condition,
"TypeIndex library is misconfigured for your compiler. "
"Please define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct values. See section "
@@ -111,8 +124,8 @@ namespace boost { namespace typeindex { namespace detail {
}
template <class T>
- BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
+ BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() noexcept {
+ static_assert(
sizeof(T) && false,
"TypeIndex library could not detect your compiler. "
"Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
@@ -122,7 +135,7 @@ namespace boost { namespace typeindex { namespace detail {
}
#if defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT)
- BOOST_CXX14_CONSTEXPR BOOST_FORCEINLINE bool is_constant_string(const char* str) BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR BOOST_FORCEINLINE bool is_constant_string(const char* str) noexcept {
while (BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(*str)) {
if (*str == '\0')
return true;
@@ -132,17 +145,12 @@ namespace boost { namespace typeindex { namespace detail {
}
#endif // defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT)
- template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::false_type) BOOST_NOEXCEPT {
- return begin;
- }
-
template<class ForwardIterator1, class ForwardIterator2>
BOOST_CXX14_CONSTEXPR inline ForwardIterator1 constexpr_search(
ForwardIterator1 first1,
ForwardIterator1 last1,
ForwardIterator2 first2,
- ForwardIterator2 last2) BOOST_NOEXCEPT
+ ForwardIterator2 last2) noexcept
{
if (first2 == last2) {
return first1; // specified in C++11
@@ -165,7 +173,7 @@ namespace boost { namespace typeindex { namespace detail {
return last1;
}
- BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp_loop(const char *v1, const char *v2) BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp_loop(const char *v1, const char *v2) noexcept {
while (*v1 != '\0' && *v1 == *v2) {
++v1;
++v2;
@@ -174,7 +182,7 @@ namespace boost { namespace typeindex { namespace detail {
return static_cast<int>(*v1) - *v2;
}
- BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) noexcept {
#if !defined(BOOST_NO_CXX14_CONSTEXPR) && defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT) && defined(BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP)
if (boost::typeindex::detail::is_constant_string(v1) && boost::typeindex::detail::is_constant_string(v2))
return boost::typeindex::detail::constexpr_strcmp_loop(v1, v2);
@@ -187,21 +195,21 @@ namespace boost { namespace typeindex { namespace detail {
}
template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::true_type) BOOST_NOEXCEPT {
- const char* const it = constexpr_search(
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin) noexcept {
+ const char* const it = detail::constexpr_search(
begin, begin + ArrayLength,
- ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1
+ skip().until_runtime, skip().until_runtime + skip().until_runtime_length
);
- return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1);
+ return (it == begin + ArrayLength ? begin : it + skip().until_runtime_length);
}
template <unsigned int ArrayLength>
- BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
- assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>();
- return skip_begining_runtime<ArrayLength - ctti_skip_size_at_begin>(
- begin + ctti_skip_size_at_begin,
- boost::integral_constant<bool, ctti_skip_more_at_runtime>()
- );
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) noexcept {
+ detail::assert_compile_time_legths<(ArrayLength > skip().size_at_begin + skip().size_at_end)>();
+ return skip().until_runtime_length
+ ? detail::skip_begining_runtime<ArrayLength - skip().size_at_begin>(begin + skip().size_at_begin)
+ : begin + skip().size_at_begin
+ ;
}
#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
@@ -257,7 +265,7 @@ struct ctti {
#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
//helper functions
template <unsigned int I>
- constexpr static char s() BOOST_NOEXCEPT { // step
+ constexpr static char s() noexcept { // step
constexpr unsigned int offset =
(I >= 10u ? 1u : 0u)
+ (I >= 100u ? 1u : 0u)
@@ -277,12 +285,12 @@ struct ctti {
}
template <unsigned int ...Indexes>
- constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) BOOST_NOEXCEPT {
+ constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) noexcept {
return ::boost::typeindex::detail::cstring<s<Indexes>()...>::data_;
}
template <unsigned int D = 0> // `D` means `Dummy`
- constexpr static const char* n() BOOST_NOEXCEPT {
+ constexpr static const char* n() noexcept {
#if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
constexpr unsigned int size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
#elif defined(__FUNCSIG__)
@@ -300,19 +308,19 @@ struct ctti {
#endif
boost::typeindex::detail::assert_compile_time_legths<
- (size > boost::typeindex::detail::ctti_skip_size_at_begin + boost::typeindex::detail::ctti_skip_size_at_end + sizeof("const *") - 1)
+ (size > boost::typeindex::detail::skip().size_at_begin + boost::typeindex::detail::skip().size_at_end + sizeof("const *") - 1)
>();
- static_assert(!boost::typeindex::detail::ctti_skip_more_at_runtime, "Skipping for GCC in C++14 mode is unsupported");
+ static_assert(!boost::typeindex::detail::skip().until_runtime_length, "Skipping for GCC in C++14 mode is unsupported");
typedef typename boost::typeindex::detail::make_index_seq_impl<
- boost::typeindex::detail::ctti_skip_size_at_begin,
- size - sizeof("const *") + 1 - boost::typeindex::detail::ctti_skip_size_at_begin
+ boost::typeindex::detail::skip().size_at_begin,
+ size - sizeof("const *") + 1 - boost::typeindex::detail::skip().size_at_begin
>::type idx_seq;
return impl(idx_seq());
}
#else
/// Returns raw name. Must be as short, as possible, to avoid code bloat
- BOOST_CXX14_CONSTEXPR static const char* n() BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR static const char* n() noexcept {
#if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
#elif defined(__FUNCSIG__)
@@ -336,4 +344,6 @@ struct ctti {
}} // namespace boost::detail
+
+
#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp
index ba1f068a057..9c69d49c6a8 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/ctti_register_class.hpp
@@ -22,17 +22,17 @@
namespace boost { namespace typeindex { namespace detail {
template <class T>
-inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
- return ctti_construct<T>();
+inline const ctti_data& ctti_construct_typeid_ref(const T*) noexcept {
+ return boost::typeindex::ctti_construct<T>();
}
}}} // namespace boost::typeindex::detail
/// @cond
-#define BOOST_TYPE_INDEX_REGISTER_CLASS \
- virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
- return boost::typeindex::detail::ctti_construct_typeid_ref(this); \
- } \
+#define BOOST_TYPE_INDEX_REGISTER_CLASS \
+ virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const noexcept { \
+ return boost::typeindex::detail::ctti_construct_typeid_ref(this); \
+ } \
/**/
/// @endcond
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp
index 590fc96fb31..20eb818af91 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/detail/stl_register_class.hpp
@@ -22,17 +22,17 @@
namespace boost { namespace typeindex { namespace detail {
template <class T>
-inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
+inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) noexcept {
return typeid(T);
}
}}} // namespace boost::typeindex::detail
/// @cond
-#define BOOST_TYPE_INDEX_REGISTER_CLASS \
- virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
- return boost::typeindex::detail::stl_construct_typeid_ref(this); \
- } \
+#define BOOST_TYPE_INDEX_REGISTER_CLASS \
+ virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const noexcept { \
+ return boost::typeindex::detail::stl_construct_typeid_ref(this); \
+ } \
/**/
/// @endcond
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp
index 06c3cac2f77..66d66e238e7 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/stl_type_index.hpp
@@ -29,30 +29,9 @@
#include <typeinfo>
#include <cstring> // std::strcmp, std::strlen, std::strstr
#include <stdexcept>
-#include <boost/static_assert.hpp>
+#include <type_traits>
#include <boost/throw_exception.hpp>
#include <boost/core/demangle.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-#if (defined(_MSC_VER) && _MSC_VER > 1600) \
- || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
- || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103)
-# define BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
-#else
-# include <boost/container_hash/hash.hpp>
-#endif
-
-#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
- || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
-# include <boost/type_traits/is_signed.hpp>
-# include <boost/type_traits/make_signed.hpp>
-# include <boost/type_traits/type_identity.hpp>
-#endif
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
@@ -86,40 +65,40 @@ private:
const type_info_t* data_;
public:
- inline stl_type_index() BOOST_NOEXCEPT
+ inline stl_type_index() noexcept
: data_(&typeid(void))
{}
- inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT
+ inline stl_type_index(const type_info_t& data) noexcept
: data_(&data)
{}
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+ inline const type_info_t& type_info() const noexcept;
- inline const char* raw_name() const BOOST_NOEXCEPT;
- inline const char* name() const BOOST_NOEXCEPT;
+ inline const char* raw_name() const noexcept;
+ inline const char* name() const noexcept;
inline std::string pretty_name() const;
- inline std::size_t hash_code() const BOOST_NOEXCEPT;
- inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT;
- inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT;
+ inline std::size_t hash_code() const noexcept;
+ inline bool equal(const stl_type_index& rhs) const noexcept;
+ inline bool before(const stl_type_index& rhs) const noexcept;
template <class T>
- inline static stl_type_index type_id() BOOST_NOEXCEPT;
+ inline static stl_type_index type_id() noexcept;
template <class T>
- inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+ inline static stl_type_index type_id_with_cvr() noexcept;
template <class T>
- inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT;
+ inline static stl_type_index type_id_runtime(const T& value) noexcept;
};
-inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT {
+inline const stl_type_index::type_info_t& stl_type_index::type_info() const noexcept {
return *data_;
}
-inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT {
+inline const char* stl_type_index::raw_name() const noexcept {
#ifdef _MSC_VER
return data_->raw_name();
#else
@@ -127,7 +106,7 @@ inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT {
#endif
}
-inline const char* stl_type_index::name() const BOOST_NOEXCEPT {
+inline const char* stl_type_index::name() const noexcept {
return data_->name();
}
@@ -180,12 +159,8 @@ inline std::string stl_type_index::pretty_name() const {
}
-inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
-#ifdef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
+inline std::size_t stl_type_index::hash_code() const noexcept {
return data_->hash_code();
-#else
- return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));
-#endif
}
@@ -203,7 +178,7 @@ inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
/// @endcond
-inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT {
+inline bool stl_type_index::equal(const stl_type_index& rhs) const noexcept {
#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name());
#else
@@ -211,7 +186,7 @@ inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEP
#endif
}
-inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT {
+inline bool stl_type_index::before(const stl_type_index& rhs) const noexcept {
#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0;
#else
@@ -223,26 +198,9 @@ inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCE
template <class T>
-inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
- typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_prefinal_t;
-
- # if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
- || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
-
- // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral'
- // in typeid() expressions. Full template specialization for 'integral' fixes that issue:
- typedef BOOST_DEDUCED_TYPENAME boost::conditional<
- boost::is_signed<no_cvr_prefinal_t>::value,
- boost::make_signed<no_cvr_prefinal_t>,
- boost::type_identity<no_cvr_prefinal_t>
- >::type no_cvr_prefinal_lazy_t;
-
- typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t;
- #else
- typedef no_cvr_prefinal_t no_cvr_t;
- #endif
-
+inline stl_type_index stl_type_index::type_id() noexcept {
+ typedef typename std::remove_reference<T>::type no_ref_t;
+ typedef typename std::remove_cv<no_ref_t>::type no_cvr_t;
return typeid(no_cvr_t);
}
@@ -251,9 +209,9 @@ namespace detail {
}
template <class T>
-inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::conditional<
- boost::is_reference<T>::value || boost::is_const<T>::value || boost::is_volatile<T>::value,
+inline stl_type_index stl_type_index::type_id_with_cvr() noexcept {
+ typedef typename std::conditional<
+ std::is_reference<T>::value || std::is_const<T>::value || std::is_volatile<T>::value,
detail::cvr_saver<T>,
T
>::type type;
@@ -263,7 +221,7 @@ inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
template <class T>
-inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT {
+inline stl_type_index stl_type_index::type_id_runtime(const T& value) noexcept {
#ifdef BOOST_NO_RTTI
return value.boost_type_index_type_id_runtime_();
#else
@@ -273,6 +231,4 @@ inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEX
}} // namespace boost::typeindex
-#undef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
-
#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
diff --git a/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp b/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp
index 4145aa4ea29..e4691af80bd 100644
--- a/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp
+++ b/contrib/restricted/boost/type_index/include/boost/type_index/type_index_facade.hpp
@@ -13,14 +13,8 @@
#include <boost/container_hash/hash_fwd.hpp>
#include <string>
#include <cstring>
-
-#if !defined(BOOST_NO_IOSTREAM)
-#if !defined(BOOST_NO_IOSFWD)
+#include <type_traits>
#include <iosfwd> // for std::basic_ostream
-#else
-#include <ostream>
-#endif
-#endif
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
@@ -62,7 +56,7 @@ template <class Derived, class TypeInfo>
class type_index_facade {
private:
/// @cond
- BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR const Derived & derived() const noexcept {
return *static_cast<Derived const*>(this);
}
/// @endcond
@@ -71,7 +65,7 @@ public:
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
/// \return Name of a type. By default returns Derived::raw_name().
- inline const char* name() const BOOST_NOEXCEPT {
+ inline const char* name() const noexcept {
return derived().raw_name();
}
@@ -83,7 +77,7 @@ public:
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
/// \return True if two types are equal. By default compares types by raw_name().
- inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT {
+ inline bool equal(const Derived& rhs) const noexcept {
const char* const left = derived().raw_name();
const char* const right = rhs.raw_name();
return left == right || !std::strcmp(left, right);
@@ -91,7 +85,7 @@ public:
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
/// \return True if rhs is greater than this. By default compares types by raw_name().
- inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
+ inline bool before(const Derived& rhs) const noexcept {
const char* const left = derived().raw_name();
const char* const right = rhs.raw_name();
return left != right && std::strcmp(left, right) < 0;
@@ -101,7 +95,7 @@ public:
/// \return Hash code of a type. By default hashes types by raw_name().
/// \note Derived class header \b must include <boost/container_hash/hash.hpp>, \b unless this function is redefined in
/// Derived class to not use boost::hash_range().
- inline std::size_t hash_code() const BOOST_NOEXCEPT {
+ inline std::size_t hash_code() const noexcept {
const char* const name_raw = derived().raw_name();
return boost::hash_range(name_raw, name_raw + std::strlen(name_raw));
}
@@ -110,11 +104,11 @@ public:
protected:
/// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw.
/// \return Pointer to unredable/raw type name.
- inline const char* raw_name() const BOOST_NOEXCEPT;
+ inline const char* raw_name() const noexcept;
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
/// \return Const reference to underlying low level type_info_t.
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+ inline const type_info_t& type_info() const noexcept;
/// This is a factory method that is used to create instances of Derived classes.
/// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index.
@@ -124,7 +118,7 @@ protected:
/// \tparam T Type for which type_index must be created.
/// \return type_index for type T.
template <class T>
- static Derived type_id() BOOST_NOEXCEPT;
+ static Derived type_id() noexcept;
/// This is a factory method that is used to create instances of Derived classes.
/// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index.
@@ -134,7 +128,7 @@ protected:
/// \tparam T Type for which type_index must be created.
/// \return type_index for type T.
template <class T>
- static Derived type_id_with_cvr() BOOST_NOEXCEPT;
+ static Derived type_id_with_cvr() noexcept;
/// This is a factory method that is used to create instances of Derived classes.
/// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index.
@@ -143,7 +137,7 @@ protected:
/// \param variable Variable which runtime type will be stored in type_index.
/// \return type_index with runtime type of variable.
template <class T>
- static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT;
+ static Derived type_id_runtime(const T& variable) noexcept;
#endif
@@ -151,96 +145,96 @@ protected:
/// @cond
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
}
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
}
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return rhs < lhs;
}
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(lhs > rhs);
}
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(lhs < rhs);
}
template <class Derived, class TypeInfo>
-BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(lhs == rhs);
}
// ######################### COMPARISONS with Derived ############################ //
template <class Derived, class TypeInfo>
-inline bool operator == (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator == (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return Derived(lhs) == rhs;
}
template <class Derived, class TypeInfo>
-inline bool operator < (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator < (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return Derived(lhs) < rhs;
}
template <class Derived, class TypeInfo>
-inline bool operator > (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator > (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return rhs < Derived(lhs);
}
template <class Derived, class TypeInfo>
-inline bool operator <= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator <= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(Derived(lhs) > rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator >= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator >= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(Derived(lhs) < rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator != (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+inline bool operator != (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) noexcept {
return !(Derived(lhs) == rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return lhs == Derived(rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return lhs < Derived(rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return Derived(rhs) < lhs;
}
template <class Derived, class TypeInfo>
-inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return !(lhs > Derived(rhs));
}
template <class Derived, class TypeInfo>
-inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return !(lhs < Derived(rhs));
}
template <class Derived, class TypeInfo>
-inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
+inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) noexcept {
return !(lhs == Derived(rhs));
}
@@ -262,16 +256,6 @@ bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs)
#endif
#ifndef BOOST_NO_IOSTREAM
-#ifdef BOOST_NO_TEMPLATED_IOSTREAMS
-/// @cond
-/// Ostream operator that will output demangled name
-template <class Derived, class TypeInfo>
-inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade<Derived, TypeInfo>& ind) {
- ostr << static_cast<Derived const&>(ind).pretty_name();
- return ostr;
-}
-/// @endcond
-#else
/// Ostream operator that will output demangled name.
template <class CharT, class TriatT, class Derived, class TypeInfo>
inline std::basic_ostream<CharT, TriatT>& operator<<(
@@ -281,13 +265,12 @@ inline std::basic_ostream<CharT, TriatT>& operator<<(
ostr << static_cast<Derived const&>(ind).pretty_name();
return ostr;
}
-#endif // BOOST_NO_TEMPLATED_IOSTREAMS
#endif // BOOST_NO_IOSTREAM
/// This free function is used by Boost's unordered containers.
/// \note <boost/container_hash/hash.hpp> has to be included if this function is used.
template <class Derived, class TypeInfo>
-inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) BOOST_NOEXCEPT {
+inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) noexcept {
return static_cast<Derived const&>(lhs).hash_code();
}
diff --git a/contrib/restricted/boost/type_index/ya.make b/contrib/restricted/boost/type_index/ya.make
index d95025d2971..ca4428511a5 100644
--- a/contrib/restricted/boost/type_index/ya.make
+++ b/contrib/restricted/boost/type_index/ya.make
@@ -6,18 +6,15 @@ LICENSE(BSL-1.0)
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(1.83.0)
+VERSION(1.84.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/type_index/archive/boost-1.83.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/type_index/archive/boost-1.84.0.tar.gz)
PEERDIR(
contrib/restricted/boost/config
contrib/restricted/boost/container_hash
contrib/restricted/boost/core
- contrib/restricted/boost/preprocessor
- contrib/restricted/boost/static_assert
contrib/restricted/boost/throw_exception
- contrib/restricted/boost/type_traits
)
ADDINCL(