15a83710eSEric Fiselier //===----------------------------------------------------------------------===//
25a83710eSEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65a83710eSEric Fiselier //
75a83710eSEric Fiselier //===----------------------------------------------------------------------===//
85a83710eSEric Fiselier 
95a83710eSEric Fiselier // <tuple>
105a83710eSEric Fiselier 
115a83710eSEric Fiselier // template <class... Types> class tuple;
125a83710eSEric Fiselier 
135a83710eSEric Fiselier // template <class... Types, class Alloc>
145a83710eSEric Fiselier //   struct uses_allocator<tuple<Types...>, Alloc> : true_type { };
155a83710eSEric Fiselier 
16*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03
170a52cd79SEric Fiselier 
185a83710eSEric Fiselier #include <tuple>
195a83710eSEric Fiselier #include <type_traits>
205a83710eSEric Fiselier 
217fc6a556SMarshall Clow #include "test_macros.h"
227fc6a556SMarshall Clow 
235a83710eSEric Fiselier struct A {};
245a83710eSEric Fiselier 
main(int,char **)252df59c50SJF Bastien int main(int, char**)
265a83710eSEric Fiselier {
275a83710eSEric Fiselier     {
285a83710eSEric Fiselier         typedef std::tuple<> T;
295a83710eSEric Fiselier         static_assert((std::is_base_of<std::true_type,
305a83710eSEric Fiselier                                        std::uses_allocator<T, A>>::value), "");
315a83710eSEric Fiselier     }
325a83710eSEric Fiselier     {
335a83710eSEric Fiselier         typedef std::tuple<int> T;
345a83710eSEric Fiselier         static_assert((std::is_base_of<std::true_type,
355a83710eSEric Fiselier                                        std::uses_allocator<T, A>>::value), "");
365a83710eSEric Fiselier     }
375a83710eSEric Fiselier     {
385a83710eSEric Fiselier         typedef std::tuple<char, int> T;
395a83710eSEric Fiselier         static_assert((std::is_base_of<std::true_type,
405a83710eSEric Fiselier                                        std::uses_allocator<T, A>>::value), "");
415a83710eSEric Fiselier     }
425a83710eSEric Fiselier     {
435a83710eSEric Fiselier         typedef std::tuple<double&, char, int> T;
445a83710eSEric Fiselier         static_assert((std::is_base_of<std::true_type,
455a83710eSEric Fiselier                                        std::uses_allocator<T, A>>::value), "");
465a83710eSEric Fiselier     }
472df59c50SJF Bastien 
482df59c50SJF Bastien   return 0;
495a83710eSEric Fiselier }
50