-
-
Save EricWF/588a361030edeaebbbc1155b8347cab0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang++ -std=c++03 -fsyntax-only test.cpp | |
struct base { virtual ~base(); }; | |
template <bool B> | |
struct invalid_base : base { | |
_Static_assert(B, ""); // assert must come before dtor decl | |
virtual ~invalid_base(); | |
}; | |
template <bool B, int Dummy> | |
struct virtual_base : virtual invalid_base<B> { | |
virtual ~virtual_base(); // must be declared | |
}; | |
template <bool B> | |
struct test_type : virtual virtual_base<B, 1>, | |
virtual virtual_base<B, 2> { | |
test_type(); | |
}; | |
test_type<false> b; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment