|
|
|
Fortran Intrinsics and Additional Functions
Fortran intrinsic mathematical functions for which no standard C++ equivalent exists are provided as inline functions in the Fmath.hh header. This includes max and min functions with up to six arguments, two-argument max and min functions for numeric types that return by value (for efficiency), Fortran 95 bit functions, and equivalents to the Fortran MOD and SIGN functions. Additional mathematical functions are also provided in Fmath.hh.
The char.functions module has a mix of functions for the char type, including the Fortran intrinsic ICHAR and IACHAR functions.
The string.functions module has Fortran intrinsic string functions that are appropriate for (non-fixed length) std::string, and useful predicate, searching, and conversion functions for std::string, including std::string numeric conversion functions:
- The string_of( number ) functions provide a range of conversions to std::string.
- The is_type< numeric_type >( std::string ) function templates tests whether a std::string is a valid representation of a specified numeric type. Non-template wrapper functions for the common numeric types are provided for convenience: is_int, is_double, etc.
- The type_of< numeric_type >( std::string ) function templates convert a std::string to a specified numeric type. Non-template wrapper functions for the common numeric types are provided for convenience: int_of, double_of, etc.
The rvalue_cast function template allows the conversion of an rvalue to a non-const reference.
|
|
|
|