COVISE Core
Classes | Namespaces | Functions
tryPrint.h File Reference
#include <type_traits>
#include <iostream>
Include dependency graph for tryPrint.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  covise::HasPrintMethod< T >
 

Namespaces

namespace  covise
 list of all chemical elements
 

Functions

template<class T >
static auto covise::hasPrintMethod (int) -> std::integral_constant< bool, std::is_reference< decltype(operator<<(std::cerr, T()))>::value >
 
template<class >
static auto covise::hasPrintMethod (...) -> std::false_type
 
template<class T >
std::enable_if< HasPrintMethod< T >::value >::type covise::tryPrintWithError (std::ostream &os, const T &t, const char *className, const char *errorMsg)
 
template<class T >
std::enable_if<!HasPrintMethod< T >::value &&std::is_arithmetic< T >::value >::type covise::tryPrintWithError (std::ostream &os, const T &t, const char *className, const char *errorMsg)
 
template<class T >
std::enable_if<!HasPrintMethod< T >::value &&!std::is_arithmetic< T >::value >::type covise::tryPrintWithError (std::ostream &os, const T &t, const char *className, const char *errorMsg)
 
template<>
void covise::tryPrintWithError< char const * > (std::ostream &os, const char *const &t, const char *className, const char *errorMsg)
 
template<>
void covise::tryPrintWithError< char * > (std::ostream &os, char *const &t, const char *className, const char *errorMsg)
 
template<class T >
void covise::tryPrint (const T &t)