Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / mem-partial2.C
blobfba3255199d0ebe8d7e7b5871c819cfb74eafd52
1 // PR c++/14032
2 // { dg-do run }
4 template <bool compare>
5 struct outer
7   template <bool compare_with,bool second>
8   struct inner           // unspecialized compare != compare_with
9   {
10     static inline bool test()
11     {
12       return false;
13     }
14   };
15   template <bool second> // specialization compare == compare_with
16   struct inner<compare,second>
17   {
18     static inline bool test()
19     {
20       return true;
21     }
22   };
24 int main ()
26   bool b = outer<true>::inner<true,false>::test();
28   return b != true;