2 * This program checks if the compiler / platform supports aliased
6 #include "test_config.h"
8 #if defined (ACE_HAS_CPP11)
16 template<typename _CharT
, const uint32_t _Bound
,
17 typename _Traits
= std::char_traits
<_CharT
>,
18 typename _Alloc
= std::allocator
<_CharT
> >
19 class bounded_basic_string
: public std::basic_string
<_CharT
, _Traits
, _Alloc
>
21 typedef std::basic_string
<_CharT
, _Traits
, _Alloc
> _String
;
24 static const uint32_t bound_
= _Bound
;
26 bounded_basic_string() { }
28 bounded_basic_string(const _CharT
* __s
,
29 const _Alloc
& __a
= _Alloc ())
30 : _String(__s
, __a
) { }
32 ~bounded_basic_string() noexcept
35 uint32_t bound () const
42 template <const uint32_t _Bound
>
43 using bounded_string
= bounded_basic_string
<char, _Bound
>;
47 run_main (int, ACE_TCHAR
*[])
49 ACE_START_TEST (ACE_TEXT("Compiler_Features_19_Test"));
51 typedef IDL::bounded_string
<100> string100
;
52 string100
s100("world");
55 ACE_TEXT ("String %C bound %d\n"), s100
.c_str(), s100
.bound ()));
58 ACE_TEXT ("Template alias works.\n")));
67 run_main (int, ACE_TCHAR
*[])
69 ACE_START_TEST (ACE_TEXT("Compiler_Features_19_Test"));
72 ACE_TEXT ("No C++11 support enabled\n")));