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