Skip to content
Snippets Groups Projects

First unit tests

Merged Leon Dietrich requested to merge first_unit_tests into master
Compare and Show latest version
2 files
+ 11
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 9
0
@@ -495,6 +495,13 @@ static bool is_valid_ip6addr(const std::string& str)
@@ -495,6 +495,13 @@ static bool is_valid_ip6addr(const std::string& str)
}
}
 
// Work around use of non-standard feature (not part of ISO-C++)
 
#pragma GCC diagnostic push
 
#pragma GCC diagnostic ignored "-Wpedantic"
 
#ifdef __clang__
 
#pragma GCC diagnostic ignored "-Wgnu-string-literal-operator-template"
 
#endif
 
template <typename CharT, CharT... Cs>
template <typename CharT, CharT... Cs>
static constexpr auto operator"" _ipaddr()
static constexpr auto operator"" _ipaddr()
{
{
@@ -527,6 +534,8 @@ static constexpr auto operator"" _ip6()
@@ -527,6 +534,8 @@ static constexpr auto operator"" _ip6()
return rmrf::net::inet_pton<AF_INET6>(str);
return rmrf::net::inet_pton<AF_INET6>(str);
}
}
 
#pragma GCC diagnostic pop
 
static constexpr uint16_t operator "" _ipport(unsigned long long port)
static constexpr uint16_t operator "" _ipport(unsigned long long port)
{
{
if (port > 65535) {
if (port > 65535) {
Loading