Avoid instantiations as header-only config is used.

Closes #221

Signed-off-by: Fiorentino Ing. Stefano <stefano.fiore84@gmail.com>
This commit is contained in:
Fiorentino Ing. Stefano 2020-10-05 07:34:43 +00:00
parent 26973f335c
commit 41257c60f2
8 changed files with 16 additions and 16 deletions

View File

@ -129,7 +129,7 @@ UVW_INLINE std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq
// explicit instantiations
#ifdef UVW_AS_LIB
template void GetNameInfoReq::nameInfo<IPv4>(std::string ip, unsigned int port, int flags);
template void GetNameInfoReq::nameInfo<IPv6>(std::string ip, unsigned int port, int flags);
@ -141,6 +141,6 @@ template std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq::
template std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq::nameInfoSync<IPv4>(Addr addr, int flags);
template std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq::nameInfoSync<IPv6>(Addr addr, int flags);
#endif // UVW_AS_LIB
}

View File

@ -237,7 +237,7 @@ public:
// (extern) explicit instantiations
#ifdef UVW_AS_LIB
extern template void GetNameInfoReq::nameInfo<IPv4>(std::string ip, unsigned int port, int flags);
extern template void GetNameInfoReq::nameInfo<IPv6>(std::string ip, unsigned int port, int flags);
@ -249,7 +249,7 @@ extern template std::pair<bool, std::pair<const char *, const char *>> GetNameIn
extern template std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq::nameInfoSync<IPv4>(Addr addr, int flags);
extern template std::pair<bool, std::pair<const char *, const char *>> GetNameInfoReq::nameInfoSync<IPv6>(Addr addr, int flags);
#endif // UVW_AS_LIB
/**
* Internal details not to be documented.

View File

@ -137,10 +137,10 @@ UVW_INLINE uv_loop_t *Loop::raw() noexcept {
// explicit instantiations
#ifdef UVW_AS_LIB
template bool Loop::run<Loop::Mode::DEFAULT>() noexcept;
template bool Loop::run<Loop::Mode::ONCE>() noexcept;
template bool Loop::run<Loop::Mode::NOWAIT>() noexcept;
#endif // UVW_AS_LIB
}

View File

@ -417,11 +417,11 @@ private:
// (extern) explicit instantiations
#ifdef UVW_AS_LIB
extern template bool Loop::run<Loop::Mode::DEFAULT>() noexcept;
extern template bool Loop::run<Loop::Mode::ONCE>() noexcept;
extern template bool Loop::run<Loop::Mode::NOWAIT>() noexcept;
#endif // UVW_AS_LIB
}

View File

@ -102,7 +102,7 @@ UVW_INLINE void TCPHandle::closeReset() {
// explicit instantiations
#ifdef UVW_AS_LIB
template void TCPHandle::bind<IPv4>(std::string, unsigned int, Flags<Bind>);
template void TCPHandle::bind<IPv6>(std::string, unsigned int, Flags<Bind>);
@ -120,6 +120,6 @@ template void TCPHandle::connect<IPv6>(std::string, unsigned int);
template void TCPHandle::connect<IPv4>(Addr addr);
template void TCPHandle::connect<IPv6>(Addr addr);
#endif // UVW_AS_LIB
}

View File

@ -237,7 +237,7 @@ private:
// (extern) explicit instantiations
#ifdef UVW_AS_LIB
extern template void TCPHandle::bind<IPv4>(std::string, unsigned int, Flags<Bind>);
extern template void TCPHandle::bind<IPv6>(std::string, unsigned int, Flags<Bind>);
@ -255,7 +255,7 @@ extern template void TCPHandle::connect<IPv6>(std::string, unsigned int);
extern template void TCPHandle::connect<IPv4>(Addr addr);
extern template void TCPHandle::connect<IPv6>(Addr addr);
#endif // UVW_AS_LIB
/**
* Internal details not to be documented.

View File

@ -264,7 +264,7 @@ UVW_INLINE size_t UDPHandle::sendQueueCount() const noexcept {
// explicit instantiations
#ifdef UVW_AS_LIB
template void UDPHandle::connect<IPv4>(std::string, unsigned int);
template void UDPHandle::connect<IPv6>(std::string, unsigned int);
@ -321,6 +321,6 @@ template int UDPHandle::trySend<IPv6>(Addr, char *, unsigned int);
template void UDPHandle::recv<IPv4>();
template void UDPHandle::recv<IPv6>();
#endif // UVW_AS_LIB
}

View File

@ -586,7 +586,7 @@ private:
// (extern) explicit instantiations
#ifdef UVW_AS_LIB
extern template void UDPHandle::connect<IPv4>(std::string, unsigned int);
extern template void UDPHandle::connect<IPv6>(std::string, unsigned int);
@ -643,7 +643,7 @@ extern template int UDPHandle::trySend<IPv6>(Addr, char *, unsigned int);
extern template void UDPHandle::recv<IPv4>();
extern template void UDPHandle::recv<IPv6>();
#endif // UVW_AS_LIB
/**
* Internal details not to be documented.