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