folly/folly/futures/SharedPromise-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.
 */

#pragma once

namespace folly {

template <class T>
size_t SharedPromise<T>::size() const {}

template <class T>
SemiFuture<T> SharedPromise<T>::getSemiFuture() const {}

template <class T>
Future<T> SharedPromise<T>::getFuture() const {}

template <class T>
template <class E>
typename std::enable_if<std::is_base_of<std::exception, E>::value>::type
SharedPromise<T>::setException(E const& e) {}

template <class T>
void SharedPromise<T>::setException(exception_wrapper ew) {}

template <class T>
void SharedPromise<T>::setInterruptHandler(
    std::function<void(exception_wrapper const&)> fn) {}

template <class T>
template <class M>
void SharedPromise<T>::setValue(M&& v) {}

template <class T>
template <class F>
void SharedPromise<T>::setWith(F&& func) {}

template <class T>
void SharedPromise<T>::setTry(Try<T>&& t) {}

template <class T>
bool SharedPromise<T>::isFulfilled() const {}

#if FOLLY_USE_EXTERN_FUTURE_UNIT
// limited to the instances unconditionally forced by the futures library
extern template class SharedPromise<Unit>;
#endif

} // namespace folly