Skip to content
#

cpp11

cpp logo

C++ is a popular and widely used mid-level language. It was designed as an extension of the C language.

Here are 2,894 public repositories matching this topic...

simdjson
mmatrosov
mmatrosov commented Dec 4, 2020

Is your feature request related to a problem? Please describe.
There is no way to pretty print a simdjson::dom::element to a string (or at least I did not find one). There is only a way to minify it to a string (or a stream).

Describe the solution you'd like
A function like to_pretty_string() or a configurable stream manipulator pretty or a stand-alone class PrettyPrinter. Wha

horenmar
horenmar commented Nov 25, 2020

They should take single matcher during construction, and their match method should take a generic range, using the new generic matcher support.

Expected usage:

REQUIRE_THAT(get_keys(), AllMatch(KeyPattern({1, 2, 3})));
REQUIRE_THAT(get_numbers(), NoneMatch(IsOdd{}));
REQUIRE_THAT(get_strings(), AnyMatch(Contains("webscale") && !Contains("MongoDB")));

the matching semantics

galkinvv
galkinvv commented Jan 21, 2020

The doc is great! Hoewever some areas are still missing.
C++11 intoduced raw string literals: https://en.cppreference.com/w/cpp/language/string_literal

It is useful in many different areas, like strings with quotes, multiline strings and for example windows paths without escaping backslashes:

const char win_path[] = R"(c:\some\unescaped\path)";

The same cppreference link als

Created by Bjarne Stroustrup

Released October 1985

Website
isocpp.org
Wikipedia
Wikipedia
You can’t perform that action at this time.