Manually convince clang-cl to fail shared_from_fail and weak_from_fail

This commit is contained in:
Peter Dimov
2020-04-02 04:01:21 +03:00
parent da81452f1f
commit 54b5498208
2 changed files with 12 additions and 0 deletions

View File

@ -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<X> px( new X );

View File

@ -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<X> px( new X );