diff --git a/include/gtl/vector.hpp b/include/gtl/vector.hpp index 26efda8..7c9c9de 100644 --- a/include/gtl/vector.hpp +++ b/include/gtl/vector.hpp @@ -1311,10 +1311,14 @@ class vector { impl_.e_ += n; } else { if constexpr (std::is_trivially_copyable_v && usingStdAllocator) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnonnull" // disable erroneous warning +#if defined(__GNUC__) || defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wnonnull" // disable erroneous warning +#endif std::memmove((void*)(position + n), (void*)position, tail * sizeof(T)); -#pragma GCC diagnostic pop +#if defined(__GNUC__) || defined(__clang__) + #pragma GCC diagnostic pop +#endif impl_.e_ += n; } else { D_uninitialized_move_a(impl_.e_, impl_.e_ - n, impl_.e_);