Update: conditional explicit has made it into the C++20 draft. more on cppreference
The cppreference std::tuple constructor page has a bunch of C++1
One way that seems to work with most compilers is to add a dummy parameter to one of the functions, to make them slightly different.
// constructor is explicit if T is integral
struct S {
template ::value>::type>
S(T t) {}
template ::value>::type,
typename dummy = void>
explicit S(T t) {}
};
int main()
{
S s1(7);
S s2("Hello");
}
Compiles with MSVC 2015.