mlpack 3.4.2
nulloutstream.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_CORE_UTIL_NULLOUTSTREAM_HPP
14#define MLPACK_CORE_UTIL_NULLOUTSTREAM_HPP
15
16#include <iostream>
17#include <streambuf>
18#include <string>
19
20namespace mlpack {
21namespace util {
22
28{
29 public:
34
38 NullOutStream(const NullOutStream& /* other */) { }
39
41 NullOutStream& operator<<(bool) { return *this; }
43 NullOutStream& operator<<(short) { return *this; }
45 NullOutStream& operator<<(unsigned short) { return *this; }
47 NullOutStream& operator<<(int) { return *this; }
49 NullOutStream& operator<<(unsigned int) { return *this; }
51 NullOutStream& operator<<(long) { return *this; }
53 NullOutStream& operator<<(unsigned long) { return *this; }
55 NullOutStream& operator<<(float) { return *this; }
57 NullOutStream& operator<<(double) { return *this; }
59 NullOutStream& operator<<(long double) { return *this; }
61 NullOutStream& operator<<(void*) { return *this; }
63 NullOutStream& operator<<(const char*) { return *this; }
65 NullOutStream& operator<<(std::string&) { return *this; }
67 NullOutStream& operator<<(std::streambuf*) { return *this; }
69 NullOutStream& operator<<(std::ostream& (*) (std::ostream&)) { return *this; }
71 NullOutStream& operator<<(std::ios& (*) (std::ios&)) { return *this; }
73 NullOutStream& operator<<(std::ios_base& (*) (std::ios_base&))
74 { return *this; }
75
77 template<typename T>
78 NullOutStream& operator<<(const T&) { return *this; }
79};
80
81} // namespace util
82} // namespace mlpack
83
84#endif
Used for Log::Debug when not compiled with debugging symbols.
NullOutStream & operator<<(std::string &)
Does nothing.
NullOutStream & operator<<(float)
Does nothing.
NullOutStream & operator<<(double)
Does nothing.
NullOutStream & operator<<(int)
Does nothing.
NullOutStream & operator<<(long)
Does nothing.
NullOutStream & operator<<(void *)
Does nothing.
NullOutStream & operator<<(const char *)
Does nothing.
NullOutStream & operator<<(unsigned int)
Does nothing.
NullOutStream & operator<<(unsigned short)
Does nothing.
NullOutStream & operator<<(long double)
Does nothing.
NullOutStream & operator<<(short)
Does nothing.
NullOutStream & operator<<(std::ios &(*)(std::ios &))
Does nothing.
NullOutStream & operator<<(unsigned long)
Does nothing.
NullOutStream & operator<<(const T &)
Does nothing.
NullOutStream & operator<<(bool)
Does nothing.
NullOutStream & operator<<(std::streambuf *)
Does nothing.
NullOutStream & operator<<(std::ostream &(*)(std::ostream &))
Does nothing.
NullOutStream & operator<<(std::ios_base &(*)(std::ios_base &))
Does nothing.
NullOutStream(const NullOutStream &)
Does nothing.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1