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 namespace zorba {
00057 namespace internal {
00058
00059
00060
00061
00062
00063 template<typename T>
00064 class rv : public T {
00065 rv();
00066 ~rv();
00067 rv( rv const& );
00068 rv& operator=( rv const& );
00069
00070
00071
00072
00073 struct f;
00074 friend struct f;
00075 };
00076
00077 template<bool B>
00078 struct bool_value {
00079 static bool const value = B;
00080 };
00081
00082 template<typename T>
00083 struct is_movable : bool_value<ZORBA_TR1_NS::is_convertible<T,rv<T>&>::value> {
00084 };
00085
00086 template<typename T>
00087 struct is_movable< rv<T> > : bool_value<false> {
00088 };
00089
00090 }
00091 }
00092
00093
00094
00095 #endif
00096