From 2131265b3de6f22fde5bc8f0b4f6eb95816f7e2b Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 12 Jul 2013 11:14:11 +0000 Subject: [PATCH] Fix tests build under MSVC for is_copy_constructible triat (refs #8802) [SVN r85006] --- test/is_copy_constructible_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/is_copy_constructible_test.cpp b/test/is_copy_constructible_test.cpp index d05988f..a54c399 100644 --- a/test/is_copy_constructible_test.cpp +++ b/test/is_copy_constructible_test.cpp @@ -19,9 +19,19 @@ struct has { has(const has&){} }; +// MSVC can not generate neither default constructor, nor assignment operator, +// nor copy constructor for `has2` type. Supressing those warnings is essential, +// because we treat warnings as errors in those tests +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 4512 4610) +#endif struct has2 { const int& i; }; +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif struct has3 { has3(has3&){}