//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // class promise // promise(); #include #include int main() { { std::promise p; std::future f = p.get_future(); assert(f.valid()); } { std::promise p; std::future f = p.get_future(); assert(f.valid()); } { std::promise p; std::future f = p.get_future(); assert(f.valid()); } }