00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ASTL_TAG_H
00023 #define ASTL_TAG_H
00024
00025 #include <iostream>
00026 using namespace std;
00027
00028 namespace astl {
00029
00030 struct empty_tag
00031 {
00032 template <typename T>
00033 empty_tag& operator=(const T&) { return *this; }
00034 };
00035
00036 typedef empty_tag empty;
00037
00038 inline bool operator==(const empty_tag&, const empty_tag&) { return true; }
00039 inline bool operator<(const empty_tag&, const empty_tag&) { return false; }
00040 inline ostream& operator<<(ostream &out, const empty_tag&) { return out; }
00041 inline istream& operator>>(istream &in, empty_tag&) { return in; }
00042
00043 #if (__GNUG__ > 0) && (__GNUG__ < 4)
00044
00045 template <>
00046 struct __type_traits<empty_tag>
00047 {
00048 typedef __true_type has_trivial_default_constructor;
00049 typedef __true_type has_trivial_copy_constructor;
00050 typedef __true_type has_trivial_assignment_operator;
00051 typedef __true_type has_trivial_destructor;
00052 typedef __true_type is_POD_type;
00053 };
00054 #endif
00055
00056 }
00057
00058 #endif // ASTL_TAG_H