summaryrefslogblamecommitdiff
path: root/tests/exec/overload2.cpp
blob: d7ea8e81a6474043adbdf84d2f76e76d3582ed90 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                              
#include <iostream>

class A {
public:
  int a;
  A();
  A(int a_param);
};

A::A() { a = 1; }
A::A(int a_param) { a = a_param; }

int main() {
  if ((new A())->a == 1 && (new A(2))->a == 2)
    std::cout << "ok\n";
}