Commit 7fcc5ddc authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Cut explicit class template instantiations in futures

Summary: [Folly] Cut explicit class template instantiations in futures. May save on code size when some of the given instantiations are not used, or when the given instantiations are used but when some of their members are not used.

Reviewed By: LeeHowes

Differential Revision: D15073879

fbshipit-source-id: c624d7ea1dad66f05a9958239a87737367450753
parent 587e0c18
......@@ -2522,11 +2522,4 @@ Future<Unit> Timekeeper::at(std::chrono::time_point<Clock> when) {
return after(std::chrono::duration_cast<Duration>(when - now));
}
// Instantiate the most common Future types to save compile time
extern template class Future<Unit>;
extern template class Future<bool>;
extern template class Future<int>;
extern template class Future<int64_t>;
extern template class Future<std::string>;
extern template class Future<double>;
} // namespace folly
......@@ -19,23 +19,6 @@
#include <folly/SingletonThreadLocal.h>
#include <folly/futures/ThreadWheelTimekeeper.h>
namespace folly {
// Instantiate the most common Future types to save compile time
template class SemiFuture<Unit>;
template class SemiFuture<bool>;
template class SemiFuture<int>;
template class SemiFuture<int64_t>;
template class SemiFuture<std::string>;
template class SemiFuture<double>;
template class Future<Unit>;
template class Future<bool>;
template class Future<int>;
template class Future<int64_t>;
template class Future<std::string>;
template class Future<double>;
} // namespace folly
namespace folly {
namespace futures {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment