0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd::asio: Fix undefined-var-template error; enable -fpch-instantiate-templates.

This commit is contained in:
Jason Volk 2022-07-20 12:22:33 -07:00
parent 3068466175
commit 49a13b6eec
2 changed files with 15 additions and 2 deletions

View file

@ -7,8 +7,7 @@ AM_CXXFLAGS =#
AM_CXXFLAGS += -x c++-header
if CLANG11
#TODO: XXX
#AM_CXXFLAGS += -fpch-instantiate-templates
AM_CXXFLAGS += -fpch-instantiate-templates
endif
if GCC

View file

@ -68,6 +68,20 @@ namespace boost
#pragma GCC visibility pop
#endif
// Template-specializations for some functions we may redefine (interpose).
// Declarations are needed for template instantiation in PCH and with LTO.
#if defined(BOOST_ASIO_HAS_EPOLL)
namespace boost::asio::detail
{
using epoll_time_traits = asio::time_traits<posix_time::ptime>;
template<> std::size_t
epoll_reactor::cancel_timer(timer_queue<epoll_time_traits> &,
typename timer_queue<epoll_time_traits>::per_timer_data &,
std::size_t max);
}
#endif
// Boost version dependent behavior for getting the io_service/io_context
// abstract executor (recent versions) or the derived instance (old versions).
namespace ircd::ios