diff --git a/test/shared_from_fail.cpp b/test/shared_from_fail.cpp index b7275a7..5d670fa 100644 --- a/test/shared_from_fail.cpp +++ b/test/shared_from_fail.cpp @@ -9,6 +9,12 @@ struct X: public boost::enable_shared_from { }; +#if defined(__clang__) && defined(_MSC_VER) +// clang-cl claims that it accepts this code for compatibility +// with msvc, but no version of msvc accepts it +# pragma clang diagnostic error "-Wmicrosoft-using-decl" +#endif + int main() { boost::shared_ptr px( new X ); diff --git a/test/weak_from_fail.cpp b/test/weak_from_fail.cpp index 5d75e40..7503c3f 100644 --- a/test/weak_from_fail.cpp +++ b/test/weak_from_fail.cpp @@ -9,6 +9,12 @@ struct X: public boost::enable_shared_from { }; +#if defined(__clang__) && defined(_MSC_VER) +// clang-cl claims that it accepts this code for compatibility +// with msvc, but no version of msvc accepts it +# pragma clang diagnostic error "-Wmicrosoft-using-decl" +#endif + int main() { boost::shared_ptr px( new X );