| 1 |
// { dg-require-effective-target c++11 } |
| 2 |
// { dg-require-effective-target int32plus } |
| 3 |
// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 4 |
|
| 5 |
#include <vector> |
| 6 |
#include <tuple> |
| 7 |
#include <algorithm> |
| 8 |
|
| 9 |
int main() |
| 10 |
{ |
| 11 |
const int n = 4; |
| 12 |
std::vector<std::tuple<int,int,double>> vec |
| 13 |
= { { 1597201307, 1817606674, 0. }, |
| 14 |
{ 1380347796, 1721941769, 0.}, |
| 15 |
{837975613, 1032707773, 0.}, |
| 16 |
{1173654292, 2020064272, 0.} } ; |
| 17 |
int sup1 = 0; |
| 18 |
for(int i=0;i<n;++i) |
| 19 |
sup1=std::max(sup1,std::max(std::get<0>(vec[i]),std::get<1>(vec[i]))); |
| 20 |
int sup2 = 0; |
| 21 |
for(int i=0;i<n;++i) |
| 22 |
sup2=std::max(std::max(sup2,std::get<0>(vec[i])),std::get<1>(vec[i])); |
| 23 |
if (sup1 != sup2) |
| 24 |
std::abort (); |
| 25 |
return 0; |
| 26 |
} |