prog.cpp: In constructor ‘Foo::Foo()’:
prog.cpp:11:77: error: no match for ternary ‘operator?:’ (operand types are ‘bool’, ‘std::shared_ptr<MooA>’, and ‘std::shared_ptr<MooB>’)
Foo() : m_moo(false ? std::make_shared<MooA>() : std::make_shared<MooB>())
^
prog.cpp:11:77: note: candidate is:
prog.cpp:11:77: note: operator?:(bool, int, int) <built-in>
prog.cpp:11:77: note: no known conversion for argument 2 from ‘std::shared_ptr<MooB>’ to ‘int’