llvm-project
52 строки · 1.4 Кб
1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_EXPECTED
11#define _LIBCPP_EXPECTED
12
13/*
14Header <expected> synopsis
15
16namespace std {
17// [expected.unexpected], class template unexpected
18template<class E> class unexpected;
19
20// [expected.bad], class template bad_expected_access
21template<class E> class bad_expected_access;
22
23// [expected.bad.void], specialization for void
24template<> class bad_expected_access<void>;
25
26// in-place construction of unexpected values
27struct unexpect_t {
28explicit unexpect_t() = default;
29};
30inline constexpr unexpect_t unexpect{};
31
32// [expected.expected], class template expected
33template<class T, class E> class expected;
34
35// [expected.void], partial specialization of expected for void types
36template<class T, class E> requires is_void_v<T> class expected<T, E>;
37}
38
39*/
40
41#include <__config>
42#include <__expected/bad_expected_access.h>
43#include <__expected/expected.h>
44#include <__expected/unexpect.h>
45#include <__expected/unexpected.h>
46#include <version>
47
48#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
49# pragma GCC system_header
50#endif
51
52#endif // _LIBCPP_EXPECTED
53