The Free and Open Productivity Suite
QA Volunteers Needed -- Help us test OpenOffice

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for Apache OpenOffice version 3.4.

Global Functions in Namespace sal
in Sourcefile types.h


static_int_cast

template< typename T1, typename T2 >


T1 static_int_cast(
T2 n );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO YES NO YES NO

Summary
A static_cast between integral types, to avoid C++ compiler warnings.

Description
   In C++ source code, use sal::static_int_cast<T>(n) instead of
   static_cast<T>(n) whenever a compiler warning about integral type problems
   shall be silenced.  That way, source code that needs to be modified when the
   type of any of the expressions involved in the compiler warning is changed
   can be found more easily.

   Both template arguments T1 and T2 must be integral types.

Top of Page

Apache Feather

Copyright & License | Privacy | Contact Us | Donate

Apache, the Apache feather logo, and OpenOffice are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.