There would be two implicit conversions involved:
- to
std::string
- to
Foo
C++ does at most one:
From 4 Standard conversions (N3337)
Standard conversions are implicit conversions with built-in meaning.
Clause 4 enumerates the full set of such conversions. A standard
conversion sequence is a sequence of standard conversions in the
following order:
— Zero or one conversion from the following set:
lvalue-to-rvalue conversion, array-to-pointer conversion, and
function-to-pointer conversion.
— Zero or one conversion from the
following set: integral promotions, floating point promotion, integral
conversions, floating point conversions, floating-integral
conversions, pointer conversions, pointer to member conversions, and
boolean conversions.
— Zero or one qualification conversion.
Also 12.3 Conversions (N3337)
1 Type conversions of class objects can be specified by constructors and
by conversion functions. These conversions are called user-defined
conversions and are used for implicit type conversions (Clause 4), for
initialization (8.5), and for explicit type conversions (5.4, 5.2.9).
2 User-defined conversions are applied only where they are unambiguous
(10.2, 12.3.2). Conversions obey the access control rules (Clause 11).
Access control is applied after ambiguity resolution (3.4).
[...]
4 At most one user-defined
conversion (constructor or conversion function) is implicitly applied
to a single value.
(Emphasis mine)