1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| template <typename T>
void print(std::ostream& stream, T t)
{
stream << t;
}
template <typename T, typename
Args>
void print(std::ostream& stream, T t, Args
args)
{
stream << t ;
print(stream, args
) ;
}
template <typename
Args>
void ThrowIf(bool condition, Args
args)
{
if (condition)
{
std ::ostringstream message;
print(message, args
) ;
throw BaseException(message.str()) :
}
}
::Fx::Common::ErrorHandling::BaseException::ThrowIf(condition, str1, int1, str2, int2) ; |
Partager