Commit c4da1da2 by Jonathan Wakely Committed by Jonathan Wakely

Change std::conditional test to compile-only

	* testsuite/20_util/conditional/requirements/typedefs.cc: Change to
	compile-only test.

From-SVN: r238930
parent 9d5b70b0
2016-07-31 Jonathan Wakely <jwakely@redhat.com> 2016-07-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/conditional/requirements/typedefs.cc: Change to
compile-only test.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
Ensure test is compiled with optimization. Ensure test is compiled with optimization.
......
// { dg-options "-std=gnu++11" } // { dg-do compile { target c++11 } }
// 2007-05-02 Benjamin Kosnik <bkoz@redhat.com> // 2007-05-02 Benjamin Kosnik <bkoz@redhat.com>
// //
...@@ -20,22 +20,12 @@ ...@@ -20,22 +20,12 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
#include <type_traits> #include <type_traits>
#include <testsuite_hooks.h>
void test01() using std::conditional;
{ using std::is_same;
bool test __attribute__((unused)) = true;
using std::conditional;
typedef conditional<true, char, int>::type test1_type; typedef conditional<true, char, int>::type test1_type;
VERIFY( (std::is_same<test1_type, char>::value) ); static_assert( is_same<test1_type, char>::value, "conditional<true, ...>" );
typedef conditional<false, char, int>::type test2_type; typedef conditional<false, char, int>::type test2_type;
VERIFY( (std::is_same<test2_type, int>::value) ); static_assert( is_same<test2_type, int>::value, "conditional<false, ...>" );
}
int main()
{
test01();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment