diff options
Diffstat (limited to 'include/cppunit/portability')
| -rw-r--r-- | include/cppunit/portability/CppUnitDeque.h | 4 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitMap.h | 4 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitSet.h | 27 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitStack.h | 26 | ||||
| -rw-r--r-- | include/cppunit/portability/CppUnitVector.h | 4 | ||||
| -rw-r--r-- | include/cppunit/portability/Makefile.am | 6 |
6 files changed, 57 insertions, 14 deletions
diff --git a/include/cppunit/portability/CppUnitDeque.h b/include/cppunit/portability/CppUnitDeque.h index 781c43e..fac09d6 100644 --- a/include/cppunit/portability/CppUnitDeque.h +++ b/include/cppunit/portability/CppUnitDeque.h @@ -9,16 +9,12 @@ #if CPPUNIT_STD_NEED_ALLOCATOR -CPPUNIT_NS_BEGIN - template<class T> class CppUnitDeque : public std::deque<T,CPPUNIT_STD_ALLOCATOR> { public: }; -CPPUNIT_NS_END - #else // CPPUNIT_STD_NEED_ALLOCATOR #define CppUnitDeque std::deque diff --git a/include/cppunit/portability/CppUnitMap.h b/include/cppunit/portability/CppUnitMap.h index 24df4a5..3073e6f 100644 --- a/include/cppunit/portability/CppUnitMap.h +++ b/include/cppunit/portability/CppUnitMap.h @@ -10,8 +10,6 @@ #if CPPUNIT_STD_NEED_ALLOCATOR -CPPUNIT_NS_BEGIN - template<class Key, class T> class CppUnitMap : public std::map<Key ,T @@ -21,8 +19,6 @@ class CppUnitMap : public std::map<Key public: }; -CPPUNIT_NS_END - #else // CPPUNIT_STD_NEED_ALLOCATOR #define CppUnitMap std::map diff --git a/include/cppunit/portability/CppUnitSet.h b/include/cppunit/portability/CppUnitSet.h new file mode 100644 index 0000000..a6c0a8f --- /dev/null +++ b/include/cppunit/portability/CppUnitSet.h @@ -0,0 +1,27 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITSET_H +#define CPPUNIT_PORTABILITY_CPPUNITSET_H + +// The technic used is similar to the wrapper of STLPort. + +#include <cppunit/Portability.h> +#include <functional> +#include <set> + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +template<class T> +class CppUnitSet : public std::set<T + ,std::less<T> + ,CPPUNIT_STD_ALLOCATOR> +{ +public: +}; + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitSet std::set + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITSET_H
\ No newline at end of file diff --git a/include/cppunit/portability/CppUnitStack.h b/include/cppunit/portability/CppUnitStack.h new file mode 100644 index 0000000..bc7785b --- /dev/null +++ b/include/cppunit/portability/CppUnitStack.h @@ -0,0 +1,26 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITSTACK_H +#define CPPUNIT_PORTABILITY_CPPUNITSTACK_H + +// The technic used is similar to the wrapper of STLPort. + +#include <cppunit/Portability.h> +#include <deque> +#include <stack> + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +template<class T> +class CppUnitStack : public std::stack<T + ,std::deque<T,CPPUNIT_STD_ALLOCATOR> > +{ +public: +}; + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitStack std::stack + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITSTACK_H
\ No newline at end of file diff --git a/include/cppunit/portability/CppUnitVector.h b/include/cppunit/portability/CppUnitVector.h index f3157e6..83525d3 100644 --- a/include/cppunit/portability/CppUnitVector.h +++ b/include/cppunit/portability/CppUnitVector.h @@ -9,16 +9,12 @@ #if CPPUNIT_STD_NEED_ALLOCATOR -CPPUNIT_NS_BEGIN - template<class T> class CppUnitVector : public std::vector<T,CPPUNIT_STD_ALLOCATOR> { public: }; -CPPUNIT_NS_END - #else // CPPUNIT_STD_NEED_ALLOCATOR #define CppUnitVector std::vector diff --git a/include/cppunit/portability/Makefile.am b/include/cppunit/portability/Makefile.am index c70aaf0..1fb032e 100644 --- a/include/cppunit/portability/Makefile.am +++ b/include/cppunit/portability/Makefile.am @@ -2,5 +2,7 @@ libcppunitincludedir = $(includedir)/cppunit/portability libcppunitinclude_HEADERS = \ CppUnitDeque.h \ - CppUnitVector.h \ - CppUnitMap.h + CppUnitMap.h \ + CppUnitSet.h \ + CppUnitStack.h \ + CppUnitVector.h |
