1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

gcc compile fix

This commit is contained in:
Ivan Savenko 2013-04-18 07:55:57 +00:00
parent 850f47261d
commit 857274a670

View File

@ -169,7 +169,8 @@ template<typename Der, typename Num>
std::ostream & operator << (std::ostream & os, BaseForID<Der, Num> id)
{
//We use common type with short to force char and unsigned char to be promoted and formatted as numbers.
return os << boost::common_type<short, Num>::type(id.getNum());
typedef typename std::common_type<short, Num>::type Number;
return os << static_cast<Number>(id.getNum());
}
class ArtifactInstanceID : public BaseForID<ArtifactInstanceID, si32>