#include <iostream>

bool isTrue()
{
    return false;
}

class A
{
public:
    A() 
    {
        std::cout << "A() called" << std::endl; 
    }

    A(const A& ref) 
    { 
        std::cout << "A(const A& ref) called" << std::endl; 
    }

    A& operator=(const A& ref) 
    { 
        std::cout << "A& operator=(const A& ref)" << std::endl; this->member = ref.member;
    }
    
    A(char* string): member(10)
    {
        std::cout << "A(char* string) called" << std::endl;
    }

    A(int value): member(2)
    {
        std::cout << "A(value) called" << std::endl;
    }

    ~A() 
    { 
        std::cout <<"destructor called" << std::endl; 
    }

    void check() 
    {
    	std::cout <<"called the " << member << " constructor" << std::endl;
    }
    
    int member;
};

int main() 
{
    A a = isTrue() ? A("string") : A(10);
    a.check();

    return 0;
}