Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct X
- {
- constexpr virtual int f() const
- {
- return 0;
- }
- };
- struct A : public X
- {
- constexpr virtual int f() const
- {
- return 1;
- }
- };
- int main()
- {
- A x;
- static_assert(x.f() == 1, "match");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement