Classes | Typedefs | Functions
zorba::internal::ztd::has_insertion_operator_impl Namespace Reference

Classes

struct  any_t
 This dummy class is used to make the matching of the dummy operator<<() worse than the global operator<<(), if any. More...
 
class  has_insertion_operator
 The implementation class that can be used to determine whether a given type T has a global std::ostream& operator<<(std::ostream&,T const&) defined for it. More...
 

Typedefs

typedef char no
 
typedef char yes [2]
 

Functions

yesdefined (std::ostream &)
 This function is matched only when there is a global operator<<() declared for type T because operator<<()'s return type is std::ostream&. More...
 
no defined (no)
 This function is matched only when the dummy operator<<() is matched. More...
 
no operator<< (std::ostream const &, any_t const &)
 This dummy operator is matched only when there is no global operator<<() otherwise declared for type T. More...
 

Typedef Documentation

Definition at line 90 of file ztd.h.

typedef char zorba::internal::ztd::has_insertion_operator_impl::yes[2]

Definition at line 91 of file ztd.h.

Function Documentation

yes& zorba::internal::ztd::has_insertion_operator_impl::defined ( std::ostream &  )

This function is matched only when there is a global operator<<() declared for type T because operator<<()'s return type is std::ostream&.

Returns
Returns a yes& whose sizeof() equals sizeof(yes).
no zorba::internal::ztd::has_insertion_operator_impl::defined ( no  )

This function is matched only when the dummy operator<<() is matched.

Returns
Returns a no whose sizeof() equals sizeof(no).
no zorba::internal::ztd::has_insertion_operator_impl::operator<< ( std::ostream const &  ,
any_t const &   
)

This dummy operator is matched only when there is no global operator<<() otherwise declared for type T.

Returns
Returns a no that selects defined(no).