#include <exception>
#include <limits>
#include <utility>
Go to the source code of this file.
Namespaces | |
nonstd | |
nonstd::scope | |
nonstd::scope::std11 | |
nonstd::scope::std14 | |
nonstd::scope::std17 | |
nonstd::scope::std20 | |
Typedefs | |
typedef bool_constant< true > | nonstd::scope::std11::true_type |
typedef bool_constant< false > | nonstd::scope::std11::false_type |
Functions | |
template<typename T > | |
int | nonstd::scope::std17::to_int (T x) scope_noexcept |
template<class EF > | |
scope_exit< EF > | nonstd::scope::make_scope_exit (EF action) |
template<class EF > | |
scope_fail< EF > | nonstd::scope::make_scope_fail (EF action) |
template<class EF > | |
scope_success< EF > | nonstd::scope::make_scope_success (EF action) |
template<class R , class D , class S > | |
unique_resource< typename std11::decay< R >::type, typename std11::decay< D >::type > | nonstd::scope::make_unique_resource_checked (R const &resource, S const &invalid, D const &deleter) |
#define scope_lite_MAJOR 0 |
Definition at line 15 of file scope-lite.hpp.
#define scope_lite_MINOR 2 |
Definition at line 16 of file scope-lite.hpp.
#define scope_lite_PATCH 0 |
Definition at line 17 of file scope-lite.hpp.
#define scope_lite_VERSION scope_STRINGIFY(scope_lite_MAJOR) "." scope_STRINGIFY(scope_lite_MINOR) "." scope_STRINGIFY(scope_lite_PATCH) |
Definition at line 19 of file scope-lite.hpp.
#define scope_STRINGIFY | ( | x | ) | scope_STRINGIFY_( x ) |
Definition at line 21 of file scope-lite.hpp.
#define scope_STRINGIFY_ | ( | x | ) | #x |
Definition at line 22 of file scope-lite.hpp.
#define scope_SCOPE_DEFAULT 0 |
Definition at line 26 of file scope-lite.hpp.
#define scope_SCOPE_NONSTD 1 |
Definition at line 27 of file scope-lite.hpp.
#define scope_SCOPE_STD 2 |
Definition at line 28 of file scope-lite.hpp.
#define scope_HAVE_TWEAK_HEADER 0 |
Definition at line 38 of file scope-lite.hpp.
#define scope_CONFIG_SELECT_SCOPE ( scope_HAVE_STD_SCOPE ? scope_SCOPE_STD : scope_SCOPE_NONSTD ) |
Definition at line 45 of file scope-lite.hpp.
#define scope_CPLUSPLUS __cplusplus |
Definition at line 59 of file scope-lite.hpp.
#define scope_CPP98_OR_GREATER ( scope_CPLUSPLUS >= 199711L ) |
Definition at line 63 of file scope-lite.hpp.
#define scope_CPP11_OR_GREATER ( scope_CPLUSPLUS >= 201103L ) |
Definition at line 64 of file scope-lite.hpp.
#define scope_CPP14_OR_GREATER ( scope_CPLUSPLUS >= 201402L ) |
Definition at line 65 of file scope-lite.hpp.
#define scope_CPP17_OR_GREATER ( scope_CPLUSPLUS >= 201703L ) |
Definition at line 66 of file scope-lite.hpp.
#define scope_CPP20_OR_GREATER ( scope_CPLUSPLUS >= 202000L ) |
Definition at line 67 of file scope-lite.hpp.
#define scope_HAVE_STD_SCOPE 0 |
Definition at line 78 of file scope-lite.hpp.
#define scope_USES_STD_SCOPE ( (scope_CONFIG_SELECT_SCOPE == scope_SCOPE_STD) || ((scope_CONFIG_SELECT_SCOPE == scope_SCOPE_DEFAULT) && scope_HAVE_STD_SCOPE) ) |
Definition at line 81 of file scope-lite.hpp.
#define scope_BETWEEN | ( | v, | |
lo, | |||
hi | |||
) | ( (lo) <= (v) && (v) < (hi) ) |
Definition at line 107 of file scope-lite.hpp.
#define scope_COMPILER_MSVC_VER 0 |
Definition at line 127 of file scope-lite.hpp.
#define scope_COMPILER_MSVC_VERSION 0 |
Definition at line 128 of file scope-lite.hpp.
#define scope_COMPILER_VERSION | ( | major, | |
minor, | |||
patch | |||
) | ( 10 * ( 10 * (major) + (minor) ) + (patch) ) |
Definition at line 151 of file scope-lite.hpp.
#define scope_COMPILER_APPLECLANG_VERSION 0 |
Definition at line 160 of file scope-lite.hpp.
#define scope_COMPILER_CLANG_VERSION 0 |
Definition at line 161 of file scope-lite.hpp.
#define scope_COMPILER_GNUC_VERSION 0 |
Definition at line 167 of file scope-lite.hpp.
#define scope_HAVE | ( | feature | ) | ( scope_HAVE_##feature ) |
Definition at line 172 of file scope-lite.hpp.
#define scope_HAS_CPP0X 0 |
Definition at line 177 of file scope-lite.hpp.
#define scope_CPP11_90 (scope_CPP11_OR_GREATER || scope_COMPILER_MSVC_VER >= 1500) |
Definition at line 180 of file scope-lite.hpp.
#define scope_CPP11_100 (scope_CPP11_OR_GREATER || scope_COMPILER_MSVC_VER >= 1600) |
Definition at line 181 of file scope-lite.hpp.
#define scope_CPP11_110 (scope_CPP11_OR_GREATER || scope_COMPILER_MSVC_VER >= 1700) |
Definition at line 182 of file scope-lite.hpp.
#define scope_CPP11_120 (scope_CPP11_OR_GREATER || scope_COMPILER_MSVC_VER >= 1800) |
Definition at line 183 of file scope-lite.hpp.
#define scope_CPP11_140 (scope_CPP11_OR_GREATER || scope_COMPILER_MSVC_VER >= 1900) |
Definition at line 184 of file scope-lite.hpp.
#define scope_CPP14_000 (scope_CPP14_OR_GREATER) |
Definition at line 186 of file scope-lite.hpp.
#define scope_CPP17_000 (scope_CPP17_OR_GREATER) |
Definition at line 188 of file scope-lite.hpp.
#define scope_CPP17_140 (scope_CPP17_OR_GREATER || scope_COMPILER_MSVC_VER >= 1900) |
Definition at line 189 of file scope-lite.hpp.
#define scope_HAVE_CONSTEXPR_11 scope_CPP11_140 |
Definition at line 193 of file scope-lite.hpp.
#define scope_HAVE_IS_DEFAULT scope_CPP11_120 |
Definition at line 195 of file scope-lite.hpp.
#define scope_HAVE_IS_DELETE scope_CPP11_120 |
Definition at line 196 of file scope-lite.hpp.
#define scope_HAVE_NOEXCEPT scope_CPP11_140 |
Definition at line 197 of file scope-lite.hpp.
#define scope_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG scope_CPP11_120 |
Definition at line 198 of file scope-lite.hpp.
#define scope_HAVE_STATIC_ASSERT scope_CPP11_90 |
Definition at line 199 of file scope-lite.hpp.
#define scope_HAVE_TRAILING_RETURN_TYPE scope_CPP11_120 |
Definition at line 200 of file scope-lite.hpp.
#define scope_HAVE_VALUE_INITIALIZATION scope_CPP11_120 |
Definition at line 201 of file scope-lite.hpp.
#define scope_HAVE_CONSTEXPR_14 scope_CPP14_000 |
Definition at line 205 of file scope-lite.hpp.
#define scope_HAVE_DEDUCTION_GUIDES scope_CPP17_000 |
Definition at line 209 of file scope-lite.hpp.
#define scope_HAVE_NODISCARD scope_CPP17_000 |
Definition at line 210 of file scope-lite.hpp.
#define scope_HAVE_IS_TRIVIAL scope_CPP11_110 |
Definition at line 214 of file scope-lite.hpp.
#define scope_HAVE_IS_TRIVIALLY_COPYABLE scope_CPP11_110 && !scope_BETWEEN(scope_COMPILER_GNUC_VERSION, 1, 500) |
Definition at line 215 of file scope-lite.hpp.
#define scope_HAVE_IS_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 216 of file scope-lite.hpp.
#define scope_HAVE_IS_COPY_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 217 of file scope-lite.hpp.
#define scope_HAVE_IS_MOVE_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 218 of file scope-lite.hpp.
#define scope_HAVE_IS_NOTHROW_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 219 of file scope-lite.hpp.
#define scope_HAVE_IS_NOTHROW_COPY_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 220 of file scope-lite.hpp.
#define scope_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE scope_CPP11_110 |
Definition at line 221 of file scope-lite.hpp.
#define scope_HAVE_IS_COPY_ASSIGNABLE scope_CPP11_110 |
Definition at line 222 of file scope-lite.hpp.
#define scope_HAVE_IS_NOTHROW_ASSIGNABLE scope_CPP11_110 |
Definition at line 223 of file scope-lite.hpp.
#define scope_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE scope_CPP11_110 |
Definition at line 224 of file scope-lite.hpp.
#define scope_HAVE_REFERENCE_WRAPPER scope_CPP11_110 |
Definition at line 226 of file scope-lite.hpp.
#define scope_HAVE_REMOVE_CV scope_CPP11_90 |
Definition at line 228 of file scope-lite.hpp.
#define scope_HAVE_REMOVE_REFERENCE scope_CPP11_90 |
Definition at line 229 of file scope-lite.hpp.
#define scope_HAVE_TYPE_TRAITS scope_CPP11_110 |
Definition at line 231 of file scope-lite.hpp.
#define scope_HAVE_TR1_TYPE_TRAITS ((!! scope_COMPILER_GNUC_VERSION ) && scope_CPP11_OR_GREATER) |
Definition at line 232 of file scope-lite.hpp.
#define scope_HAVE_DECAY scope_CPP11_110 |
Definition at line 234 of file scope-lite.hpp.
#define scope_HAVE_DECAY_TR1 scope_HAVE_TR1_TYPE_TRAITS |
Definition at line 235 of file scope-lite.hpp.
#define scope_HAVE_IS_SAME scope_HAVE_TYPE_TRAITS |
Definition at line 237 of file scope-lite.hpp.
#define scope_HAVE_IS_SAME_TR1 scope_HAVE_TR1_TYPE_TRAITS |
Definition at line 238 of file scope-lite.hpp.
#define scope_HAVE_UNCAUGHT_EXCEPTIONS scope_CPP17_140 |
Definition at line 246 of file scope-lite.hpp.
#define scope_constexpr /*constexpr*/ |
Definition at line 253 of file scope-lite.hpp.
#define scope_constexpr14 /*constexpr*/ |
Definition at line 259 of file scope-lite.hpp.
#define scope_is_delete |
Definition at line 266 of file scope-lite.hpp.
#define scope_is_delete_access private |
Definition at line 267 of file scope-lite.hpp.
#define scope_noexcept /*noexcept*/ |
Definition at line 274 of file scope-lite.hpp.
Referenced by nonstd::scope::std17::to_int().
#define scope_noexcept_op | ( | expr | ) | /*noexcept(expr)*/ |
Definition at line 275 of file scope-lite.hpp.
#define scope_nodiscard /*[[nodiscard]]*/ |
Definition at line 281 of file scope-lite.hpp.
#define scope_static_assert | ( | expr, | |
msg | |||
) | /*static_assert((expr), msg)*/ |
Definition at line 287 of file scope-lite.hpp.
#define scope_USE_POST_CPP98_VERSION scope_CPP11_100 |
Definition at line 292 of file scope-lite.hpp.
#define scope_ENABLE_IF_R_ | ( | VA, | |
R | |||
) | R |
Definition at line 311 of file scope-lite.hpp.
#define scope_ENABLE_IF_ | ( | VA | ) |
Definition at line 324 of file scope-lite.hpp.