blob: 47f028f45cb3715ab2fd0182ab6e2fc62ec0ea17 [file] [log] [blame]
William A. Kennington III14dd4eb2023-01-12 10:51:12 -08001#include <fmt/format.h>
2
3#include <stdplus/net/addr/subnet.hpp>
4
5#include <stdexcept>
6
7namespace stdplus::detail
8{
9
10void invalidSubnetPfx(std::size_t pfx)
11{
12 throw std::invalid_argument(fmt::format("Invalid subnet prefix {}", pfx));
13}
14
15template class Subnet46<In4Addr, uint8_t>;
16template class Subnet46<In6Addr, uint8_t>;
17
William A. Kennington III160e3822023-06-16 17:09:43 -070018template Subnet4 SubnetFromStr<Subnet4>::operator()(std::string_view) const;
19template Subnet6 SubnetFromStr<Subnet6>::operator()(std::string_view) const;
20template SubnetAny SubnetFromStr<SubnetAny>::operator()(std::string_view) const;
21
William A. Kennington IIId5957f52023-06-16 16:55:01 -070022template char* SubnetToStr<Subnet4>::operator()(char*, Subnet4) const noexcept;
23template char* SubnetToStr<Subnet6>::operator()(char*, Subnet6) const noexcept;
24template char* SubnetToStr<SubnetAny>::operator()(char*,
25 SubnetAny) const noexcept;
26
William A. Kennington III14dd4eb2023-01-12 10:51:12 -080027} // namespace stdplus::detail