Skip to content

Instantly share code, notes, and snippets.

@Themaister
Created June 27, 2012 22:17
Show Gist options
  • Save Themaister/3007216 to your computer and use it in GitHub Desktop.
Save Themaister/3007216 to your computer and use it in GitHub Desktop.
struct Foo
{
virtual ~Foo() = default;
};
struct Bar : Foo
{
~Bar();
};
// Clang++ 3.1 in C++11 mode compiles this fine, G++ 4.7.1 complains:
// test.cpp:8:4: error: looser throw specifier for 'virtual Bar::~Bar()'
// test.cpp:3:12: error: overriding 'virtual Foo::~Foo() noexcept (true)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment