1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- #include "mpt/base/preprocessor.hpp"
- #include "mpt/base/compiletime_warning.hpp"
- #include "mpt/base/macros.hpp"
- #if MPT_CXX_AT_LEAST(20)
- #include <version>
- #else
- #include <array>
- #endif
- #include <array>
- #include <iterator>
- #include <type_traits>
- #include <cstddef>
- #include <cstdint>
- #include <stddef.h>
- #include <stdint.h>
- OPENMPT_NAMESPACE_BEGIN
- #define MPT_UNREFERENCED_PARAMETER(x) MPT_UNUSED(x)
- #define MPT_UNUSED_VARIABLE(x) MPT_UNUSED(x)
- #if MPT_CXX_AT_LEAST(17)
- namespace mpt
- {
- using std::size;
- }
- #else
- namespace mpt
- {
- template <typename T>
- MPT_CONSTEXPR11_FUN auto size(const T &v) -> decltype(v.size())
- {
- return v.size();
- }
- template <typename T, std::size_t N>
- MPT_CONSTEXPR11_FUN std::size_t size(const T (&)[N]) noexcept
- {
- return N;
- }
- }
- #endif
- #if MPT_COMPILER_MSVC
- OPENMPT_NAMESPACE_END
- #include <cstdlib>
- #include <stdlib.h>
- OPENMPT_NAMESPACE_BEGIN
- #define MPT_ARRAY_COUNT(x) _countof(x)
- #else
- #define MPT_ARRAY_COUNT(x) (sizeof((x)) / sizeof((x)[0]))
- #endif
- #define CountOf(x) MPT_ARRAY_COUNT(x)
- #if MPT_COMPILER_MSVC
- #define MPT_MSVC_WORKAROUND_LNK4221_CONCAT_DETAIL(x, y) x##y
- #define MPT_MSVC_WORKAROUND_LNK4221_CONCAT(x, y) MPT_MSVC_WORKAROUND_LNK4221_CONCAT_DETAIL(x, y)
- #define MPT_MSVC_WORKAROUND_LNK4221(x) int MPT_MSVC_WORKAROUND_LNK4221_CONCAT(mpt_msvc_workaround_lnk4221_, x) = 0;
- #endif
- #ifndef MPT_MSVC_WORKAROUND_LNK4221
- #define MPT_MSVC_WORKAROUND_LNK4221(x)
- #endif
- OPENMPT_NAMESPACE_END
|