From 78892a472a6d7917e0cdd8d496fe6cc1a200aced Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 10 Jun 2014 03:26:09 +0300 Subject: [PATCH] More cosmetic fixes in ref tests. --- test/ref_rv_fail1.cpp | 12 ++++++++---- test/ref_rv_fail2.cpp | 12 ++++++++---- test/ref_rv_fail3.cpp | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/test/ref_rv_fail1.cpp b/test/ref_rv_fail1.cpp index 9924626..a2e708d 100644 --- a/test/ref_rv_fail1.cpp +++ b/test/ref_rv_fail1.cpp @@ -1,8 +1,12 @@ +// +// Test that a reference_wrapper can't be constructed from an rvalue +// // Copyright 2014 Agustin Berge // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// #include @@ -10,7 +14,7 @@ int main() { - boost::reference_wrapper r(1); // this should produce an ERROR + boost::reference_wrapper r( 1 ); // this should produce an ERROR } #else diff --git a/test/ref_rv_fail2.cpp b/test/ref_rv_fail2.cpp index 2893c21..7258411 100644 --- a/test/ref_rv_fail2.cpp +++ b/test/ref_rv_fail2.cpp @@ -1,12 +1,16 @@ +// +// Test that an rvalue can't be passed to ref() +// // Copyright 2014 Agustin Berge // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// #include int main() { - boost::reference_wrapper r = boost::ref(2); // this should produce an ERROR + boost::reference_wrapper r = boost::ref( 2 ); // this should produce an ERROR } diff --git a/test/ref_rv_fail3.cpp b/test/ref_rv_fail3.cpp index f6f64e8..fff6508 100644 --- a/test/ref_rv_fail3.cpp +++ b/test/ref_rv_fail3.cpp @@ -1,8 +1,12 @@ +// +// Test that a const rvalue can't be passed to ref() +// // Copyright 2014 Agustin Berge // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// #include @@ -14,7 +18,7 @@ X const crv() { return X(); } int main() { - boost::reference_wrapper r = boost::ref(crv()); // this should produce an ERROR + boost::reference_wrapper r = boost::ref( crv() ); // this should produce an ERROR } #else