#include <cstring>
#include <functional>
#include <sstream>
#include <string>
#include <zorba/config.h>
#include "type_traits.h"
Go to the source code of this file.
Classes | |
struct | zorba::internal::ztd::has_insertion_operator_impl::any_t |
This dummy class is used to make the matching of the dummy operator<<() worse than the global operator<<() , if any. More... | |
struct | zorba::internal::ztd::destroy_delete< T > |
A deleter class that can be used with unique_ptr. More... | |
class | zorba::internal::ztd::explicit_bool |
Helper class for implementing a solution to the "explicit bool conversion" problem. More... | |
struct | zorba::internal::ztd::has_insertion_operator< T > |
class | zorba::internal::ztd::has_insertion_operator_impl::has_insertion_operator< T > |
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... | |
class | zorba::internal::ztd::is_c_string< T > |
struct | zorba::internal::ztd::less< T > |
struct | zorba::internal::ztd::less< char const * > |
class | zorba::internal::ztd::sfinae_base |
Namespaces | |
zorba | |
Copyright 2006-2011 The FLWOR Foundation. | |
zorba::internal | |
zorba::internal::ztd | |
zorba::internal::ztd::has_insertion_operator_impl | |
Constant Groups | |
zorba | |
Copyright 2006-2011 The FLWOR Foundation. | |
zorba::internal | |
zorba::internal::ztd | |
zorba::internal::ztd::has_insertion_operator_impl | |
Macros | |
#define | ZORBA_DECL_HAS_MEM_FN(FN_NAME) |
#define | ZORBA_HAS_C_STR(T) ::zorba::internal::ztd::has_c_str<T,char const* (T::*)() const>::value |
#define | ZORBA_IS_STRING(T) ZORBA_HAS_C_STR(T) |
Typedefs | |
typedef char | zorba::internal::ztd::has_insertion_operator_impl::no |
typedef char | zorba::internal::ztd::has_insertion_operator_impl::yes [2] |
Functions | |
template<class StringType > | |
StringType::const_pointer | zorba::internal::ztd::c_str (StringType const &s) |
char const * | zorba::internal::ztd::c_str (char const *s) |
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& . More... | |
no | zorba::internal::ztd::has_insertion_operator_impl::defined (no) |
This function is matched only when the dummy operator<<() is matched. More... | |
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 . More... | |
template<typename T > | |
std::enable_if <!ZORBA_TR1_NS::is_array< T > ::value &&!ZORBA_TR1_NS::is_pointer< T > ::value &&has_insertion_operator<T > ::value, std::string >::type | zorba::internal::ztd::to_string (T const &t) |
template<class T > | |
std::enable_if <!has_insertion_operator<T > ::value &&ZORBA_HAS_C_STR(T), std::string >::type | zorba::internal::ztd::to_string (T const &t) |
template<class T > | |
std::enable_if <!has_insertion_operator<T > ::value &&!ZORBA_HAS_C_STR(T)&&has_str < T, std::string(T::*)() const > ::value &&!has_toString< T, std::string(T::*)() const > ::value, std::string >::type | zorba::internal::ztd::to_string (T const &t) |
template<class T > | |
std::enable_if <!has_insertion_operator<T > ::value &&!ZORBA_HAS_C_STR(T)&&!has_str < T, std::string(T::*)() const > ::value &&has_toString< T, std::string(T::*)() const > ::value, std::string >::type | zorba::internal::ztd::to_string (T const &t) |
template<typename T > | |
std::enable_if < ZORBA_TR1_NS::is_pointer< T > ::value &&!is_c_string< T > ::value, std::string >::type | zorba::internal::ztd::to_string (T p) |
std::string | zorba::internal::ztd::to_string (char const *s) |
std::string | zorba::internal::ztd::to_string (unsigned char const *s) |
zorba::internal::ztd::ZORBA_DECL_HAS_MEM_FN (c_str) | |
zorba::internal::ztd::ZORBA_DECL_HAS_MEM_FN (str) | |
zorba::internal::ztd::ZORBA_DECL_HAS_MEM_FN (toString) | |
#define ZORBA_DECL_HAS_MEM_FN | ( | FN_NAME) |
#define ZORBA_HAS_C_STR | ( | T) | ::zorba::internal::ztd::has_c_str<T,char const* (T::*)() const>::value |
#define ZORBA_IS_STRING | ( | T) | ZORBA_HAS_C_STR(T) |