William A. Kennington III | 14dd4eb | 2023-01-12 10:51:12 -0800 | [diff] [blame] | 1 | #include <fmt/format.h> |
| 2 | |
| 3 | #include <stdplus/net/addr/subnet.hpp> |
| 4 | |
| 5 | #include <stdexcept> |
| 6 | |
William A. Kennington III | a42dfb4 | 2023-06-28 17:48:32 -0700 | [diff] [blame] | 7 | namespace stdplus |
| 8 | { |
| 9 | |
| 10 | namespace detail |
William A. Kennington III | 14dd4eb | 2023-01-12 10:51:12 -0800 | [diff] [blame] | 11 | { |
| 12 | |
| 13 | void invalidSubnetPfx(std::size_t pfx) |
| 14 | { |
| 15 | throw std::invalid_argument(fmt::format("Invalid subnet prefix {}", pfx)); |
| 16 | } |
| 17 | |
| 18 | template class Subnet46<In4Addr, uint8_t>; |
| 19 | template class Subnet46<In6Addr, uint8_t>; |
| 20 | |
William A. Kennington III | a42dfb4 | 2023-06-28 17:48:32 -0700 | [diff] [blame] | 21 | } // namespace detail |
William A. Kennington III | 160e382 | 2023-06-16 17:09:43 -0700 | [diff] [blame] | 22 | |
William A. Kennington III | a42dfb4 | 2023-06-28 17:48:32 -0700 | [diff] [blame] | 23 | template Subnet4 FromStr<Subnet4>::operator()(std::string_view) const; |
| 24 | template Subnet6 FromStr<Subnet6>::operator()(std::string_view) const; |
| 25 | template SubnetAny FromStr<SubnetAny>::operator()(std::string_view) const; |
William A. Kennington III | d5957f5 | 2023-06-16 16:55:01 -0700 | [diff] [blame] | 26 | |
William A. Kennington III | a42dfb4 | 2023-06-28 17:48:32 -0700 | [diff] [blame] | 27 | template char* ToStr<Subnet4>::operator()(char*, Subnet4) const noexcept; |
| 28 | template char* ToStr<Subnet6>::operator()(char*, Subnet6) const noexcept; |
| 29 | template char* ToStr<SubnetAny>::operator()(char*, SubnetAny) const noexcept; |
| 30 | |
| 31 | } // namespace stdplus |