1 #ifndef __JLANG__JSTREAMAVAILABLE__ 
    2 #define __JLANG__JSTREAMAVAILABLE__ 
   21   template<
class U>   
static auto is(U*)  -> decltype(std::declval<std::istream&>() >> std::declval<U&>());
 
   22   template<
class U>   
static auto os(U*)  -> decltype(std::declval<std::ostream&>() << std::declval<const U&>());
 
   24   template<
typename>  
static auto is(...) -> std::false_type;
 
   25   template<
typename>  
static auto os(...) -> std::false_type;
 
   28   static const bool has_istream = std::is_same<std::istream&, decltype(is<T>(0))>::value;  
 
   29   static const bool has_ostream = std::is_same<std::ostream&, decltype(os<T>(0))>::value;  
 
Test availability of stream operators.
 
static auto is(U *) -> decltype(std::declval< std::istream & >() >> std::declval< U & >())
 
static const bool has_ostream
true if std::ostream& operator<<(std::ostream&, const T&) is defined; else false
 
static auto os(...) -> std::false_type
 
static auto is(...) -> std::false_type
 
static const bool has_istream
true if std::istream& operator>>(std::istream&, T&) is defined; else false
 
static auto os(U *) -> decltype(std::declval< std::ostream & >()<< std::declval< const U & >())
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary template class for type bool.
 
Auxiliary class for format stream.
 
std::ostream & print(std::ostream &out, const T &value, const JLANG::JBool< true > &option)
Print value if given option is true.
 
std::ostream & print(std::ostream &out, const T &value, const JLANG::JBool< false > &option)
Print value if given option is true.
 
JStream(std::ostream &out, const std::string &message)
Constructor.
 
std::ostream & operator<<(const T &value)
Write value to output stream.
 
Auxiliary data structure for handling std::ostream.
 
STREAM(const std::string &message="")
Constructor.
 
friend JStream operator<<(std::ostream &out, const STREAM &format)
Format specifier.