From 4a9ce6e2555dfaf9155fa279f25667350377f688 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Sat, 15 Mar 2025 18:03:23 +0400 Subject: feat: chtype wrap --- include/ncurses/utils/macros.hpp | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 include/ncurses/utils/macros.hpp (limited to 'include/ncurses/utils/macros.hpp') diff --git a/include/ncurses/utils/macros.hpp b/include/ncurses/utils/macros.hpp new file mode 100644 index 0000000..d26423b --- /dev/null +++ b/include/ncurses/utils/macros.hpp @@ -0,0 +1,50 @@ +#ifndef INCLUDE_NCURSES_MARCOS_HPP_ +#define INCLUDE_NCURSES_MARCOS_HPP_ + +#if !defined(NCURSES_CPP_NAMESPACE) +#define NCURSES_CPP_NAMESPACE ncurses +#endif + +#if defined(__cpp_constexpr) +#define NCURSES_CPP_CONSTEXPR constexpr +#if 201304 <= __cpp_constexpr +#define NCURSES_CPP_CONSTEXPR_14 constexpr +#else +#define NCURSES_CPP_CONSTEXPR_14 +#endif +#if (201907 <= __cpp_constexpr) && \ + (!defined(__GNUC__) || (110400 < GCC_VERSION)) +#define NCURSES_CPP_CONSTEXPR_20 constexpr +#else +#define NCURSES_CPP_CONSTEXPR_20 +#endif +#define NCURSES_CPP_CONST_OR_CONSTEXPR constexpr +#else +#define NCURSES_CPP_CONSTEXPR +#define NCURSES_CPP_CONSTEXPR_14 +#define NCURSES_CPP_CONST_OR_CONSTEXPR const +#endif + +#if !defined(NCURSES_CPP_CONSTEXPR_INLINE) +#if 201606L <= __cpp_inline_variables +#define NCURSES_CPP_CONSTEXPR_INLINE NCURSES_CPP_CONSTEXPR inline +#else +#define NCURSES_CPP_CONSTEXPR_INLINE NCURSES_CPP_CONSTEXPR +#endif +#endif + +#if !defined(NCURSES_CPP_NOEXCEPT) +#if defined(_MSC_VER) && (_MSC_VER <= 1800) +#define NCURSES_CPP_NOEXCEPT +#else +#define NCURSES_CPP_NOEXCEPT noexcept +#define NCURSES_CPP_HAS_NOEXCEPT 1 +#if defined(NCURSES_CPP_NO_EXCEPTIONS) +#define NCURSES_CPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept +#else +#define NCURSES_CPP_NOEXCEPT_WHEN_NO_EXCEPTIONS +#endif +#endif +#endif + +#endif // INCLUDE_NCURSES_MARCOS_HPP_ -- cgit v1.2.3