TF++, Miscellaneous classes and modules in C++:

◆ swap() [1/2]

template<class T >
T tfxx::ioswap::swap ( const T &  value)

How to swap any generic type.

end of group_ioswap

This function template calls ist specialization swap<IOUnion<T>>. ,

Examples:
tests/fortraniotest.cc.

Definition at line 138 of file bytesex.h.

References tfxx::ioswap::IOUnion< T >::value.

Referenced by file_magic_test(), tfxx::fortranio::FortranBinInput::finish_block(), tfxx::fortranio::FortranBinInput::get(), tfxx::fortranio::FortranBinInput::read_block_size(), and test_swap().

139 {
140  IOUnion<T> in, out;
141  in.value=value;
142  out=swap(in);
143  return(out.value);
144 }
IOUnion< T > swap(const IOUnion< T > &value)
Specialization in case we use use an IOUnion. i.e. overloading the function.
Definition: bytesex.h:153
Here is the caller graph for this function: