6 Комити 26adf67f22 ... 121e46bc77

Аутор SHA1 Порука Датум
  Sam Jaffe 121e46bc77 Merge branch 'feat/format-matcher-with-expect' into refactor/expected пре 1 недеља
  Sam Jaffe eb6a439b51 Merge branch 'refactor/expected' into feat/format-matcher-with-expect пре 1 недеља
  Sam Jaffe e68bd882cd Merge branch 'feat/format-matcher' into feat/format-matcher-with-expect пре 1 недеља
  Sam Jaffe ca74d7a5f6 fix: proper formulation of RelativePointer пре 2 недеља
  Sam Jaffe 2e2f6f584a refactor: fix merge errors for use w/ expected пре 2 недеља
  Sam Jaffe b557d86fac Merge branch 'refactor/expected' into feat/format-matcher-with-expect пре 2 недеља
1 измењених фајлова са 1 додато и 4 уклоњено
  1. 1 4
      include/jvalidate/format.h

+ 1 - 4
include/jvalidate/format.h

@@ -695,10 +695,7 @@ template <typename CharT> inline bool email(std::basic_string_view<CharT> em) {
 }
 }
 
 
 template <typename T> inline bool ctor_as_valid(std::string_view str) {
 template <typename T> inline bool ctor_as_valid(std::string_view str) {
-  try {
-    [[maybe_unused]] auto _ = T(str);
-    return true;
-  } catch (std::exception const &) { return false; }
+  return T::parse(str).has_value();
 }
 }
 
 
 #if JVALIDATE_HAS_IDNA
 #if JVALIDATE_HAS_IDNA