28 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// Ensure that tuple's move constructor properly SFINAES.10// This is a regression test for https://github.com/llvm/llvm-project/pull/151654#issuecomment-320541095511 12// UNSUPPORTED: c++03, c++11, c++1413 14#include <tuple>15#include <variant>16#include <type_traits>17 18struct S {19 S(const S&) = delete;20 S& operator=(const S&) = delete;21 S(S&&) = default;22 S& operator=(S&&) = default;23};24 25using T = std::tuple<const std::variant<S>>;26 27void func() { (void)std::is_trivially_move_constructible<T>::value; }28