From 5a83710e371fe68a06e6e3876c6a2c8b820a8976 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 20 Dec 2014 01:40:03 +0000 Subject: Move test into test/std subdirectory. llvm-svn: 224658 --- .../refwrap/refwrap.helpers/ref_1.fail.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp (limited to 'libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp') diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp new file mode 100644 index 00000000000..86a5696f48c --- /dev/null +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/ref_1.fail.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// reference_wrapper + +// template reference_wrapper ref(T& t); + +// Don't allow binding to a temp + +#include + +struct A {}; + +const A source() {return A();} + +int main() +{ + std::reference_wrapper r = std::ref(source()); +} -- cgit v1.2.3