Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / sources / cxx-stl / gabi++ / tests / catch_array_01.cpp
blob4997602a6d0e232ac3462cbc07e732ac684a50f9
1 //===---------------------- catch_array_01.cpp ----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 // Can you have a catch clause of array type that catches anything?
12 #include <cassert>
14 int main()
16 typedef char Array[4];
17 Array a = {'H', 'i', '!', 0};
18 try
20 throw a; // converts to char*
21 assert(false);
23 catch (Array& b) // can't catch char*
25 assert(false);
27 catch (...)