2 #ifndef vsl_complex_io_hxx_ 3 #define vsl_complex_io_hxx_ 31 T real_part, imag_part;
34 v = std::complex<T>(real_part, imag_part);
42 os << std::real(v) <<
" + " << std::imag(v) <<
"i ";
45 #define VSL_COMPLEX_IO_INSTANTIATE(T) \ 46 template void vsl_print_summary(std::ostream&, const std::complex<T >&); \ 47 template void vsl_b_write(vsl_b_ostream& s, const std::complex<T >& v); \ 48 template void vsl_b_read(vsl_b_istream& s, std::complex<T >& v) 50 #endif // vsl_complex_io_hxx_ A binary output adaptor for any std::ostream.
void vsl_b_write(vsl_b_ostream &s, const std::complex< T > &v)
Write complex to binary stream.
An adaptor for any std::istream to make it suitable for binary input.
void vsl_print_summary(std::ostream &os, const std::complex< T > &v)
Output a human readable summary to the stream.
Set of functions, and objects to perform binary IO.
void vsl_b_read(vsl_b_istream &s, std::complex< T > &v)
Read complex from binary stream.
binary IO functions for std::complex<T>