folly/folly/ExceptionWrapper-inl.h

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/Portability.h>

namespace folly {

struct exception_wrapper::with_exception_from_fn_ {};

struct exception_wrapper::with_exception_from_ex_ {};

// The libc++ and cpplib implementations do not have a move constructor or a
// move-assignment operator. To avoid refcount operations, we must improvise.
// The libstdc++ implementation has a move constructor and a move-assignment
// operator but having this does no harm.
inline std::exception_ptr exception_wrapper::extract_(
    std::exception_ptr&& ptr) noexcept {}

inline exception_wrapper::exception_wrapper(exception_wrapper&& that) noexcept
    :{}

inline exception_wrapper::exception_wrapper(
    std::exception_ptr const& ptr) noexcept
    :{}

inline exception_wrapper::exception_wrapper(std::exception_ptr&& ptr) noexcept
    :{}

template <
    class Ex,
    class Ex_,
    FOLLY_REQUIRES_DEF(Conjunction<
                       exception_wrapper::IsStdException<Ex_>,
                       exception_wrapper::IsRegularExceptionType<Ex_>>::value)>
inline exception_wrapper::exception_wrapper(Ex&& ex)
    : ptr_{}

template <
    class Ex,
    class Ex_,
    FOLLY_REQUIRES_DEF(exception_wrapper::IsRegularExceptionType<Ex_>::value)>
inline exception_wrapper::exception_wrapper(std::in_place_t, Ex&& ex)
    : ptr_{}

template <
    class Ex,
    typename... As,
    FOLLY_REQUIRES_DEF(exception_wrapper::IsRegularExceptionType<Ex>::value)>
inline exception_wrapper::exception_wrapper(
    std::in_place_type_t<Ex>, As&&... as)
    : ptr_{}

inline exception_wrapper& exception_wrapper::operator=(
    exception_wrapper&& that) noexcept {}

inline void exception_wrapper::swap(exception_wrapper& that) noexcept {}

operator bool()

inline bool exception_wrapper::operator!() const noexcept {}

inline void exception_wrapper::reset() {}

inline bool exception_wrapper::has_exception_ptr() const noexcept {}

inline std::exception* exception_wrapper::get_exception() noexcept {}
inline std::exception const* exception_wrapper::get_exception() const noexcept {}

template <typename Ex>
inline Ex* exception_wrapper::get_exception() noexcept {}

template <typename Ex>
inline Ex const* exception_wrapper::get_exception() const noexcept {}

inline std::exception_ptr exception_wrapper::to_exception_ptr() const noexcept {}

inline std::exception_ptr const& exception_wrapper::exception_ptr_ref()
    const noexcept {}

inline std::type_info const* exception_wrapper::type() const noexcept {}

inline folly::fbstring exception_wrapper::what() const {}

inline folly::fbstring exception_wrapper::class_name() const {}

template <class Ex>
inline bool exception_wrapper::is_compatible_with() const noexcept {}

[[noreturn]] inline void exception_wrapper::throw_exception() const {}

template <class Ex>
[[noreturn]] inline void exception_wrapper::throw_with_nested(Ex&& ex) const {}

template <class This, class Fn>
inline bool exception_wrapper::with_exception_(This&, Fn fn_, tag_t<void>) {}

template <class This, class Fn, typename Ex>
inline bool exception_wrapper::with_exception_(This& this_, Fn fn_, tag_t<Ex>) {}

template <class Ex, class This, class Fn>
inline bool exception_wrapper::with_exception_(This& this_, Fn fn_) {}

template <class This, class... CatchFns>
inline void exception_wrapper::handle_(
    This& this_, char const* name, CatchFns&... fns) {}

template <class Ex, class Fn>
inline bool exception_wrapper::with_exception(Fn fn) {}
template <class Ex, class Fn>
inline bool exception_wrapper::with_exception(Fn fn) const {}

template <class... CatchFns>
inline void exception_wrapper::handle(CatchFns... fns) {}
template <class... CatchFns>
inline void exception_wrapper::handle(CatchFns... fns) const {}

} // namespace folly