LatNet Builder Manual 2.1.3-6
Software Package for Constructing Highly Uniform Point Sets
|
Overloaded stream operators. More...
Functions | |
template<typename T> | |
std::enable_if< detail::has_const_iterator< T >::valueand!detail::is_ostreamable< T >::value, std::ostream & >::type | operator<< (std::ostream &os, const T &x) |
Overload of the output stream operator for sequences. | |
template<typename T> | |
std::enable_if< detail::is_pair< T >::value, std::ostream & >::type | operator<< (std::ostream &os, const T &x) |
Overload of the output stream operator for pair. |
Overloaded stream operators.
Provides stream operators for all classes that define a const_iterator
type, such as STL containers.
To bring the operators defined in TextStream in the current scope, simply use:
If the preprocessor macro TEXTSTREAM_DISPLAY_COUNT is defined, the number of elements printed to the stream is appended to the output. For example, without defining that macro, the following code:
outputs:
whereas it ouputs:
when TEXTSTREAM_DISPLAY_COUNT is defined (before including TextStream.h).
std::enable_if< detail::has_const_iterator< T >::valueand!detail::is_ostreamable< T >::value, std::ostream & >::type LatBuilder::TextStream::operator<< | ( | std::ostream & | os, |
const T & | x ) |
Overload of the output stream operator for sequences.
This operator can be applied an instance of a class that defines a const_iterator
type, assuming that the members begin()
and end()
are also defined. If the class defines a key_type
type, curly brackets are used as delimitors; otherwise, square brackets are used.