throw std::range_error(msg + label + dots);
}
-DNSName::DNSName(const std::string_view& sw)
+DNSName::DNSName(const std::string_view sw)
{
const char* p = sw.data();
size_t length = sw.length();
DNSName(const DNSName& a) = default;
DNSName(DNSName&& a) = default;
- explicit DNSName(const std::string_view& sw); //!< Constructs from a human formatted, escaped presentation
+ explicit DNSName(std::string_view sw); //!< Constructs from a human formatted, escaped presentation
DNSName(const char* p, int len, int offset, bool uncompress, uint16_t* qtype=nullptr, uint16_t* qclass=nullptr, unsigned int* consumed=nullptr, uint16_t minOffset=0); //!< Construct from a DNS Packet, taking the first question if offset=12. If supplied, consumed is set to the number of bytes consumed from the packet, which will not be equal to the wire length of the resulting name in case of compression.
bool isPartOf(const DNSName& rhs) const; //!< Are we part of the rhs name? Note that name.isPartOf(name).