Make simdjson_result<element>.is() return bool
Fixes #708.
{"label": "simdjson:master", "ref": "master", "sha": "eef117194478115f842e08682bc769051a0a863f"}
When exceptions are disabled, then the is<T> template will return `simdjson_return<bool>`.  So we have to do something like...

```C++
 bool v;
 error_code x;
 doc.is<uint64_t>().tie(v,x);
```

That seems like a lot of work just to get a bool?

It seems much more useful to call directly `get<uint64_t>`.


Rationale for is<T> when exceptions are disabled
diff --git a/include/simdjson/dom/element.h b/include/simdjson/dom/element.h
index 6d9af51ddd..acd466fca4 100644
--- a/include/simdjson/dom/element.h
+++ b/include/simdjson/dom/element.h
@@ -455,7 +455,7 @@ struct simdjson_result<dom::element> : public internal::simdjson_result_base<dom
 
   really_inline simdjson_result<dom::element_type> type() const noexcept;
   template<typename T>
-  really_inline simdjson_result<bool> is() const noexcept;
+  really_inline bool is() const noexcept;
   template<typename T>
   really_inline simdjson_result<T> get() const noexcept;
   template<typename T>
@@ -470,14 +470,14 @@ struct simdjson_result<dom::element> : public internal::simdjson_result_base<dom
   really_inline simdjson_result<double> get_double() const noexcept;
   really_inline simdjson_result<bool> get_bool() const noexcept;
 
-  really_inline simdjson_result<bool> is_array() const noexcept;
-  really_inline simdjson_result<bool> is_object() const noexcept;
-  really_inline simdjson_result<bool> is_string() const noexcept;
-  really_inline simdjson_result<bool> is_int64_t() const noexcept;
-  really_inline simdjson_result<bool> is_uint64_t() const noexcept;
-  really_inline simdjson_result<bool> is_double() const noexcept;
-  really_inline simdjson_result<bool> is_bool() const noexcept;
-  really_inline simdjson_result<bool> is_null() const noexcept;
+  really_inline bool is_array() const noexcept;
+  really_inline bool is_object() const noexcept;
+  really_inline bool is_string() const noexcept;
+  really_inline bool is_int64_t() const noexcept;
+  really_inline bool is_uint64_t() const noexcept;
+  really_inline bool is_double() const noexcept;
+  really_inline bool is_bool() const noexcept;
+  really_inline bool is_null() const noexcept;
 
   really_inline simdjson_result<dom::element> operator[](const std::string_view &key) const noexcept;
   really_inline simdjson_result<dom::element> operator[](const char *key) const noexcept;
