diff options
Diffstat (limited to 'libcxx/test/std/utilities/utility/forward/forward2.fail.cpp')
-rw-r--r-- | libcxx/test/std/utilities/utility/forward/forward2.fail.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/utility/forward/forward2.fail.cpp b/libcxx/test/std/utilities/utility/forward/forward2.fail.cpp new file mode 100644 index 00000000000..9ff07233fee --- /dev/null +++ b/libcxx/test/std/utilities/utility/forward/forward2.fail.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test forward + +#include <utility> + +struct A +{ +}; + +A source() {return A();} +const A csource() {return A();} + +int main() +{ + const A ca = A(); + std::forward<A&>(ca); // error +} |