// { dg-options "-std=gnu++0x" } // Copyright (C) 2011-2014 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // . // Tuple #include #include static_assert(std::is_same>::value, "Error"); static_assert(std::is_same>())), std::tuple<>>::value, "Error"); static_assert(std::is_same&>())), std::tuple<>>::value, "Error"); static_assert(std::is_same>())), std::tuple<>>::value, "Error"); static_assert(std::is_same&>())), std::tuple<>>::value, "Error"); static_assert(std::is_same>())), std::tuple>::value, "Error"); static_assert(std::is_same&>())), std::tuple>::value, "Error"); static_assert(std::is_same>())), std::tuple>::value, "Error"); static_assert(std::is_same&>())), std::tuple>::value, "Error"); static_assert(std::is_same>())), std::tuple>::value, "Error"); static_assert(std::is_same&>())), std::tuple>::value, "Error"); static_assert(std::is_same>())), std::tuple>::value, "Error"); static_assert(std::is_same&>())), std::tuple>::value, "Error"); static_assert(std::is_same>(), std::declval>())), std::tuple<>>::value, "Error"); static_assert(std::is_same>(), std::declval>(), std::declval>())), std::tuple<>>::value, "Error"); static_assert(std::is_same>(), std::declval>(), std::declval>(), std::declval>())), std::tuple<>>::value, "Error"); static_assert(std::is_same>(), std::declval>())), std::tuple>::value, "Error"); static_assert(std::is_same>(), std::declval>(), std::declval>())), std::tuple>::value, "Error"); static_assert(std::is_same&>(), std::declval>(), std::declval>(), std::declval>(), std::declval>())), std::tuple >::value, "Error"); int main() { std::tuple_cat(); std::tuple_cat(std::tuple<>{ }); std::tuple_cat(std::tuple<>{ }, std::tuple<>{ }); std::array a3; std::tuple_cat(a3); std::pair pdb; std::tuple t; int i{ }; double d{ }; int* pi{ }; std::tuple to{i, d, pi}; std::tuple_cat(pdb); std::tuple_cat(to); std::tuple_cat(to, to); std::tuple_cat(a3, pdb); std::tuple_cat(a3, pdb, t); std::tuple_cat(a3, pdb, t, a3); std::tuple_cat(a3, pdb, t, a3, pdb, t); static_assert(std::is_same >::value, "Error"); std::tuple_cat(std::tuple{}, to, a3, std::tuple<>{}, std::pair{}, pdb, to); }