Lines 333-338
enum __sal_NoAcquire
Link Here
|
333 |
|
333 |
|
334 |
#ifdef __cplusplus |
334 |
#ifdef __cplusplus |
335 |
|
335 |
|
|
|
336 |
#if OSL_DEBUG_LEVEL > 0 |
337 |
# include <boost/cast.hpp> |
338 |
#endif |
339 |
|
336 |
namespace sal { |
340 |
namespace sal { |
337 |
|
341 |
|
338 |
/** |
342 |
/** |
Lines 344-353
namespace sal {
Link Here
|
344 |
type of any of the expressions involved in the compiler warning is changed |
348 |
type of any of the expressions involved in the compiler warning is changed |
345 |
can be found more easily. |
349 |
can be found more easily. |
346 |
|
350 |
|
347 |
Both template arguments T1 and T2 must be integral types. |
351 |
Both template arguments T1 and T2 must be arithmetic types |
|
|
352 |
(colloquially referred to as 'ints' and 'floating point'). |
348 |
*/ |
353 |
*/ |
349 |
template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { |
354 |
template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) |
|
|
355 |
{ |
356 |
#if OSL_DEBUG_LEVEL > 0 |
357 |
return boost::numeric_cast<T1>(n); |
358 |
#else |
350 |
return static_cast< T1 >(n); |
359 |
return static_cast< T1 >(n); |
|
|
360 |
#endif |
351 |
} |
361 |
} |
352 |
|
362 |
|
353 |
} |
363 |
} |