Minor cleanup, don't run tests for which compilation is enough.
* g++.dg/g++.dg/cpp1y/var-templ1.C: Change return to static_assert, compile instead of running. * g++.dg/g++.dg/cpp1y/var-templ3.C: Likewise. * g++.dg/g++.dg/cpp1y/var-templ4.C: Likewise. * g++.dg/g++.dg/cpp1y/var-templ5.C: Likewise. From-SVN: r215329
This commit is contained in:
parent
2c132d34c0
commit
621d5431a2
|
@ -1,4 +1,4 @@
|
|||
// { dg-do run { target c++14 } }
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<int A, int B>
|
||||
struct S1
|
||||
|
@ -12,10 +12,7 @@ template<typename T>
|
|||
|
||||
int main ()
|
||||
{
|
||||
int v = var<S1<199, 23>>/2;
|
||||
return !(
|
||||
var<S1<11, 100>> == v
|
||||
&& var<S1<50, 120>> == var<S1<150, var<S1<10, 10>>>>
|
||||
&& var<S1<53, 23>> != 222
|
||||
);
|
||||
static_assert(var<S1<11, 100>> == var<S1<199, 23>>/2
|
||||
&& var<S1<50, 120>> == var<S1<150, var<S1<10, 10>>>>
|
||||
&& var<S1<53, 23>> != 222, "");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-do run { target c++14 } }
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<typename T>
|
||||
constexpr int var = sizeof (T);
|
||||
|
@ -12,7 +12,5 @@ template<typename T>
|
|||
|
||||
int main ()
|
||||
{
|
||||
return !(
|
||||
var<int> + var<char> == S1<int>::a<char>
|
||||
);
|
||||
static_assert(var<int> + var<char> == S1<int>::a<char>, "");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-do run { target c++14 } }
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<typename T>
|
||||
constexpr int var = sizeof (T);
|
||||
|
@ -8,8 +8,5 @@ template<>
|
|||
|
||||
int main ()
|
||||
{
|
||||
return !(
|
||||
var<int> == 100000
|
||||
&& var<char> == sizeof(char)
|
||||
);
|
||||
static_assert(var<int> == 100000 && var<char> == sizeof(char), "");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// { dg-do run { target c++14 } }
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<int A, int B>
|
||||
struct S1
|
||||
|
@ -15,7 +15,5 @@ template<template<int,int> class T, int A>
|
|||
|
||||
int main ()
|
||||
{
|
||||
return !(
|
||||
var2<S1, 40> == 120
|
||||
);
|
||||
static_assert(var2<S1, 40> == 120, "");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue