Compile fixes
[ACE_TAO.git] / ACE / tests / Compiler_Features_31_Test.cpp
blobf0665819fadde118a5d6592c7fe1c57375d5ee15
1 /**
2 * This program checks if the compiler doesn't have a certain bug
3 * that we encountered when testing C++11 features
4 */
6 #include "test_config.h"
8 namespace A
10 namespace C
12 class AbstractBase;
13 template <typename T>
14 class abstractbase_reference;
15 template <typename T>
16 struct abstractbase_traits
18 using ref_type = abstractbase_reference<T>;
19 static ref_type narrow(abstractbase_reference<C::AbstractBase>);
20 static ref_type narrow2(abstractbase_reference<C::AbstractBase>);
25 namespace A
27 namespace C
29 class AbstractBase
31 protected:
32 template<typename T>
33 friend typename C::abstractbase_traits<T>::ref_type
34 C::abstractbase_traits<T>::narrow(
35 C::abstractbase_reference<C::AbstractBase>);
36 template<typename T>
37 friend auto
38 C::abstractbase_traits<T>::narrow2(
39 C::abstractbase_reference<C::AbstractBase>) -> ref_type;
40 AbstractBase() = default;
45 int
46 run_main (int, ACE_TCHAR *[])
48 ACE_START_TEST (ACE_TEXT("Compiler_Features_31_Test"));
50 ACE_DEBUG ((LM_INFO,
51 ACE_TEXT ("C++11 support ok\n")));
53 ACE_END_TEST;
55 return 0;