diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /contrib/restricted/boost/exception/include | |
parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) | |
download | ydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'contrib/restricted/boost/exception/include')
13 files changed, 368 insertions, 0 deletions
diff --git a/contrib/restricted/boost/exception/include/boost/exception/all.hpp b/contrib/restricted/boost/exception/include/boost/exception/all.hpp new file mode 100644 index 00000000000..3272316a040 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/all.hpp @@ -0,0 +1,27 @@ +//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_316FDA946C0D11DEA9CBAE5255D89593 +#define BOOST_EXCEPTION_316FDA946C0D11DEA9CBAE5255D89593 + +#include <boost/config.hpp> +#include <boost/exception/diagnostic_information.hpp> +#include <boost/exception/error_info.hpp> +#include <boost/exception/exception.hpp> +#include <boost/exception/get_error_info.hpp> +#include <boost/exception/info.hpp> +#include <boost/exception/info_tuple.hpp> +#include <boost/exception/errinfo_api_function.hpp> +#include <boost/exception/errinfo_at_line.hpp> +#include <boost/exception/errinfo_errno.hpp> +#include <boost/exception/errinfo_file_handle.hpp> +#include <boost/exception/errinfo_file_name.hpp> +#include <boost/exception/errinfo_file_open_mode.hpp> +#include <boost/exception/errinfo_type_info_name.hpp> +#ifndef BOOST_NO_EXCEPTIONS +#include <boost/exception/errinfo_nested_exception.hpp> +#include <boost/exception_ptr.hpp> +#endif +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/enable_current_exception.hpp b/contrib/restricted/boost/exception/include/boost/exception/enable_current_exception.hpp new file mode 100644 index 00000000000..dcd4d166129 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/enable_current_exception.hpp @@ -0,0 +1,11 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_851700A4F7CF11E6B2EE06DD14915323 +#define BOOST_EXCEPTION_851700A4F7CF11E6B2EE06DD14915323 + +#include <boost/exception/exception.hpp> + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/enable_error_info.hpp b/contrib/restricted/boost/exception/include/boost/exception/enable_error_info.hpp new file mode 100644 index 00000000000..c731f2a0df1 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/enable_error_info.hpp @@ -0,0 +1,11 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_A0F7404AF7CF11E6908227DD14915323 +#define BOOST_EXCEPTION_A0F7404AF7CF11E6908227DD14915323 + +#include <boost/exception/exception.hpp> + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_api_function.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_api_function.hpp new file mode 100644 index 00000000000..cf392590ddd --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_api_function.hpp @@ -0,0 +1,22 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_DDFBB4546C1211DEA4659E9055D89593 +#define BOOST_EXCEPTION_DDFBB4546C1211DEA4659E9055D89593 + +#include <boost/exception/error_info.hpp> + +namespace +boost + { + //Usage hint: + //if( api_function(....)!=0 ) + // BOOST_THROW_EXCEPTION( + // failure() << + // errinfo_api_function("api_function") ); + typedef error_info<struct errinfo_api_function_,char const *> errinfo_api_function; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_at_line.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_at_line.hpp new file mode 100644 index 00000000000..6d13b5fddca --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_at_line.hpp @@ -0,0 +1,18 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_E7255CE26C1211DE85800C9155D89593 +#define BOOST_EXCEPTION_E7255CE26C1211DE85800C9155D89593 + +namespace +boost + { + template <class Tag,class T> class error_info; + + //Use with parsing errors exceptions, for example in a XML file parser. + typedef error_info<struct errinfo_at_line_,int> errinfo_at_line; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_errno.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_errno.hpp new file mode 100644 index 00000000000..31cd7826557 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_errno.hpp @@ -0,0 +1,51 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593 +#define BOOST_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593 + +#include <boost/exception/info.hpp> +#include <errno.h> +#include <string.h> + +#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS +#if __GNUC__*100+__GNUC_MINOR__>301 +#pragma GCC system_header +#endif +#ifdef __clang__ +#pragma clang system_header +#endif +#ifdef _MSC_VER +#pragma warning(push,1) +#pragma warning(disable:4996) +#endif +#endif + +namespace +boost + { + typedef error_info<struct errinfo_errno_,int> errinfo_errno; + + //Usage hint: + //if( c_function(....)!=0 ) + // BOOST_THROW_EXCEPTION( + // failure() << + // errinfo_errno(errno) << + // errinfo_api_function("c_function") ); + inline + std::string + to_string( errinfo_errno const & e ) + { + std::ostringstream tmp; + int v=e.value(); + tmp << '[' << error_info_name(e) << "] = " << v << ", \"" << strerror(v) << "\"\n"; + return tmp.str(); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_handle.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_handle.hpp new file mode 100644 index 00000000000..88cb9c01f37 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_handle.hpp @@ -0,0 +1,20 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_F79E6EE26C1211DEB26E929155D89593 +#define BOOST_EXCEPTION_F79E6EE26C1211DEB26E929155D89593 + +#include <stdio.h> + +namespace +boost + { + template <class> class weak_ptr; + template <class Tag,class T> class error_info; + + typedef error_info<struct errinfo_file_handle_,weak_ptr<FILE> > errinfo_file_handle; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_name.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_name.hpp new file mode 100644 index 00000000000..401495b4924 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_name.hpp @@ -0,0 +1,26 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_FEE5120A6C1211DE94E8BC9155D89593 +#define BOOST_EXCEPTION_FEE5120A6C1211DE94E8BC9155D89593 + +#include <string> + +namespace +boost + { + template <class Tag,class T> class error_info; + + //Usage hint: + //FILE * f=fopen(name,mode); + //if( !f ) + // BOOST_THROW_EXCEPTION( + // file_open_error() << + // errinfo_file_name(name) << + // errinfo_file_open_mode(mode) ); + typedef error_info<struct errinfo_file_name_,std::string> errinfo_file_name; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_open_mode.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_open_mode.hpp new file mode 100644 index 00000000000..84c2bea2c14 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_file_open_mode.hpp @@ -0,0 +1,26 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_056F1F266C1311DE8E74299255D89593 +#define BOOST_EXCEPTION_056F1F266C1311DE8E74299255D89593 + +#include <string> + +namespace +boost + { + template <class Tag,class T> class error_info; + + //Usage hint: + //FILE * f=fopen(name,mode); + //if( !f ) + // BOOST_THROW_EXCEPTION( + // file_open_error() << + // errinfo_file_name(name) << + // errinfo_file_open_mode(mode) ); + typedef error_info<struct errinfo_file_open_mode_,std::string> errinfo_file_open_mode; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_nested_exception.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_nested_exception.hpp new file mode 100644 index 00000000000..022012dee00 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_nested_exception.hpp @@ -0,0 +1,18 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_45CC9A82B77511DEB330FC4956D89593 +#define BOOST_EXCEPTION_45CC9A82B77511DEB330FC4956D89593 + +namespace +boost + { + namespace exception_detail { class clone_base; } + template <class Tag,class T> class error_info; + class exception_ptr; + typedef error_info<struct errinfo_nested_exception_,exception_ptr> errinfo_nested_exception; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/errinfo_type_info_name.hpp b/contrib/restricted/boost/exception/include/boost/exception/errinfo_type_info_name.hpp new file mode 100644 index 00000000000..8f8f23be601 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/errinfo_type_info_name.hpp @@ -0,0 +1,23 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_0E11109E6C1311DEB7EA649255D89593 +#define BOOST_EXCEPTION_0E11109E6C1311DEB7EA649255D89593 + +#include <string> + +namespace +boost + { + template <class Tag,class T> class error_info; + + //Usage hint: + //BOOST_THROW_EXCEPTION( + // bad_type() << + // errinfo_type_info_name(typeid(x).name()) ); + typedef error_info<struct errinfo_type_info_name_,std::string> errinfo_type_info_name; + } + +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/error_info.hpp b/contrib/restricted/boost/exception/include/boost/exception/error_info.hpp new file mode 100644 index 00000000000..6c672eb6b3d --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/error_info.hpp @@ -0,0 +1,9 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_EE7ECCA0433B11E1923E37064924019B +#define BOOST_EXCEPTION_EE7ECCA0433B11E1923E37064924019B +namespace boost { template <class Tag,class T> class error_info; } +#endif diff --git a/contrib/restricted/boost/exception/include/boost/exception/info_tuple.hpp b/contrib/restricted/boost/exception/include/boost/exception/info_tuple.hpp new file mode 100644 index 00000000000..74d7e8734b4 --- /dev/null +++ b/contrib/restricted/boost/exception/include/boost/exception/info_tuple.hpp @@ -0,0 +1,106 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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_EXCEPTION_63EE924290FB11DC87BB856555D89593 +#define BOOST_EXCEPTION_63EE924290FB11DC87BB856555D89593 + +#include <boost/exception/info.hpp> +#include <boost/tuple/tuple.hpp> + +#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS +#if __GNUC__*100+__GNUC_MINOR__>301 +#pragma GCC system_header +#endif +#ifdef __clang__ +#pragma clang system_header +#endif +#ifdef _MSC_VER +#pragma warning(push,1) +#endif +#endif + +namespace +boost + { + template < + class E > + inline + E const & + operator<<( + E const & x, + tuple< > const & v ) + { + return x; + } + + template < + class E, + class Tag1,class T1 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info<Tag1,T1> > const & v ) + { + return x << v.template get<0>(); + } + + template < + class E, + class Tag1,class T1, + class Tag2,class T2 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info<Tag1,T1>, + error_info<Tag2,T2> > const & v ) + { + return x << v.template get<0>() << v.template get<1>(); + } + + template < + class E, + class Tag1,class T1, + class Tag2,class T2, + class Tag3,class T3 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info<Tag1,T1>, + error_info<Tag2,T2>, + error_info<Tag3,T3> > const & v ) + { + return x << v.template get<0>() << v.template get<1>() << v.template get<2>(); + } + + template < + class E, + class Tag1,class T1, + class Tag2,class T2, + class Tag3,class T3, + class Tag4,class T4 > + inline + E const & + operator<<( + E const & x, + tuple< + error_info<Tag1,T1>, + error_info<Tag2,T2>, + error_info<Tag3,T3>, + error_info<Tag4,T4> > const & v ) + { + return x << v.template get<0>() << v.template get<1>() << v.template get<2>() << v.template get<3>(); + } + } + +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif +#endif |