diff options
Diffstat (limited to 'test/libcxx/extensions/hash/specializations.fail.cpp')
-rw-r--r-- | test/libcxx/extensions/hash/specializations.fail.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/libcxx/extensions/hash/specializations.fail.cpp b/test/libcxx/extensions/hash/specializations.fail.cpp new file mode 100644 index 0000000000000..8eeffb5802e72 --- /dev/null +++ b/test/libcxx/extensions/hash/specializations.fail.cpp @@ -0,0 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include <assert.h> +#include <ext/hash_map> +#include <string> + +int main() +{ + assert(__gnu_cxx::hash<std::string>()(std::string()) == 0); // error +} |