@Veritas Yes and no. Yes, the instantiation can be valid. But no, it won't be until you
#include <string>
so that
std::string
is a type it really knows about (including
<iostream>
is enough to get you a partial declaration, of
std::string
, so it won't fail outright, but won't work entirely correctly either). You don't need to specify the type explicitly either.
coliru.stacked-crooked.com/a/16618e1f94d235fd