diff options
author | Daniil Rozanov <dev@rozanov.info> | 2025-03-15 18:03:23 +0400 |
---|---|---|
committer | Daniil Rozanov <dev@rozanov.info> | 2025-03-15 18:03:23 +0400 |
commit | 4a9ce6e2555dfaf9155fa279f25667350377f688 (patch) | |
tree | 11bc0ea3a7b1c0be2c47419b7058d46d16e5f9f4 /include/ncurses/utils/macros.hpp |
feat: chtype wrap
Diffstat (limited to 'include/ncurses/utils/macros.hpp')
-rw-r--r-- | include/ncurses/utils/macros.hpp | 50 |
1 files changed, 50 insertions, 0 deletions
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_ |