summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformCxxTests.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-21 17:47:43 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-21 17:47:43 (GMT)
commit8ddc8accb3213e96cd3fdb56570b6c158342b1a9 (patch)
treef30805e5e728b2efc14848fe31a4ae8079d4bd72 /Source/kwsys/kwsysPlatformCxxTests.cxx
parent9719bf0bdd737a3fb9464144263a9a5eb6e6c933 (diff)
downloadCMake-8ddc8accb3213e96cd3fdb56570b6c158342b1a9.zip
CMake-8ddc8accb3213e96cd3fdb56570b6c158342b1a9.tar.gz
CMake-8ddc8accb3213e96cd3fdb56570b6c158342b1a9.tar.bz2
COMP: Added KWSys try-compiles KWSYS_STL_HAS_ALLOCATOR_TEMPLATE and KWSYS_STL_HAS_ALLOCATOR_OBJECTS. Needed for more old-stl support in the hashtable.
Diffstat (limited to 'Source/kwsys/kwsysPlatformCxxTests.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx
index 8d24867..8a45edd 100644
--- a/Source/kwsys/kwsysPlatformCxxTests.cxx
+++ b/Source/kwsys/kwsysPlatformCxxTests.cxx
@@ -149,6 +149,20 @@ void f(kwsys_stl::list<int>::iterator x) { kwsys_stl::__iterator_category(x); }
int main() { return 0; }
#endif
+#ifdef TEST_KWSYS_STL_HAS_ALLOCATOR_TEMPLATE
+#include <memory>
+template <class Alloc>
+void f(const Alloc&)
+{
+ typedef typename Alloc::size_type alloc_size_type;
+};
+int main()
+{
+ f(kwsys_stl::allocator<char>());
+ return 0;
+}
+#endif
+
#ifdef TEST_KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE
#include <memory>
void f(kwsys_stl::allocator::size_type const&) {}
@@ -182,6 +196,19 @@ int main()
}
#endif
+#ifdef TEST_KWSYS_STL_HAS_ALLOCATOR_OBJECTS
+#include <vector>
+void f(kwsys_stl::vector<int> const& v1)
+{
+ kwsys_stl::vector<int>(1, 1, v1.get_allocator());
+};
+int main()
+{
+ f(kwsys_stl::vector<int>());
+ return 0;
+}
+#endif
+
#ifdef TEST_KWSYS_STAT_HAS_ST_MTIM
#include <sys/types.h>
#include <sys/stat.h>