Deprecate C++98 to 14

This commit is contained in:
christophe
2025-10-15 10:20:54 +02:00
committed by Christophe
parent b0a359c6f3
commit cfec72509a
14 changed files with 285 additions and 148 deletions

View File

@@ -578,7 +578,7 @@ namespace findMSB
}
# endif//GLM_HAS_BITSCAN_WINDOWS
# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
# if ((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_COMPILER & GLM_COMPILER_VC))
template<typename genIUType>
static int findMSB_avx(genIUType Value)
{
@@ -589,7 +589,7 @@ namespace findMSB
return int(_tzcnt_u32(Value));
}
# endif//GLM_ARCH & GLM_ARCH_AVX && GLM_PLATFORM & GLM_PLATFORM_WINDOWS
# endif//((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
template<typename genIUType>
static int findMSB_095(genIUType Value)
@@ -756,7 +756,7 @@ namespace findMSB
std::clock_t Timestamps6 = std::clock();
# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
# if ((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_COMPILER & GLM_COMPILER_VC))
for(std::size_t k = 0; k < Count; ++k)
for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
{
@@ -765,7 +765,7 @@ namespace findMSB
}
std::clock_t Timestamps7 = std::clock();
# endif
# endif//((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_COMPILER & GLM_COMPILER_VC))
std::printf("glm::findMSB: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
std::printf("findMSB - nlz1: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
@@ -777,9 +777,9 @@ namespace findMSB
# endif//GLM_HAS_BITSCAN_WINDOWS
std::printf("findMSB - pop: %d clocks\n", static_cast<int>(Timestamps6 - Timestamps5));
# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
# if ((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_COMPILER & GLM_COMPILER_VC))
std::printf("findMSB - avx tzcnt: %d clocks\n", static_cast<int>(Timestamps7 - Timestamps6));
# endif//GLM_ARCH & GLM_ARCH_AVX && GLM_PLATFORM & GLM_PLATFORM_WINDOWS
# endif//((GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_COMPILER & GLM_COMPILER_VC))
return Error;
}

View File

@@ -9,7 +9,7 @@
#ifdef NDEBUG
#if GLM_COMPILER & GLM_COMPILER_CLANG
#if (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wsign-conversion"
#endif
@@ -183,7 +183,7 @@ static void error(int x, int y)
std::printf("Error for x = %08x, got %08x\n", x, y);
}
#if defined(_MSC_VER)
#if (GLM_COMPILER & GLM_COMPILER_VC)
# pragma warning(push)
# pragma warning(disable: 4389) // nonstandard extension used : nameless struct/union
#endif
@@ -300,11 +300,9 @@ int main()
std::printf("Passed all %d cases.\n", static_cast<int>(sizeof(test)/8));
}
#if defined(_MSC_VER)
#if (GLM_COMPILER & GLM_COMPILER_VC)
# pragma warning(pop)
#endif
#if GLM_COMPILER & GLM_COMPILER_CLANG
#elif (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic pop
#endif

View File

@@ -264,7 +264,7 @@ static int ntz11(unsigned int n) {
};
unsigned int k;
n = n & (-n); /* isolate lsb */
printf("n = %d\n", n);
//printf("n = %d\n", n);
#if defined(SLOW_MUL)
k = (n << 11) - n;
k = (k << 2) + k;

View File

@@ -87,6 +87,9 @@ static int test_vec3_aligned()
#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
#elif (GLM_COMPILER & GLM_COMPILER_VC)
# pragma warning(push)
# pragma warning(disable: 4324) // 'test_vec3_aligned::Struct2': structure was padded due to alignment specifier
#endif
struct Struct2
@@ -98,6 +101,8 @@ static int test_vec3_aligned()
#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
#elif (GLM_COMPILER & GLM_COMPILER_VC)
# pragma warning(pop)
#endif
std::size_t const Size2 = sizeof(Struct2);