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-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03
10
11// ADDITIONAL_COMPILE_FLAGS: -fno-exceptions
12
13#include <utility>
14
15int main(int, char**) {
16 auto guard = std::__make_exception_guard([] {});
17 auto guard2 = std::move(guard);
18 guard2.__complete();
19
20 return 0;
21}
22

source code of libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp