Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ZORBA_INTERNAL_TYPE_TRAITS_H
00018 #define ZORBA_INTERNAL_TYPE_TRAITS_H
00019
00020 #include <zorba/config.h>
00021
00022 #ifdef ZORBA_TR1_IN_TR1_SUBDIRECTORY
00023 # include <tr1/type_traits>
00024 #else
00025 # include <type_traits>
00026 #endif
00027
00028
00029
00030 #ifndef ZORBA_CXX_ENABLE_IF
00031 namespace std {
00032
00033
00034
00035
00036
00037
00038 template<bool,typename T = void>
00039 struct enable_if {
00040 };
00041
00042
00043
00044
00045
00046 template<typename T>
00047 struct enable_if<true,T> {
00048 typedef T type;
00049 };
00050
00051 }
00052 #endif
00053
00054
00055
00056 #ifndef ZORBA_CXX_UNIQUE_PTR
00057 namespace zorba {
00058 namespace internal {
00059
00060
00061
00062
00063
00064 template<typename T>
00065 class rv : public T {
00066 rv();
00067 ~rv();
00068 rv( rv const& );
00069 rv& operator=( rv const& );
00070
00071
00072
00073
00074 struct f;
00075 friend struct f;
00076 };
00077
00078 template<bool B>
00079 struct bool_value {
00080 static bool const value = B;
00081 };
00082
00083 template<typename T>
00084 struct is_movable : bool_value<ZORBA_TR1_NS::is_convertible<T,rv<T>&>::value> {
00085 };
00086
00087 template<typename T>
00088 struct is_movable< rv<T> > : bool_value<false> {
00089 };
00090
00091 }
00092 }
00093 #endif
00094
00095
00096
00097 #endif
00098