// -*- C++ -*- //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 // // template tuple(TupleLike&&); // libc++ extension // See llvm.org/PR31384 #include #include int count = 0; template struct derived : std::tuple { using std::tuple::tuple; template operator std::tuple() && { ++count; return {}; } }; int main() { std::tuple foo = derived{42}; assert(count == 1); }