Format.h \
Format-inl.h \
futures/Barrier.h \
- futures/Deprecated.h \
futures/ThreadedExecutor.h \
futures/DrivableExecutor.h \
futures/Future-pre.h \
#elif defined(_MSC_VER)
# define FOLLY_DEPRECATED(msg) __declspec(deprecated(msg))
#else
-# define FOLLY_DEPRECATED
+# define FOLLY_DEPRECATED(msg)
#endif
// noreturn
+++ /dev/null
-/*
- * Copyright 2015 Facebook, Inc.
- *
- * 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
-#define DEPRECATED __attribute__((__deprecated__))
#include <vector>
#include <folly/Optional.h>
+#include <folly/Portability.h>
#include <folly/MoveWrapper.h>
-#include <folly/futures/Deprecated.h>
#include <folly/futures/DrivableExecutor.h>
#include <folly/futures/Promise.h>
#include <folly/futures/Try.h>
/// by then), and it is active (active by default).
///
/// Inactive Futures will activate upon destruction.
- DEPRECATED Future<T>& activate() & {
+ FOLLY_DEPRECATED("do not use") Future<T>& activate() & {
core_->activate();
return *this;
}
- DEPRECATED Future<T>& deactivate() & {
+ FOLLY_DEPRECATED("do not use") Future<T>& deactivate() & {
core_->deactivate();
return *this;
}
- DEPRECATED Future<T> activate() && {
+ FOLLY_DEPRECATED("do not use") Future<T> activate() && {
core_->activate();
return std::move(*this);
}
- DEPRECATED Future<T> deactivate() && {
+ FOLLY_DEPRECATED("do not use") Future<T> deactivate() && {
core_->deactivate();
return std::move(*this);
}
#pragma once
-#include <folly/futures/Deprecated.h>
+#include <folly/Portability.h>
#include <folly/futures/Try.h>
#include <functional>
p.setException(std::current_exception());
}
*/
- DEPRECATED void setException(std::exception_ptr const&);
+ FOLLY_DEPRECATED("use setException(exception_wrapper)")
+ void setException(std::exception_ptr const&);
/** Fulfill the Promise with an exception type E, which can be passed to
std::make_exception_ptr(). Useful for originating exceptions. If you
#pragma once
#include <folly/futures/Promise.h>
+#include <folly/Portability.h>
namespace folly {
p.setException(std::current_exception());
}
*/
- DEPRECATED void setException(std::exception_ptr const&);
+ FOLLY_DEPRECATED("use setException(exception_wrapper)")
+ void setException(std::exception_ptr const&);
/** Fulfill the SharedPromise with an exception type E, which can be passed to
std::make_exception_ptr(). Useful for originating exceptions. If you
#include <folly/ExceptionWrapper.h>
#include <folly/Likely.h>
#include <folly/Memory.h>
-#include <folly/futures/Deprecated.h>
+#include <folly/Portability.h>
#include <folly/futures/FutureException.h>
#include <folly/futures/Unit.h>
*
* @param ep The exception_pointer. Will be rethrown.
*/
- DEPRECATED explicit Try(std::exception_ptr ep)
+ FOLLY_DEPRECATED("use Try(exception_wrapper)")
+ explicit Try(std::exception_ptr ep)
: contains_(Contains::EXCEPTION) {
try {
std::rethrow_exception(ep);
*
* @param ep The exception_pointer. Will be rethrown.
*/
- DEPRECATED explicit Try(std::exception_ptr ep) : hasValue_(false) {
+ FOLLY_DEPRECATED("use Try(exception_wrapper)")
+ explicit Try(std::exception_ptr ep) : hasValue_(false) {
try {
std::rethrow_exception(ep);
} catch (const std::exception& e) {
#pragma once
#include <folly/futures/Future.h>
+#include <folly/Portability.h>
namespace folly {
///
/// auto f = makeFuture<string>(std::current_exception());
template <class T>
-DEPRECATED Future<T> makeFuture(std::exception_ptr const& e);
+FOLLY_DEPRECATED("use makeFuture(exception_wrapper)")
+Future<T> makeFuture(std::exception_ptr const& e);
/// Make a failed Future from an exception_wrapper.
template <class T>