diff --git a/include/simdjson/inline/element.h b/include/simdjson/inline/element.h
index 690f40ff6c..fc983eedb4 100644
--- a/include/simdjson/inline/element.h
+++ b/include/simdjson/inline/element.h
@@ -24,9 +24,8 @@ inline simdjson_result<dom::element_type> simdjson_result<dom::element>::type()
 }
 
 template<typename T>
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is() const noexcept {
-  if (error()) { return error(); }
-  return first.is<T>();
+really_inline bool simdjson_result<dom::element>::is() const noexcept {
+  return !error() && first.is<T>();
 }
 template<typename T>
 really_inline simdjson_result<T> simdjson_result<dom::element>::get() const noexcept {
@@ -72,38 +71,30 @@ really_inline simdjson_result<bool> simdjson_result<dom::element>::get_bool() co
   return first.get_bool();
 }
 
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_array() const noexcept {
-  if (error()) { return error(); }
-  return first.is_array();
+really_inline bool simdjson_result<dom::element>::is_array() const noexcept {
+  return !error() && first.is_array();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_object() const noexcept {
-  if (error()) { return error(); }
-  return first.is_object();
+really_inline bool simdjson_result<dom::element>::is_object() const noexcept {
+  return !error() && first.is_object();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_string() const noexcept {
-  if (error()) { return error(); }
-  return first.is_string();
+really_inline bool simdjson_result<dom::element>::is_string() const noexcept {
+  return !error() && first.is_string();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_int64_t() const noexcept {
-  if (error()) { return error(); }
-  return first.is_int64_t();
+really_inline bool simdjson_result<dom::element>::is_int64_t() const noexcept {
+  return !error() && first.is_int64_t();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_uint64_t() const noexcept {
-  if (error()) { return error(); }
-  return first.is_uint64_t();
+really_inline bool simdjson_result<dom::element>::is_uint64_t() const noexcept {
+  return !error() && first.is_uint64_t();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_double() const noexcept {
-  if (error()) { return error(); }
-  return first.is_double();
+really_inline bool simdjson_result<dom::element>::is_double() const noexcept {
+  return !error() && first.is_double();
 }
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_bool() const noexcept {
-  if (error()) { return error(); }
-  return first.is_bool();
+really_inline bool simdjson_result<dom::element>::is_bool() const noexcept {
+  return !error() && first.is_bool();
 }
 
-really_inline simdjson_result<bool> simdjson_result<dom::element>::is_null() const noexcept {
-  if (error()) { return error(); }
-  return first.is_null();
+really_inline bool simdjson_result<dom::element>::is_null() const noexcept {
+  return !error() && first.is_null();
 }
 
 really_inline simdjson_result<dom::element> simdjson_result<dom::element>::operator[](const std::string_view &key) const noexcept {

diff --git a/tests/basictests.cpp b/tests/basictests.cpp
index d89eb5a9c0..ec7fe553bc 100644
--- a/tests/basictests.cpp
+++ b/tests/basictests.cpp
@@ -1503,27 +1503,9 @@ namespace type_tests {
     std::cout << "  test_is_null() expecting " << expected_is_null << std::endl;
     // Grab the element out and check success
     dom::element element = result.first;
-    bool actual_is_null;
-    auto error = result.is_null().get(actual_is_null);
-    ASSERT_SUCCESS(error);
-    ASSERT_EQUAL(actual_is_null, expected_is_null);
-
-    actual_is_null = element.is_null();
-    ASSERT_EQUAL(actual_is_null, expected_is_null);
-
-#if SIMDJSON_EXCEPTIONS
-
-    try {
-
-      actual_is_null = result.is_null();
-      ASSERT_EQUAL(actual_is_null, expected_is_null);
+    ASSERT_EQUAL(result.is_null(), expected_is_null);
 
-    } catch(simdjson_error &e) {
-      std::cerr << e.error() << std::endl;
-      return false;
-    }
-
-#endif // SIMDJSON_EXCEPTIONS
+    ASSERT_EQUAL(element.is_null(), expected_is_null);
 
     return true;
   }
diff --git a/tests/cast_tester.h b/tests/cast_tester.h
index 00e90de740..55eda96aec 100644
--- a/tests/cast_tester.h
+++ b/tests/cast_tester.h
@@ -40,7 +40,6 @@ class cast_tester {
 
   bool test_is(element element, bool expected);
   bool test_is(simdjson_result<element> element, bool expected);
-  bool test_is_error(simdjson_result<element> element, error_code expected_error);
 
   bool test_named_get(element element, T expected = {});
   bool test_named_get(simdjson_result<element> element, T expected = {});
@@ -49,13 +48,12 @@ class cast_tester {
 
   bool test_named_is(element element, bool expected);
   bool test_named_is(simdjson_result<element> element, bool expected);
-  bool test_named_is_error(simdjson_result<element> element, error_code expected_error);
 
 private:
   simdjson_result<T> named_get(element element);
   simdjson_result<T> named_get(simdjson_result<element> element);
   bool named_is(element element);
-  simdjson_result<bool> named_is(simdjson_result<element> element);
+  bool named_is(simdjson_result<element> element);
   bool assert_equal(const T& expected, const T& actual);
 };
 
@@ -206,16 +204,7 @@ bool cast_tester<T>::test_is(element element, bool expected) {
 
 template<typename T>
 bool cast_tester<T>::test_is(simdjson_result<element> element, bool expected) {
-  bool actual;
-  ASSERT_SUCCESS(element.is<T>().get(actual));
-  ASSERT_EQUAL(actual, expected);
-  return true;
-}
-
-template<typename T>
-bool cast_tester<T>::test_is_error(simdjson_result<element> element, error_code expected_error) {
-  UNUSED bool actual;
-  ASSERT_EQUAL(element.is<T>().get(actual), expected_error);
+  ASSERT_EQUAL(element.is<T>(), expected);
   return true;
 }
 
@@ -227,16 +216,7 @@ bool cast_tester<T>::test_named_is(element element, bool expected) {
 
 template<typename T>
 bool cast_tester<T>::test_named_is(simdjson_result<element> element, bool expected) {
-  bool actual;
-  ASSERT_SUCCESS(named_is(element).get(actual));
-  ASSERT_EQUAL(actual, expected);
-  return true;
-}
-
-template<typename T>
-bool cast_tester<T>::test_named_is_error(simdjson_result<element> element, error_code expected_error) {
-  bool actual;
-  ASSERT_EQUAL(named_is(element).get(actual), expected_error);
+  ASSERT_EQUAL(named_is(element), expected);
   return true;
 }
 
@@ -267,14 +247,14 @@ template<> bool cast_tester<int64_t>::named_is(element element) { return element
 template<> bool cast_tester<double>::named_is(element element) { return element.is_double(); }
 template<> bool cast_tester<bool>::named_is(element element) { return element.is_bool(); }
 
-template<> simdjson_result<bool> cast_tester<array>::named_is(simdjson_result<element> element) { return element.is_array(); }
-template<> simdjson_result<bool> cast_tester<object>::named_is(simdjson_result<element> element) { return element.is_object(); }
-template<> simdjson_result<bool> cast_tester<const char *>::named_is(simdjson_result<element> element) { return element.is_string(); }
-template<> simdjson_result<bool> cast_tester<std::string_view>::named_is(simdjson_result<element> element) { return element.is_string(); }
-template<> simdjson_result<bool> cast_tester<uint64_t>::named_is(simdjson_result<element> element) { return element.is_uint64_t(); }
-template<> simdjson_result<bool> cast_tester<int64_t>::named_is(simdjson_result<element> element) { return element.is_int64_t(); }
-template<> simdjson_result<bool> cast_tester<double>::named_is(simdjson_result<element> element) { return element.is_double(); }
-template<> simdjson_result<bool> cast_tester<bool>::named_is(simdjson_result<element> element) { return element.is_bool(); }
+template<> bool cast_tester<array>::named_is(simdjson_result<element> element) { return element.is_array(); }
+template<> bool cast_tester<object>::named_is(simdjson_result<element> element) { return element.is_object(); }
+template<> bool cast_tester<const char *>::named_is(simdjson_result<element> element) { return element.is_string(); }
+template<> bool cast_tester<std::string_view>::named_is(simdjson_result<element> element) { return element.is_string(); }
+template<> bool cast_tester<uint64_t>::named_is(simdjson_result<element> element) { return element.is_uint64_t(); }
+template<> bool cast_tester<int64_t>::named_is(simdjson_result<element> element) { return element.is_int64_t(); }
+template<> bool cast_tester<double>::named_is(simdjson_result<element> element) { return element.is_double(); }
+template<> bool cast_tester<bool>::named_is(simdjson_result<element> element) { return element.is_bool(); }
 
 template<typename T> bool cast_tester<T>::assert_equal(const T& expected, const T& actual) {
   ASSERT_EQUAL(expected, actual);

{"avoid_stdout": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "example_compiletest_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uchar_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "unicode_tests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "jsoncheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "avoid_stderr": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "extracting_values_example": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_dump": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_stdstring_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "pointercheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "integer_tests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_will_fail_with_exceptions_off": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_parser": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "simdjson_force_implementation": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "testjson2json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uint8_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "example_compiletest_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "checkimplementation": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_load_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "json2json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_dump_raw_tape": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "stringparsingcheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "basictests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_print_json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_padstring_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "avoid_abort": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "errortests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_load_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart14": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "numberparsingcheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_noexceptions11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uchar_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart_noexceptions": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "amalgamate_demo_direct_from_repository": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_stdstring_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "amalgamate_demo": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_noexceptions": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "simdjson_force_implementation_error": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "parse_many_test": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_padstring_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uint8_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_minify": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart_noexceptions11": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"avoid_stdout": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "example_compiletest_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uchar_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "unicode_tests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "jsoncheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "avoid_stderr": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "extracting_values_example": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_dump": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_stdstring_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "pointercheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "integer_tests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_will_fail_with_exceptions_off": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_parser": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "simdjson_force_implementation": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "testjson2json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uint8_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "example_compiletest_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "checkimplementation": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_load_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "json2json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_dump_raw_tape": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "stringparsingcheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "basictests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_print_json": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_padstring_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "avoid_abort": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "errortests": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_load_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart14": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "numberparsingcheck": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_noexceptions11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uchar_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart_noexceptions": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "amalgamate_demo_direct_from_repository": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_stdstring_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "amalgamate_demo": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "readme_examples_noexceptions": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "simdjson_force_implementation_error": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "parse_many_test": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_padstring_should_not_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "dangling_parser_parse_uint8_should_compile": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "fuzz_minify": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "quickstart_noexceptions11": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"passed_count": 47, "failed_count": 0, "skipped_count": 0, "passed_tests": ["avoid_stdout", "readme_examples11", "example_compiletest_should_compile", "dangling_parser_parse_uchar_should_not_compile", "unicode_tests", "jsoncheck", "avoid_stderr", "extracting_values_example", "fuzz_dump", "dangling_parser_parse_stdstring_should_not_compile", "pointercheck", "integer_tests", "readme_examples_will_fail_with_exceptions_off", "fuzz_parser", "simdjson_force_implementation", "quickstart11", "quickstart", "testjson2json", "dangling_parser_parse_uint8_should_not_compile", "example_compiletest_should_not_compile", "fuzz_minify", "readme_examples", "dangling_parser_load_should_not_compile", "json2json", "fuzz_dump_raw_tape", "stringparsingcheck", "basictests", "fuzz_print_json", "dangling_parser_parse_padstring_should_compile", "avoid_abort", "errortests", "dangling_parser_load_should_compile", "quickstart14", "numberparsingcheck", "readme_examples_noexceptions11", "dangling_parser_parse_uchar_should_compile", "quickstart_noexceptions", "amalgamate_demo_direct_from_repository", "dangling_parser_parse_stdstring_should_compile", "amalgamate_demo", "readme_examples_noexceptions", "simdjson_force_implementation_error", "parse_many_test", "dangling_parser_parse_padstring_should_not_compile", "dangling_parser_parse_uint8_should_compile", "checkimplementation", "quickstart_noexceptions11"], "failed_tests": [], "skipped_tests": []}
{"passed_count": 0, "failed_count": 0, "skipped_count": 0, "passed_tests": [], "failed_tests": [], "skipped_tests": []}
{"passed_count": 47, "failed_count": 0, "skipped_count": 0, "passed_tests": ["avoid_stdout", "readme_examples11", "example_compiletest_should_compile", "dangling_parser_parse_uchar_should_not_compile", "unicode_tests", "jsoncheck", "avoid_stderr", "extracting_values_example", "fuzz_dump", "dangling_parser_parse_stdstring_should_not_compile", "pointercheck", "integer_tests", "readme_examples_will_fail_with_exceptions_off", "fuzz_parser", "simdjson_force_implementation", "quickstart11", "quickstart", "testjson2json", "dangling_parser_parse_uint8_should_not_compile", "example_compiletest_should_not_compile", "fuzz_minify", "readme_examples", "dangling_parser_load_should_not_compile", "json2json", "fuzz_dump_raw_tape", "stringparsingcheck", "basictests", "fuzz_print_json", "dangling_parser_parse_padstring_should_compile", "avoid_abort", "errortests", "dangling_parser_load_should_compile", "quickstart14", "numberparsingcheck", "readme_examples_noexceptions11", "dangling_parser_parse_uchar_should_compile", "quickstart_noexceptions", "amalgamate_demo_direct_from_repository", "dangling_parser_parse_stdstring_should_compile", "amalgamate_demo", "readme_examples_noexceptions", "simdjson_force_implementation_error", "parse_many_test", "dangling_parser_parse_padstring_should_not_compile", "dangling_parser_parse_uint8_should_compile", "checkimplementation", "quickstart_noexceptions11"], "failed_tests": [], "skipped_tests": []}