diff --git a/dbms/src/Columns/ColumnVector.cpp b/dbms/src/Columns/ColumnVector.cpp index 1c29bdc10bc..7d053f51796 100644 --- a/dbms/src/Columns/ColumnVector.cpp +++ b/dbms/src/Columns/ColumnVector.cpp @@ -19,6 +19,11 @@ #include #endif +// Allow std::pair copying +#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 8) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclass-memaccess" +#endif namespace DB { @@ -338,10 +343,6 @@ void ColumnVector::getExtremes(Field & min, Field & max) const } /// Explicit template instantiations - to avoid code bloat in headers. -#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 8) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wclass-memaccess" -#endif template class ColumnVector; template class ColumnVector; template class ColumnVector;