Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / ACE / tests / Bug_3709_Regression_Test.cpp
blobf902a4bfbc338bf30e932b824845fdb5c41101ee
1 /**
2 * @file Bug_3709_Regression_Test.cpp
4 * Reproduces the problems reported in bug 3709
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3709
6 */
8 #include "test_config.h"
9 #include "ace/ACE.h"
10 #include "ace/OS_NS_stdio.h"
11 #include <vector>
13 using namespace std;
15 // MSVC_71_OR_OLDER
16 #if defined(_MSC_VER) && _MSC_VER < 1400
17 #define BROKEN_TEMPLATE_TEMPLATE
18 #endif
20 #ifdef __SUNPRO_CC
21 #define BROKEN_TEMPLATE_TEMPLATE
22 #endif
24 // HP aC++ 03.x fails this
25 #if defined(__HP_aCC) && (__HP_aCC < 40000)
26 #define BROKEN_TEMPLATE_TEMPLATE
27 #endif
29 #ifndef BROKEN_TEMPLATE_TEMPLATE
30 template<template<typename U, typename = std::allocator<U> > class container, typename DT>
31 container<DT> initializer(const DT &d)
33 container<DT> t ;
34 t.insert(t.end(), d);
35 return t;
37 #endif
39 int
40 run_main (int, ACE_TCHAR *[])
42 ACE_START_TEST (ACE_TEXT ("Bug_3709_Regression_Test"));
44 #ifndef BROKEN_TEMPLATE_TEMPLATE
45 vector<int> v = initializer<vector>(5);
46 v.clear ();
47 #endif
49 ACE_END_TEST;
51 return 0;