> ======================================================================== > http://mondrian.corp.google.com/file/9152568///depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc?a=2 > File //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc > (snapshot 2) > ------------------------------------ > Line 1187: maximum_age_double == std::numeric_limits<double>::infinity()) { > Er...does this work? Should we not check has_infinity() first? I think it should be OK. std::numeric_limits<T>::has_infinity is provided because this is a templated class, and not all specialisations provide a concept of inifinty (eg std::numeric_limits<int>). However, std::numeric_limits<double>::has_infinity should always be true, so std::numeric_limits<double>::infinity() is safe. See http://msdn.microsoft.com/en-us/library/4hs47w6w(VS.80).aspx and http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/standlib/ref/i26lt3blimits26gt3b.htm.
I've added a check to be safe. New snapshot uploaded.
