#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 |
A deleter class that can be used with unique_ptr. More... | |
struct | zorba::internal::ztd::has_insertion_operator |
class | zorba::internal::ztd::has_insertion_operator_impl::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... | |
struct | zorba::internal::ztd::less |
struct | zorba::internal::ztd::less< char const * > |
class | zorba::internal::ztd::sfinae_base |
Namespaces | |
namespace | zorba |
Copyright 2006-2011 The FLWOR Foundation. | |
namespace | zorba::internal |
namespace | zorba::internal::ztd |
namespace | zorba::internal::ztd::has_insertion_operator_impl |
Defines | |
#define | ZORBA_DECL_HAS_MEM_FN(FN_NAME) |
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& . | |
no | zorba::internal::ztd::has_insertion_operator_impl::defined (no) |
This function is matched only when the dummy operator<<() is matched. | |
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 . | |
template<typename T > | |
std::enable_if <!ZORBA_TR1_NS::is_pointer< T > ::value &&has_insertion_operator<T > ::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, std::string >::type | zorba::internal::ztd::to_string (T p) |
std::string | zorba::internal::ztd::to_string (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) | |
Variables | |
std::enable_if <!has_insertion_operator<T > ::value &&has_c_str< T, char const *(T::*)() const > ::value, std::string >::type | zorba::internal::ztd::to_string (T const &t) |
#define ZORBA_DECL_HAS_MEM_FN | ( | FN_NAME | ) |
template<typename T,typename S> \ class has_##FN_NAME : public sfinae_base { \ template<typename SignatureType,SignatureType> struct type_check; \ template<class U> static yes& test(type_check<S,&U::FN_NAME>*); \ template<class U> static no& test(...); \ public: \ static bool const value = sizeof( test<T>(0) ) == sizeof( yes ); \ }