When overloading operators in C++ why is T* preferred over bool?

In your class definition the conversion operator operator bool is declared with the qualifier const but the objects used in the if statements are not constant objects.

operator bool() const
                ^^^^^
{
    printf("operator bool()\n");
    return m;
}

Remove the qualifier const and the operator operator bool will be called.

Or declare the conversion operator operator int * like

operator const int* () const
{
    printf("operator int* ()\n");
    return &m;
}

and again the operator operator bool will be called.

When an operator has the qualifier const and applied to a non-constant object then one more conversion that is the qualification conversion is required.

Moreover you may declare the operator even as explicit. For example

explicit operator bool() 
{
    printf("operator bool()\n");
    return m;
}

If you want to see how to arrive at Vlad's (correct) answer yourself, the process is roughly

  1. if statement

    The condition is an expression which is contextually convertible to bool

  2. Contextual conversions come under Implicit conversions - note in particular that

    If there are multiple overloads of the function or operator being called, after the implicit conversion sequence is built from T1 to each available T2, overload resolution rules decide which overload is compiled.

    And then under Order of the conversions, that the third step "zero or one standard conversion sequence" comes after the user-defined conversion, and that this step can convert pointer to bool.

    This means that both the user-defined conversion operators are viable for the middle step in that sequence. Finally,

  3. Overload resolution

    describes how to select the best viable function. Since both operators are viable within the context of the middle step of the conversion sequence, the extra pointer-to-bool conversion that happens after this doesn't contribute to the overload ranking.

    Specifically, the ranking is based on the fact that one operator requires const qualification of its implicit first (this) parameter, and the other doesn't. This is why a pair of const- and non-const-qualified overloads of the same operator will always choose the overload whose qualification most closely matches the object it's being called on.