mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
We should now be able to iterate over a string_view.
This commit is contained in:
@@ -15,6 +15,5 @@ endfunction(add_dual_compile_test)
|
||||
|
||||
|
||||
add_dual_compile_test(iterate_char_star)
|
||||
add_dual_compile_test(iterate_string_view)
|
||||
add_dual_compile_test(iterate_temporary_buffer)
|
||||
add_dual_compile_test(padded_string_view_char_star_no_capacity)
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
|
||||
using namespace simdjson;
|
||||
|
||||
int main() {
|
||||
ondemand::parser parser;
|
||||
#if COMPILATION_TEST_USE_FAILING_CODE
|
||||
auto json = std::string_view("1");
|
||||
auto doc = parser.iterate(json);
|
||||
#else
|
||||
auto json = "1"_padded;
|
||||
auto doc = parser.iterate(json);
|
||||
#endif
|
||||
int64_t value;
|
||||
auto error = doc.get(value);
|
||||
if (error) { exit(1); }
|
||||
std::cout << value << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user