Giter Club home page Giter Club logo

jtc's Introduction

jtc - cli tool to extract, manipulate and transform source JSON

jtc stand for: JSON transformational chains (used to be JSON test console).

jtc offers a powerful way to select one or multiple elements from a source JSON and apply various actions on the selected elements at once (wrap selected elements into a new JSON, filter in/out, sort elements, update elements, insert new elements, remove, copy, move, compare, transform, swap around and many other operations).

Enhancement requests and/or questions are more than welcome: [email protected]

Content:

  1. Short description

  2. Compilation and installation options

  3. Quick-start guide

  4. Complete User Guide

  5. C++ class and interface usage primer

  6. jtc vs jq

Short description

- jtc is a simple yet very powerful and efficient cli utility tool to process and manipulate JSON data

jtc offers following features (a short list of main features):

  • simple user interface allowing applying a bulk of changes in a single or chained sets of commands
  • featured walk-path interface lets extracting any combination of data from sourced JSON trees
  • extracted data is representable either as found, or could be encapsulated in JSON array/object or transformed using templates
  • support Regular Expressions when searching source JSON
  • fast and efficient processing of very large JSON files (various built-in search caches)
  • insert/update operations optionally may undergo shell cli evaluation
  • support in-place modifications of the input/source JSON file
  • features namespaces, facilitating interpolation of preserved JSON values in templates
  • supports buffered and streamed modes of input read
  • sports concurrent input JSON reading/parsing (on multi-core CPU)
  • written entirely in C++14, no dependencies (STL only, idiomatic C++, no memory leaks)
  • extensively debuggable
  • conforms JSON specification (json.org)

The walk-path feature is easy to understand - it's only made of 2 kinds of lexemes traversing JSON tree, which could be mixed up in any order:

  • subscripts - enclosed into [, ], subscripts let traversing JSON tree downwards (towards the leaves) and upwards (towards the root)
  • search lexemes - encased as <..> or >..< (for a recursive and non-recursive searches respectively); search lexemes facilitate various match criteria defined by an optional suffix and/or quantifier

There's also a 3rd kind of lexemes - directives: they typically facilitate other functions like working with namespaces, controlling walk-path execution, etc; directives are syntactically similar to the search lexemes

All lexemes can be iterable:

  • iterable subscripts let iterating over children of currently addressed JSON iterables nodes (arrays/objects),
  • while iterable search lexemes let iterating over all (recursive) matches for a given search criteria

A walk-path may have an arbitrary number of lexemes -the tool accepts a virtually unlimited number of walk paths. See below more detailed explanation with examples

Compilation and installation options

For compiling, c++14 (or later) is required. To compile under different platforms:

  • MacOS/BSD:
    • c++ -o jtc -Wall -std=c++14 -Ofast jtc.cpp
  • Linux:
    • non-relocatable (dynamically linked) image:
      • c++ -o jtc -Wall -std=gnu++14 -Ofast -pthread -lpthread jtc.cpp
    • relocatable (statically linked) image:
      • c++ -o jtc -Wall -std=gnu++14 -Ofast -static -Wl,--whole-archive -lrt -pthread -lpthread -Wl,--no-whole-archive jtc.cpp
  • Debian:
    • c++ -o jtc -Wall -std=c++14 -pthread -lpthread -Ofast jtc.cpp (ensure c++ poits to clang++-6.0 or above)

Following debug related flags could be passed to jtc when compiling:

  • -DNDEBUG: compile w/o debugs, however it's unadvisable - there's no performance gain from doing so
  • -DNDBG_PARSER: disable debugs coming from parsing JSON (handy when deep debugging huge JSONs and want to skip parsing debugs)
  • -DBG_FLOW: all debuggable function/method calls will disply an entry and exit points
  • -DBG_mTS, -DBG_uTS: display absolute time-stamps in the debug: with millisecond accuracy and with microsecond accuracy respectively
  • -DBG_dTS: used with either of 2 previous flags: makes time-stamp to display delta (since last debug message) instead of absolute stamp
  • -DBG_CC: every call to a copy-constructor in Jnode class will reveal itself (handy for optimization debugging)

Linux and MacOS precompiled binaries are available for download

Choose the latest precompiled binary:

  • latest macOS

    if you don't want to go through macOS security hurdle, then remove the quarantine attribute from the file after binary download, e.g. (assuming you opened terminal in the folder where downloaded binary is):

    bash $ mv ./jtc-macos-64.latest ./jtc
    bash $ chmod 754 ./jtc
    bash $ xattr -r -d com.apple.quarantine ./jtc
    
  • latest linux 64 bit
  • latest linux 32 bit

Rename the downloaded file and give proper permissions. E.g., for the latest macOS:

mv jtc-macos-64.latest jtc
chmod 754 jtc

Packaged installations:

Installing via MacPorts

On MacOS, you can install jtc via the MacPorts package manager:

$ sudo port selfupdate
$ sudo port install jtc
Installation on Linux distributions

jtc is packaged in the following Linux distributions and can be installed via the package manager.

  • Fedora: jtc is present in Fedora 31 and later:
$ dnf install jtc
  • openSUSE: jtc can be installed on openSUSE Tumbleweed via zypper:
$ zypper in jtc

or on Leap 15.0 and later by adding the utilities repository and installing jtc via zypper.

Manual installation:

download jtc-master.zip, unzip it, descend into unzipped folder, compile using an appropriate command, move compiled file into an install location.

here're the example steps for MacOS:

  • say, jtc-master.zip has been downloaded to a folder and the terminal app is open in that folder:
  • unzip jtc-master.zip
  • cd jtc-master
  • c++ -o jtc -Wall -std=c++17 -Ofast jtc.cpp
  • sudo mv ./jtc /usr/local/bin/

Release Notes

See the latest Release Notes

Quick-start guide:

  • run the command jtc -g to read the mini USER-GUIDE, with walk path syntax, usage notes, short examples
  • read the examples just below
  • see stackoverflow-json for lots of worked examples based on Stack Overflow questions
  • refer to the complete User Guide for further examples and guidelines.

Consider a following JSON (a mockup of a bookmark container), stored in a file Bookmarks:

{
   "Bookmarks": [
      {
         "children": [
            {
               "children": [
                  { "name": "The New York Times", "stamp": "2017-10-03, 12:05:19", "url": "https://www.nytimes.com/" },
                  { "name": "HuffPost UK", "stamp": "2017-11-23, 12:05:19", "url": "https://www.huffingtonpost.co.uk/" }
               ],
               "name": "News",
               "stamp": "2017-10-02, 12:05:19"
            },
            {
               "children": [
                  { "name": "Digital Photography Review", "stamp": "2017-02-27, 12:05:19", "url": "https://www.dpreview.com/" }
               ],
               "name": "Photography",
               "stamp": "2017-02-27, 12:05:19"
            }
         ],
         "name": "Personal",
         "stamp": "2017-01-22, 12:05:19"
      },
      {
         "children": [
            { "name": "Stack Overflow", "stamp": "2018-05-01, 12:05:19", "url": "https://stackoverflow.com/" },
            { "name": "C++ reference", "stamp": "2018-06-21, 12:05:19", "url": "https://en.cppreference.com/" }
         ],
         "name": "Work",
         "stamp": "2018-03-06, 12:07:29"
      }
   ]
}

1. let's start with a simple thing - list all URLs:

bash $ jtc -w'<url>l:' Bookmarks
"https://www.nytimes.com/"
"https://www.huffingtonpost.co.uk/"
"https://www.dpreview.com/"
"https://stackoverflow.com/"
"https://en.cppreference.com/"

Let's take a look at the walk-path <url>l::

  • search lexemes are enclosed in angular brackets <, > - that style provides a recursive search throughout JSON
  • suffix l instructs to search among labels only
  • quantifier : instructs to find all occurrences, such quantifiers makes a path iterable

2. dump all bookmark names from the Work folder:

bash $ jtc -w'<Work>[-1][children][:][name]' Bookmarks
"Stack Overflow"
"C++ reference"

Here the walk-path <Work>[-1][children][:][name] is made of following lexemes:

a. <Work>: find within a JSON tree the first occurrence where the JSON string value is matching "Work" exactly
b. [-1]: step up one tier in the JSON tree structure (i.e., address an immediate parent of the found JSON element)
c. [children]: select/address a node whose label is "children" (it'll be a JSON array, at the same tier with Work)
d. [:]: select each node in the array
e. [name]: select/address a node with the label "name"

in order to understand better how the walk-path works, let's run that series of cli in a slow-motion, gradually adding lexemes to the path one by one, perhaps with the option -l to see also the labels (if any) of the selected elements:

bash $ jtc -w'<Work>' -l Bookmarks
"name": "Work"
bash $ jtc -w'<Work>[-1]' -l Bookmarks
{
   "children": [
      {
         "name": "Stack Overflow",
         "stamp": "2018-05-01, 12:05:19",
         "url": "https://stackoverflow.com/"
      },
      {
         "name": "C++ reference",
         "stamp": "2018-06-21, 12:05:19",
         "url": "https://en.cppreference.com/"
      }
   ],
   "name": "Work",
   "stamp": "2018-03-06, 12:07:29"
}
bash $ jtc -w'<Work>[-1][children]' -l Bookmarks
"children": [
   {
      "name": "Stack Overflow",
      "stamp": "2018-05-01, 12:05:19",
      "url": "https://stackoverflow.com/"
   },
   {
      "name": "C++ reference",
      "stamp": "2018-06-21, 12:05:19",
      "url": "https://en.cppreference.com/"
   }
]
bash $ jtc -w'<Work>[-1][children][:]' -l Bookmarks
{
   "name": "Stack Overflow",
   "stamp": "2018-05-01, 12:05:19",
   "url": "https://stackoverflow.com/"
}
{
   "name": "C++ reference",
   "stamp": "2018-06-21, 12:05:19",
   "url": "https://en.cppreference.com/"
}
bash $ jtc -w'<Work>[-1][children][:][name]' -l Bookmarks
"name": "Stack Overflow"
"name": "C++ reference"

B.t.w., a better (a bit faster and more efficient) walk-path achieving the same query would be this:

  • jtc -w'<Work>[-1][children]<name>l:' Bookmarks

3. dump all URL's names:

bash $ jtc -w'<url>l:[-1][name]' Bookmarks
"The New York Times"
"HuffPost UK"
"Digital Photography Review"
"Stack Overflow"
"C++ reference"

this walk-path <url>l:[-1][name]:

  • finds recursively (encasement <, >) each (:) JSON element with a label (l) matching url
  • then for an each found JSON element, select its parent ([-1])
  • then, select a JSON (sub)element with the label "name"

4. dump all the URLs and their corresponding names, preferably wrap found pairs in JSON array:

bash $ jtc -w'<url>l:' -w'<url>l:[-1][name]' -jl Bookmarks
[
   {
      "name": "The New York Times",
      "url": "https://www.nytimes.com/"
   },
   {
      "name": "HuffPost UK",
      "url": "https://www.huffingtonpost.co.uk/"
   },
   {
      "name": "Digital Photography Review",
      "url": "https://www.dpreview.com/"
   },
   {
      "name": "Stack Overflow",
      "url": "https://stackoverflow.com/"
   },
   {
      "name": "C++ reference",
      "url": "https://en.cppreference.com/"
   }
]
  • yes, multiple walks (-w) are allowed
  • option -j will wrap the walked outputs into a JSON array, but not just,
  • option -l used together with -j will ensure relevant walks are grouped together (try without -l)
  • if multiple walks (-w) are present, by default, walked results will be printed interleaved (if it can be interleaved)

5. Debugging and validating JSON

jtc is extensively debuggable: the more times option -d is passed the more debugs will be produced. Enabling too many debugs might be overwhelming, though one specific case many would find extremely useful - when validating a failing JSON:

bash $ <addressbook-sample.json jtc 
jtc json exception: expected_json_value

If JSON is big, it's desirable to locate the parsing failure point. Passing just one -d let easily spotting the parsing failure point and its locus:

bash $ <addressbook-sample.json jtc -d
.display_opts(), option set[0]: -d (internally imposed: )
.init_inputs(), reading json from <stdin>
.exception_locus_(), ...         }|       ],|       "children": [,],|       "spouse": null|    },|    {|  ...
.exception_spot_(), -------------------------------------------->| (offset: 967)
jtc json parsing exception (<stdin>:967): expected_json_value
bash $ 

Complete User Guide

there's a lot more under the hood of jtc:

  • various viewing options,
  • directives allowing controlling walks, preserving parts of whole JSONs in namespaces, walking with various criteria, etc
  • interpolating namespaces and walk results in templates and lexemes
  • amending input JSONs via purge/swap/update/insert/move/merge operations
  • comparing JSONs (or their parts) or their schemas
  • various processing modes (streamed, buffered, concurrent parsing, chaining operations, etc)
  • and more ...

Refer to a complete User Guide for further examples and guidelines.

C++ class and interface usage primer

Refer to a Class usage primer document.

jtc vs jq:

jtc was inspired by the complexity of jq interface (and its DSL), aiming to provide users a tool which would let attaining the desired JSON queries in an easier, more feasible and succinct way

utility ideology:

  • jq is a stateful processor with own DSL, variables, operations, control flow logic, IO system, etc, etc
  • jtc is a unix utility confining its functionality to operation types with its data model only (as per unix ideology). jtc performs one major operation at a time (like insertion, update, swap, etc), however multiple operations could be chained using / delimiter

jq is non-idiomatic in a unix way, e.g.: one can write a program in jq language that even has nothing to do with JSON. Most of the requests (if not all) to manipulate JSONs are ad hoc type of tasks, and learning jq's DSL for ad hoc type of tasks is an overkill (that purpose is best facilitated with GPL, e.g.: Python).
The number of asks on the stackoverflow to facilitate even simple queries for jq is huge - that's the proof in itself that for many people feasibility of attaining their asks with jq is a way too low, hence they default to posting their questions on the forum.

jtc on the other hand is a utility (not a language), which employs a novel but powerful concept, which "embeds" the ask right into the walk-path. That facilitates a much higher feasibility of attaining a desired result: building a walk-path a lexeme by lexeme, one at a time, provides an immediate visual feedback and let coming up with the desired result rather quickly.

learning curve:

  • jq: before you could come up with a query to handle even a relatively simple ask, you need to become an expert in jq language, which will take some time. Coming up with the complex queries requires what it seems having a PhD in jq, or spending lots of time on stackoverflow and similar forums
  • jtc employs only a simple (but powerful) concept of the walk-path (which is made only of 2 types of search lexemes, each type though has several variants) which is quite easy to grasp.

handling irregular JSONs:

  • jq: handling irregular JSONs for jq is not a challenge, building a query is! The more irregularities you need to handle the more challenging the query (jq program) becomes
  • jtc was conceived with the idea of being capable of handling complex irregular JSONs with a simplified interface - that all is fitted into the concept of the walk-path, while daisy-chaining multiple operations is possible to satisfy almost every ask.

solutions input invariance

- most of jtc solutions would be input invariant (hardly the same could be stated for jq). Not that it's impossible to come up with invariant solutions in jq, it's just a lot more harder, while jtc with its walk-path model prompts for invariant solutions. I.e., the invariant solution will keep working even once the JSON outer format changes (the invariant solution only would stop working once the relationship between walked JSON elements changes).
E.g.: consider a following query, extract format [ "name", "surname" ] from 2 types of JSON:

bash $ case1='{"Name":"Patrick", "Surname":"Lynch", "gender":"male", "age":29}'
bash $ case2='[{"Name":"Patrick", "Surname":"Lynch", "gender":"male", "age":29},{"Name":"Alice", "Surname":"Price", "gender":"female", "age":27}]'

a natural, idiomatic jtc solution would be:

bash $ <<<$case1 jtc -w'<Name>l:[-1]' -rT'[{{$a}},{{$b}}]'
[ "Patrick", "Lynch" ]
bash $ <<<$case2 jtc -w'<Name>l:[-1]' -rT'[{{$a}},{{$b}}]'
[ "Patrick", "Lynch" ]
[ "Alice", "Price" ]

While one of the most probable jq solution would be:

bash $ <<<$case1 jq -c 'if type == "array" then .[] else . end | [.Name, .Surname]'
["Patrick","Lynch"]
bash $ <<<$case2 jq -c 'if type == "array" then .[] else . end | [.Name, .Surname]'
["Patrick","Lynch"]
["Alice","Price"]

The both solutions work correctly, however, any change in the outer encapsulation will break jq's solution , while jtc will keep working even if JSON is reshaped into an irregular structure, e.g.:

#jtc:
bash $ case3='{"root":[{"Name":"Patrick", "Surname":"Lynch", "gender":"male", "age":29}, {"closed circle":[{"Name":"Alice", "Surname":"Price", "gender":"female", "age":27}, {"Name":"Rebecca", "Surname":"Hernandez", "gender":"female", "age":28}]}]}'
bash $ 
bash $ <<<$case3 jtc -w'<Name>l:[-1]' -rT'[{{$a}},{{$b}}]'
[ "Patrick", "Lynch" ]
[ "Alice", "Price" ]
[ "Rebecca", "Hernandez" ]

#jq:
bash $ <<<$case3 jq -c 'if type == "array" then .[] else . end | [.Name, .Surname]'
[null,null]

The same property makes jtc solutions resistant to cases of incomplete data, e.g.: if we drop "Name" entry from one of the entries in case 2, jtc solution still works correctly:

#jtc:
bash $ case2='[{"Surname":"Lynch", "gender":"male", "age":29},{"Name":"Alice", "Surname":"Price", "gender":"female", "age":27}]'
bash $ 
bash $ <<<$case2 jtc -w'<Name>l:[-1]' -rT'[{{$a}},{{$b}}]'
[ "Alice", "Price" ]

#jq:
bash $ <<<$case2 jq -c 'if type == "array" then .[] else . end | [.Name, .Surname]'
[null,"Lynch"]
["Alice","Price"]

- i.e., jtc will not assume that user would require some default substitution in case of incomplete data (but if such handling is required then the walk-path can be easily enhanced)

programming model

  • jq is written in C language, which drags all intrinsic problems the language has dated its creation (here's what I mean)
  • jtc is written in the idiomatic C++14 using STL only. jtc does not have a single naked memory allocation operator (those few new operators required for legacy interface are implemented as guards), nor it has a single naked pointer acting as a resource holder/owner, thus jtc is guaranteed to be free of memory/resources leaks (at least one class of the problems is off the table) - STL guaranty.
    Also, jtc is written in a very portable way, it should not cause problems compiling it under any unix like system.

JSON numerical fidelity:

  • jq is not compliant with JSON numerical definition. What jq does, it simply converts a symbolic numerical representation to an internal binary and keeps it that way. That approach:
    • is not compliant with JSON definition of the numerical values
    • it has problems retaining required precision
    • might change original representation of numericals
    • leads to incorrect processing of some JSON streams
  • jtc validates all JSON numericals per JSON standard and keep numbers internally in their original literal format, so it's free of all the above caveats, compare:
Handling jtc jq 1.6
Invalid Json: [00] <<<'[00]' jtc <<<'[00]' jq -c .
Parsing result jtc json parsing exception (<stdin>:3): missed_prior_enumeration [0]
Precision test: <<<'[0.99999999999999999]' jtc -r <<<'[0.99999999999999999]' jq -c .
Parsing result [ 0.99999999999999999 ] [1]
Retaining original format: <<<'[0.00001]' jtc -r <<<'[0.00001]' jq -c .
Parsing result [ 0.00001 ] [1e-05]
Stream of atomic JSONs: <<<'{}[]"bar""foo"00123truefalsenull' jtc -Jr <<<'{}[]"bar""foo"00123truefalsenull' jq -sc
Parsing result [ {}, [], "bar", "foo", 0, 0, 123, true, false, null ] parse error: Invalid numeric literal at line 2, column 0

performance:

  • jq is a single-threaded process
  • jtc engages a concurrent (multi-threaded) reading/parsing when multiple files given (the advantage could be observed on multi-core CPU, though it become noticeable only with relatively big JSONs or with relatively big number of files processed)

Comparison of single-threaded performance:
Here's a 4+ million node JSON file standard.json:

bash $ time jtc -zz standard.json 
4329975
user 6.085 sec

The table below compares jtc and jq performance for similar operations (using TIMEFORMAT="user %U sec"):

jtc 1.76 jq 1.6
parsing JSON: parsing JSON:
bash $ time jtc -t2 standard.json | md5 bash $ time jq -M . standard.json | md5
d3b56762fd3a22d664fdd2f46f029599 d3b56762fd3a22d664fdd2f46f029599
user 9.110 sec user 18.853 sec
removing by key from JSON: removing by key from JSON:
bash $ time jtc -t2 -pw'<attributes>l:' standard.json | md5 bash $ time jq -M 'del(..|.attributes?)' standard.json | md5
0624aec46294399bcb9544ae36a33cd5 0624aec46294399bcb9544ae36a33cd5
user 10.027 sec user 27.439 sec
updating JSON recursively by label: updating JSON recursively by label:
bash $ time jtc -t2 -w'<attributes>l:[-1]' -i'{"reserved": null}' standard.json | md5 bash $ time jq -M 'walk(if type == "object" and has("attributes") then . + { "reserved" : null } else . end)' standard.json | md5
6c86462ae6b71e10e3ea114e86659ab5 6c86462ae6b71e10e3ea114e86659ab5
user 12.715 sec user 29.450 sec

Comparison of jtc to jtc (single-threaded to multi-threaded parsing performance):

bash $ unset TIMEFORMAT
bash $ 
bash $ # concurrent (multi-threaded) parsing:
bash $ time jtc -J / -zz  standard.json standard.json standard.json standard.json standard.json 
21649876

real	0m10.995s     # <- compare these figures
user	0m34.083s
sys	0m3.288s
bash $ 
bash $ # sequential (single-threaded) parsing:
bash $ time jtc -aJ / -zz  standard.json standard.json standard.json standard.json standard.json 
21649876

real	0m31.717s     # <- compare these figures
user	0m30.125s
sys	0m1.555s
bash $ 

Machine spec used for testing:

  Model Name:                 MacBook Pro
  Model Identifier:           MacBookPro15,1
  Processor Name:             Intel Core i7
  Processor Speed:            2,6 GHz
  Number of Processors:       1
  Total Number of Cores:      6
  L2 Cache (per Core):        256 KB
  L3 Cache:                   12 MB
  Hyper-Threading Technology: Enabled
  Memory:                     16 GB 2400 MHz DDR4

compare jtc based solutions with jq's:

Here are published some answers for JSON queries using jtc, you may compare those with jq's, as well as study the feasibility of the solutions, test relevant performance, etc

Refer to a complete User Guide for further examples and guidelines.

jtc's People

Contributors

d4n avatar herbygillot avatar ldn-softdev avatar soniah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jtc's Issues

Difference to jq

jq is pretty standard, how is this tool different / unique? what does it do better?

<ab.json jtc -w'<address>l[:]<Lbl>k<>k' -u"$map" -u'>Lbl<t' / -w'<address>l' fails with SEGV

The following example from User Guide.md:

bash $ map='{"postal code":"zip","street address":"street"}'
bash $ <ab.json jtc -w'<address>l[:]<Lbl>k<>k' -u"$map" -u'>Lbl<t' / -w'<address>l'

results in a crash:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==240254==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f2f272dc3ee bp 0x7ffd929298d0 sp 0x7ffd92928e18 T0)
==240254==The signal is caused by a READ memory access.
==240254==Hint: address points to the zero page.
    #0 0x7f2f272dc3ee in std::_Rb_tree_decrement(std::_Rb_tree_node_base*) (/lib64/libstdc++.so.6+0xc33ee)
    #1 0x5d8c65 in std::_Rb_tree_iterator<std::pair<unsigned long const, Json> >::operator--() /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:302:12
    #2 0x5d8c65 in std::reverse_iterator<std::_Rb_tree_iterator<std::pair<unsigned long const, Json> > >::operator->() const /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_iterator.h:228:2
    #3 0x5d8c65 in Jtc::advance_to_next_src(Json::iterator&, long) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1761:41
    #4 0x5d9f14 in Jtc::advance_to_next_src(Json::iterator&, long) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp
    #5 0x5cc962 in Jtc::collect_itr_bindings(Json::iterator&, Jtc::Grouping) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1704:8
    #6 0x5ee68b in Jtc::process_offsets_(std::deque<std::deque<Json::iterator, std::allocator<Json::iterator> >, std::allocator<std::deque<Json::iterator, std::allocator<Json::iterator> > > >&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&, unsigned long, std::vector<unsigned long, std::allocator<unsigned long> >&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:2770:2
    #7 0x5ec516 in Jtc::process_walk_iterators_(std::deque<std::deque<Json::iterator, std::allocator<Json::iterator> >, std::allocator<std::deque<Json::iterator, std::allocator<Json::iterator> > > >&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:2694:2
    #8 0x5cb111 in Jtc::walk_interleaved_(void (Jtc::*)(Json::iterator&, Jtc::Grouping)) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:2678:3
    #9 0x5c5c86 in Jtc::upsert_json(char) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1666:2
    #10 0x5bc2e6 in Jtc::demux_opt() /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1530:37
    #11 0x5b9cfb in run_single_optset(CommonResource&, Streamstr::const_iterator&, Json&, Json&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:914:29
    #12 0x5b6c47 in run_decomposed_optsets(CommonResource&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:888:3
    #13 0x5b00cb in main /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:814:6
    #14 0x7f2f26f01041 in __libc_start_main (/lib64/libc.so.6+0x27041)
    #15 0x47850d in _start (/home/dan/projects/github.com/ldn-softdev/jtc/jtc+0x47850d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libstdc++.so.6+0xc33ee) in std::_Rb_tree_decrement(std::_Rb_tree_node_base*)
==240254==ABORTING

[not a issue]Thanks

Hi there,

Thanks so much for this works.
It took me a while to find an another JSON parser than jq (horrible one).
Your API is simple to understand, simple to use,so quick and do the works perflectly.

This is now implemented by default on my distribution (obarun.org)

Best Regards.

Eric Vidal

windows binary

hi there,

I develop on windows and deploy on linux. It would be great to have a binary that I could use on Windows 10. This looks similar to xml starlet(http://xmlstar.sourceforge.net/) and I'd love to use it for JSON formatting and querying.

Please consider developing binaries for Windows 10. 64 bit versions would be preferable, but 32 bit will do.

Thank you very much,

[FreeBSD] Fails to compile with -DBG_CC

Since the latest version (1.76), toggling -DBG_CC will throw an error:

lib/Json.hpp:691:50: error: no member named 'ind' in '__Dbg_flow__'
                          if(DBG()(__Dbg_flow__::ind)) {        // dodge DBG's mutex dead-lock

lib/Json.hpp:695:65: error: no member named 'ind' in '__Dbg_flow__'
                                                  __Dbg_flow__::ind + 1, DBG().stamped(),

As the error suggests there's no member named ind in the __Dbg_flow__ class, but rather ind_ seen at dbg.hpp#L886 which is also a protected member. Either a new member could be exposed as public or to make ind_ public (although not ideal) โ€” simple fix nonetheless. Thanks for your time on this project, cheers!

Illegal usage of ofstream with nullptr as filename

In https://github.com/ldn-softdev/jtc/blob/master/jtc.cpp#L662-L663, an ofstream is initialized with a nullptr when no output filename is given. This is illegal, as this constructor of ofstream internally calls std::basic_filebuf::open(), which expects a pointer to a null-terminated string (see https://en.cppreference.com/w/cpp/io/basic_ofstream/basic_ofstream and https://en.cppreference.com/w/cpp/io/basic_filebuf/open).

This bug was found using Symbolic Execution techniques developed in the course of the SYMBIOSYS research project at COMSYS, RWTH Aachen University. This research is supported by the European Research Council (ERC) under the EU's Horizon 2020 Research and Innovation Programme grant agreement n. 647295 (SYMBIOSYS).

Performance degradation in the RE lexemes on big JSONs

for RE lexemes (<>R, <>L, <>D) performance is decaying exponentially, proportionally to the JSON size (search size). The same effect (exponential decay in performance) might be observed for <..>j lexeme and generally for any template-interpolation operations.

Compiling on debian stretch (9.9)

Hi,

With gcc:

gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

I had to add cstddef to lib/Json.hpp for ptrdiff_t:

diff --git a/lib/Json.hpp b/lib/Json.hpp
index 796126a..0fa6549 100644
--- a/lib/Json.hpp
+++ b/lib/Json.hpp
@@ -473,6 +473,7 @@
 #include <iomanip>              // std::setprecision
 #include <initializer_list>
 #include <regex>
+#include <cstddef>
 #include "extensions.hpp"
 #include "dbg.hpp"
 #include "Outable.hpp"

after that it failed with:

jtc.cpp: In instantiation of โ€˜Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)> [with auto:4 = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, Json::iterator&}]โ€™:
/usr/include/c++/6/type_traits:2481:26:   required by substitution of โ€˜template<class _Fn, class ... _Args> static std::__result_of_success<decltype (declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn = Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>&; _Args = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, Json::iterator&}]โ€™
/usr/include/c++/6/type_traits:2492:55:   required from โ€˜struct std::__result_of_impl<false, false, Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, Json::iterator&>โ€™
/usr/include/c++/6/type_traits:2496:12:   required from โ€˜class std::result_of<Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>&(const std::__cxx11::basic_string<char>&, Json::iterator&)>โ€™
/usr/include/c++/6/functional:1913:9:   required by substitution of โ€˜template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>; <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]โ€™
jtc.cpp:246:65:   required from here
jtc.cpp:107:97: error: cannot call member function โ€˜bool Jtc::shell_callback_(const string&, Json::iterator)โ€™ without object
 #define GLAMBDA(FUNC) [this](auto&&... arg) { return FUNC(std::forward<decltype(arg)>(arg)...); }
                                                                                                 ^
jtc.cpp:246:41: note: in expansion of macro โ€˜GLAMBDAโ€™
                          jinp_.callback(GLAMBDA(shell_callback_)).engage_callbacks();
                                         ^~~~~~~
jtc.cpp: In constructor โ€˜Jtc::Jtc(CommonResource&)โ€™:
jtc.cpp:246:65: error: no matching function for call to โ€˜Json::callback(Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>)โ€™
                          jinp_.callback(GLAMBDA(shell_callback_)).engage_callbacks();
                                                                 ^
In file included from jtc.cpp:9:0:
lib/Json.hpp:2306:25: note: candidate: Json& Json::callback(const string&, std::function<void(const Jnode&)>&&)
     Json &              callback(const std::string &lbl,        // plug-in label-callback
                         ^~~~~~~~
lib/Json.hpp:2306:25: note:   candidate expects 2 arguments, 1 provided
lib/Json.hpp:2311:25: note: candidate: Json& Json::callback(Json::iterator, std::function<void(const Jnode&)>&&)
     Json &              callback(iterator itr,                  // plug-in itr-callback (from walk)
                         ^~~~~~~~
lib/Json.hpp:2311:25: note:   candidate expects 2 arguments, 1 provided
lib/Json.hpp:2317:25: note: candidate: Json& Json::callback(Json::uws_callback&&)
     Json &              callback(uws_callback &&cb) {           // plug-in callback for u-lexeme
                         ^~~~~~~~
lib/Json.hpp:2317:25: note:   no known conversion for argument 1 from โ€˜Jtc::Jtc(CommonResource&)::<lambda(auto:4&& ...)>โ€™ to โ€˜Json::uws_callback&& {aka std::function<bool(const std::__cxx11::basic_string<char>&, Json::iterator&)>&&}โ€™

... and fixing that is beyond me.

Doesn't compile on Arch (Garuda)

uname -a
Linux rog-strix 5.19.0-rc7-1-mainline #1 SMP PREEMPT_DYNAMIC Mon, 18 Jul 2022 10:35:36 +0000 x86_64 GNU/Linux
lsb_release -a
LSB Version:	n/a
Distributor ID:	Garuda
Description:	Garuda Linux
Release:	Soaring
Codename:	Talon

Let me know how I can provide error log if this can be helpful. The "jtm" utility compiled & works OK on Arch.

uncaught exception in stoul

There's a rare exception that might occurs when doing some walks with RE, e.g.:

bash $ <ab.json jtc -w'<street address>l:<^\d>R:[-2]' 
libc++abi.dylib: terminating with uncaught exception of type std::invalid_argument: stoul: no conversion
Abort trap: 6
bash $ 

the same would not occur if lexemes wasn't iterative, or next offset would be different, e.g.:

bash $ <ab.json jtc -w'<street address>l<^\d>R[-2]' -r
{ "address": { "city": "New York", "postal code": 10012, "state": "NY", "street address": "599 Lafayette St" }, "age": 25, "children": [ "Olivia" ], "name": "John", "phone": [ { "number": "112-555-1234", "type": "mobile" }, { "number": "113-123-2368", "type": "mobile" } ], "spouse": "Martha" }
bash $ 
bash $ <ab.json /jtc -w'<street address>l:<^\d>R:[-1]' -r
{ "city": "New York", "postal code": 10012, "state": "NY", "street address": "599 Lafayette St" }
{ "city": "Seattle", "postal code": 98104, "state": "WA", "street address": "5423 Madison St" }
{ "city": "Denver", "postal code": 80206, "state": "CO", "street address": "6213 E Colfax Ave" }
bash $ 

[BUILD:1.74]Fail

Hi there,

I try to compile the 1.74 tag with your recommendations:
c++ -o jtc -Wall -std=c++14 -Ofast jtc.cpp

it fail. i use gcc version 9.1.0.
complete log cannot be possible due of the github limitations, but it should be relevant for you anyway. If not i can send you the complete log by email.

In file included from lib/Json.hpp:477, from jtc.cpp:9: lib/dbg.hpp: In constructor โ€˜Debug::Debug(X&)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:385:41: note: in expansion of macro โ€˜DBGโ€™ 385 | template<class X> Debug(X &x) { x.DBG().severity(x); }; | ^~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:385:41: note: in expansion of macro โ€˜DBGโ€™ 385 | template<class X> Debug(X &x) { x.DBG().severity(x); }; | ^~~ lib/dbg.hpp:385:46: error: expected primary-expression before โ€˜.โ€™ token 385 | template<class X> Debug(X &x) { x.DBG().severity(x); }; | ^ lib/dbg.hpp: In member function โ€˜typename std::enable_if<__is_dbg_propagatable__<Subclass>(0), void>::type Debug::severity(Subclass&, Rest&& ...)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:422:32: note: in expansion of macro โ€˜DBGโ€™ 422 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:422:32: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 422 | if(&s.DBG() != this) // updating foreign debuggable | ~ ^ | ) lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:422:32: note: in expansion of macro โ€˜DBGโ€™ 422 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:422:38: error: expected primary-expression before โ€˜!=โ€™ token 422 | if(&s.DBG() != this) // updating foreign debuggable | ^~ lib/dbg.hpp:423:34: error: expected primary-expression before โ€˜.โ€™ token 423 | s.DBG().severity(severity()+1); // compel s' severity to mine | ^ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:424:48: note: in expansion of macro โ€˜DBGโ€™ 424 | s.__dbg_propagate__(s.DBG().severity()); // propagate down s' members | ^~~ lib/dbg.hpp:424:53: error: expected primary-expression before โ€˜.โ€™ token 424 | s.__dbg_propagate__(s.DBG().severity()); // propagate down s' members | ^ lib/dbg.hpp: In member function โ€˜typename std::enable_if<((! __is_dbg_propagatable__<Subclass>(0)) && std::is_class<_Tp>::value), void>::type Debug::severity(Subclass&, Rest&& ...)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:431:32: note: in expansion of macro โ€˜DBGโ€™ 431 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:431:32: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 431 | if(&s.DBG() != this) // updating foreign debuggable | ~ ^ | ) lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:431:32: note: in expansion of macro โ€˜DBGโ€™ 431 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:431:38: error: expected primary-expression before โ€˜!=โ€™ token 431 | if(&s.DBG() != this) // updating foreign debuggable | ^~ lib/dbg.hpp:432:34: error: expected primary-expression before โ€˜.โ€™ token 432 | s.DBG().severity(severity()+1); // compel s' severity to mine | ^ lib/dbg.hpp: In member function โ€˜typename std::enable_if<__is_dbg_propagatable__<Subclass>(0), void>::type Debug::increment(Subclass&, Rest&& ...)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:444:32: note: in expansion of macro โ€˜DBGโ€™ 444 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:444:32: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 444 | if(&s.DBG() != this) // updating foreign debuggable | ~ ^ | ) lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:444:32: note: in expansion of macro โ€˜DBGโ€™ 444 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:444:38: error: expected primary-expression before โ€˜!=โ€™ token 444 | if(&s.DBG() != this) // updating foreign debuggable | ^~ lib/dbg.hpp:445:34: error: expected primary-expression before โ€˜.โ€™ token 445 | s.DBG().severity(severity()+1); // compel s' severity to mine | ^ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:446:48: note: in expansion of macro โ€˜DBGโ€™ 446 | s.__dbg_propagate__(s.DBG().severity()); // propagate down s' members | ^~~ lib/dbg.hpp:446:53: error: expected primary-expression before โ€˜.โ€™ token 446 | s.__dbg_propagate__(s.DBG().severity()); // propagate down s' members | ^ lib/dbg.hpp: In member function โ€˜typename std::enable_if<((! __is_dbg_propagatable__<Subclass>(0)) && std::is_class<_Tp>::value), void>::type Debug::increment(Subclass&, Rest&& ...)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:453:32: note: in expansion of macro โ€˜DBGโ€™ 453 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:453:32: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 453 | if(&s.DBG() != this) // updating foreign debuggable | ~ ^ | ) lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:453:32: note: in expansion of macro โ€˜DBGโ€™ 453 | if(&s.DBG() != this) // updating foreign debuggable | ^~~ lib/dbg.hpp:453:38: error: expected primary-expression before โ€˜!=โ€™ token 453 | if(&s.DBG() != this) // updating foreign debuggable | ^~ lib/dbg.hpp:454:34: error: expected primary-expression before โ€˜.โ€™ token 454 | s.DBG().severity(severity()+1); // compel s' severity to mine | ^ lib/Streamstr.hpp: In member function โ€˜void Streamstr::__dbg_propagate__(int)โ€™: lib/dbg.hpp:310:38: error: expected primary-expression before โ€˜.โ€™ token 310 | #define __DEBUGGABLE_PROPAGATE__(X) X.__dbg__.severity(sev + 1, X); | ^ lib/macrolib.h:91:30: note: in expansion of macro โ€˜__DEBUGGABLE_PROPAGATE__โ€™ 91 | #define _XM_01(__macro__, x) __macro__(x) | ^~~~~~~~~ lib/macrolib.h:57:33: note: in expansion of macro โ€˜_XM_01โ€™ 57 | N, ...) N | ^ lib/macrolib.h:211:5: note: in expansion of macro โ€˜__XMACRO_TO_ARGS__โ€™ 211 | __XMACRO_TO_ARGS__(macro_args) | ^~~~~~~~~~~~~~~~~~ lib/macrolib.h:230:5: note: in expansion of macro โ€˜__MACRO_TO_ARGS__โ€™ 230 | __MACRO_TO_ARGS__(macro, ##macro_args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:316:16: note: in expansion of macro โ€˜MACRO_TO_ARGSโ€™ 316 | { MACRO_TO_ARGS(__DEBUGGABLE_PROPAGATE__, ##args) } | ^~~~~~~~~~~~~ lib/dbg.hpp:309:39: note: in expansion of macro โ€˜__DEBUGGABLE_true__โ€™ 309 | #define __DEBUGGABLE_IF__(X, args...) __DEBUGGABLE_##X##__(args) | ^~~~~~~~~~~~~ lib/dbg.hpp:308:40: note: in expansion of macro โ€˜__DEBUGGABLE_IF__โ€™ 308 | #define __DEBUGGABLE_ARG__(X, args...) __DEBUGGABLE_IF__(X, args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:307:29: note: in expansion of macro โ€˜__DEBUGGABLE_ARG__โ€™ 307 | #define DEBUGGABLE(args...) __DEBUGGABLE_ARG__(IF_ARGS(args), args) | ^~~~~~~~~~~~~~~~~~ lib/Streamstr.hpp:122:5: note: in expansion of macro โ€˜DEBUGGABLEโ€™ 122 | DEBUGGABLE() | ^~~~~~~~~~ lib/dbg.hpp:310:66: error: expected primary-expression before โ€˜)โ€™ token 310 | #define __DEBUGGABLE_PROPAGATE__(X) X.__dbg__.severity(sev + 1, X); | ^ lib/macrolib.h:91:30: note: in expansion of macro โ€˜__DEBUGGABLE_PROPAGATE__โ€™ 91 | #define _XM_01(__macro__, x) __macro__(x) | ^~~~~~~~~ lib/macrolib.h:57:33: note: in expansion of macro โ€˜_XM_01โ€™ 57 | N, ...) N | ^ lib/macrolib.h:211:5: note: in expansion of macro โ€˜__XMACRO_TO_ARGS__โ€™ 211 | __XMACRO_TO_ARGS__(macro_args) | ^~~~~~~~~~~~~~~~~~ lib/macrolib.h:230:5: note: in expansion of macro โ€˜__MACRO_TO_ARGS__โ€™ 230 | __MACRO_TO_ARGS__(macro, ##macro_args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:316:16: note: in expansion of macro โ€˜MACRO_TO_ARGSโ€™ 316 | { MACRO_TO_ARGS(__DEBUGGABLE_PROPAGATE__, ##args) } | ^~~~~~~~~~~~~ lib/dbg.hpp:309:39: note: in expansion of macro โ€˜__DEBUGGABLE_true__โ€™ 309 | #define __DEBUGGABLE_IF__(X, args...) __DEBUGGABLE_##X##__(args) | ^~~~~~~~~~~~~ lib/dbg.hpp:308:40: note: in expansion of macro โ€˜__DEBUGGABLE_IF__โ€™ 308 | #define __DEBUGGABLE_ARG__(X, args...) __DEBUGGABLE_IF__(X, args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:307:29: note: in expansion of macro โ€˜__DEBUGGABLE_ARG__โ€™ 307 | #define DEBUGGABLE(args...) __DEBUGGABLE_ARG__(IF_ARGS(args), args) | ^~~~~~~~~~~~~~~~~~ lib/Streamstr.hpp:122:5: note: in expansion of macro โ€˜DEBUGGABLEโ€™ 122 | DEBUGGABLE() | ^~~~~~~~~~ lib/Streamstr.hpp: In member function โ€˜void Streamstr::ss_init_(Streamstr::const_iterator&)โ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:225:9: note: in expansion of macro โ€˜DOUTโ€™ 225 | DBG(0) DOUT() << "initializing: " << ENUMS(Streamstr::Strmod, mod_) << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:262:9: note: in expansion of macro โ€˜DOUTโ€™ 262 | DBG(0) DOUT() << "read file: " << (is_buffered_cin()? "<stdin>":filename()) | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:262:9: note: in expansion of macro โ€˜DOUTโ€™ 262 | DBG(0) DOUT() << "read file: " << (is_buffered_cin()? "<stdin>":filename()) | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:262:9: note: in expansion of macro โ€˜DOUTโ€™ 262 | DBG(0) DOUT() << "read file: " << (is_buffered_cin()? "<stdin>":filename()) | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:262:9: note: in expansion of macro โ€˜DOUTโ€™ 262 | DBG(0) DOUT() << "read file: " << (is_buffered_cin()? "<stdin>":filename()) | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Streamstr.hpp:262:9: note: in expansion of macro โ€˜DOUTโ€™ 262 | DBG(0) DOUT() << "read file: " << (is_buffered_cin()? "<stdin>":filename()) | ^~~~ lib/Json.hpp: In member function โ€˜Json& Json::parse(std::string, Json::ParseTrailing)โ€™: lib/dbg.hpp:332:15: error: no match for call to โ€˜(Debug) ()โ€™ 332 | if( __dbg__(X) ) \ | ^ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/Json.hpp:1462:26: note: in expansion of macro โ€˜DBGโ€™ 1462 | DBG().severity(tmp); | ^~~ lib/dbg.hpp:509:6: note: candidate: โ€˜bool Debug::operator()(short int, const char*) constโ€™ 509 | bool Debug::operator()(short d, const char * fn) const { | ^~~~~ lib/dbg.hpp:509:6: note: candidate expects 2 arguments, 0 provided lib/dbg.hpp:334:20: error: expected primary-expression before โ€˜,โ€™ token 334 | if( __dbg__(X, __func__) ); // now print the prompt | ^ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/Json.hpp:1462:26: note: in expansion of macro โ€˜DBGโ€™ 1462 | DBG().severity(tmp); | ^~~ In file included from jtc.cpp:9: lib/Json.hpp:1462:31: error: expected primary-expression before โ€˜.โ€™ token 1462 | DBG().severity(tmp); | ^ In file included from lib/Json.hpp:477, from jtc.cpp:9: lib/Json.hpp: In member function โ€˜void Json::__dbg_propagate__(int)โ€™: lib/dbg.hpp:310:38: error: expected primary-expression before โ€˜.โ€™ token 310 | #define __DEBUGGABLE_PROPAGATE__(X) X.__dbg__.severity(sev + 1, X); | ^ lib/macrolib.h:91:30: note: in expansion of macro โ€˜__DEBUGGABLE_PROPAGATE__โ€™ 91 | #define _XM_01(__macro__, x) __macro__(x) | ^~~~~~~~~ lib/macrolib.h:57:33: note: in expansion of macro โ€˜_XM_01โ€™ 57 | N, ...) N | ^ lib/macrolib.h:211:5: note: in expansion of macro โ€˜__XMACRO_TO_ARGS__โ€™ 211 | __XMACRO_TO_ARGS__(macro_args) | ^~~~~~~~~~~~~~~~~~ lib/macrolib.h:230:5: note: in expansion of macro โ€˜__MACRO_TO_ARGS__โ€™ 230 | __MACRO_TO_ARGS__(macro, ##macro_args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:316:16: note: in expansion of macro โ€˜MACRO_TO_ARGSโ€™ 316 | { MACRO_TO_ARGS(__DEBUGGABLE_PROPAGATE__, ##args) } | ^~~~~~~~~~~~~ lib/dbg.hpp:309:39: note: in expansion of macro โ€˜__DEBUGGABLE_true__โ€™ 309 | #define __DEBUGGABLE_IF__(X, args...) __DEBUGGABLE_##X##__(args) | ^~~~~~~~~~~~~ lib/dbg.hpp:308:40: note: in expansion of macro โ€˜__DEBUGGABLE_IF__โ€™ 308 | #define __DEBUGGABLE_ARG__(X, args...) __DEBUGGABLE_IF__(X, args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:307:29: note: in expansion of macro โ€˜__DEBUGGABLE_ARG__โ€™ 307 | #define DEBUGGABLE(args...) __DEBUGGABLE_ARG__(IF_ARGS(args), args) | ^~~~~~~~~~~~~~~~~~ lib/Json.hpp:1562:5: note: in expansion of macro โ€˜DEBUGGABLEโ€™ 1562 | DEBUGGABLE() | ^~~~~~~~~~ lib/dbg.hpp:310:66: error: expected primary-expression before โ€˜)โ€™ token 310 | #define __DEBUGGABLE_PROPAGATE__(X) X.__dbg__.severity(sev + 1, X); | ^ lib/macrolib.h:91:30: note: in expansion of macro โ€˜__DEBUGGABLE_PROPAGATE__โ€™ 91 | #define _XM_01(__macro__, x) __macro__(x) | ^~~~~~~~~ lib/macrolib.h:57:33: note: in expansion of macro โ€˜_XM_01โ€™ 57 | N, ...) N | ^ lib/macrolib.h:211:5: note: in expansion of macro โ€˜__XMACRO_TO_ARGS__โ€™ 211 | __XMACRO_TO_ARGS__(macro_args) | ^~~~~~~~~~~~~~~~~~ lib/macrolib.h:230:5: note: in expansion of macro โ€˜__MACRO_TO_ARGS__โ€™ 230 | __MACRO_TO_ARGS__(macro, ##macro_args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:316:16: note: in expansion of macro โ€˜MACRO_TO_ARGSโ€™ 316 | { MACRO_TO_ARGS(__DEBUGGABLE_PROPAGATE__, ##args) } | ^~~~~~~~~~~~~ lib/dbg.hpp:309:39: note: in expansion of macro โ€˜__DEBUGGABLE_true__โ€™ 309 | #define __DEBUGGABLE_IF__(X, args...) __DEBUGGABLE_##X##__(args) | ^~~~~~~~~~~~~ lib/dbg.hpp:308:40: note: in expansion of macro โ€˜__DEBUGGABLE_IF__โ€™ 308 | #define __DEBUGGABLE_ARG__(X, args...) __DEBUGGABLE_IF__(X, args) | ^~~~~~~~~~~~~~~~~ lib/dbg.hpp:307:29: note: in expansion of macro โ€˜__DEBUGGABLE_ARG__โ€™ 307 | #define DEBUGGABLE(args...) __DEBUGGABLE_ARG__(IF_ARGS(args), args) | ^~~~~~~~~~~~~~~~~~ lib/Json.hpp:1562:5: note: in expansion of macro โ€˜DEBUGGABLEโ€™ 1562 | DEBUGGABLE() | ^~~~~~~~~~ lib/Json.hpp: In member function โ€˜Json& Json::parse(Streamstr::const_iterator&, Json::ParseTrailing)โ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2365:9: note: in expansion of macro โ€˜DOUTโ€™ 2365 | DBG(1) DOUT() << "finished parsing json" << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::parse_(Jnode&, Streamstr::const_iterator&)โ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2405:3: note: in expansion of macro โ€˜DOUTโ€™ 2405 | DOUT() << (jsp.is_streamed()? std::string(""): pfx + " ->") | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2410:11: note: in expansion of macro โ€˜DOUTโ€™ 2410 | DBG(5) { DOUT() << "classified as: " << ENUMS(Jnode::Jtype, node.type()) << std::endl; } | ^~~~ lib/Json.hpp: In static member function โ€˜static Jnode::Jtype Json::json_number_definition(std::__cxx11::basic_string<char>::const_iterator&)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/Json.hpp:2544:5: note: in expansion of macro โ€˜DBGโ€™ 2544 | ss.DBG().severity(NDBG); | ^~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/Json.hpp:2544:5: note: in expansion of macro โ€˜DBGโ€™ 2544 | ss.DBG().severity(NDBG); | ^~~ In file included from jtc.cpp:9: lib/Json.hpp:2544:10: error: expected primary-expression before โ€˜.โ€™ token 2544 | ss.DBG().severity(NDBG); | ^ In file included from lib/Json.hpp:477, from jtc.cpp:9: lib/Json.hpp: In member function โ€˜Json::iterator Json::walk(const string&, Json::CacheState)โ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2698:9: note: in expansion of macro โ€˜DOUTโ€™ 2698 | DBG(0) DOUT() << "walk string: '" << wstr << "'" << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2704:9: note: in expansion of macro โ€˜DOUTโ€™ 2704 | DBG(0) DOUT() << "dump of completed lexemes:" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2704:9: note: in expansion of macro โ€˜DOUTโ€™ 2704 | DBG(0) DOUT() << "dump of completed lexemes:" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2704:9: note: in expansion of macro โ€˜DOUTโ€™ 2704 | DBG(0) DOUT() << "dump of completed lexemes:" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2704:9: note: in expansion of macro โ€˜DOUTโ€™ 2704 | DBG(0) DOUT() << "dump of completed lexemes:" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2704:9: note: in expansion of macro โ€˜DOUTโ€™ 2704 | DBG(0) DOUT() << "dump of completed lexemes:" << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2706:10: note: in expansion of macro โ€˜DOUTโ€™ 2706 | DBG(0) DOUT() << '[' << i << "]: " << it.walk_path_()[i] << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2706:10: note: in expansion of macro โ€˜DOUTโ€™ 2706 | DBG(0) DOUT() << '[' << i << "]: " << it.walk_path_()[i] << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2706:10: note: in expansion of macro โ€˜DOUTโ€™ 2706 | DBG(0) DOUT() << '[' << i << "]: " << it.walk_path_()[i] << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2706:10: note: in expansion of macro โ€˜DOUTโ€™ 2706 | DBG(0) DOUT() << '[' << i << "]: " << it.walk_path_()[i] << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2706:10: note: in expansion of macro โ€˜DOUTโ€™ 2706 | DBG(0) DOUT() << '[' << i << "]: " << it.walk_path_()[i] << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2710:10: note: in expansion of macro โ€˜DOUTโ€™ 2710 | DBG(0) DOUT() << "invalidated search cache" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2710:10: note: in expansion of macro โ€˜DOUTโ€™ 2710 | DBG(0) DOUT() << "invalidated search cache" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2710:10: note: in expansion of macro โ€˜DOUTโ€™ 2710 | DBG(0) DOUT() << "invalidated search cache" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2710:10: note: in expansion of macro โ€˜DOUTโ€™ 2710 | DBG(0) DOUT() << "invalidated search cache" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2710:10: note: in expansion of macro โ€˜DOUTโ€™ 2710 | DBG(0) DOUT() << "invalidated search cache" << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2715:10: note: in expansion of macro โ€˜DOUTโ€™ 2715 | DBG(0) DOUT() << "initial walk: successful match" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2715:10: note: in expansion of macro โ€˜DOUTโ€™ 2715 | DBG(0) DOUT() << "initial walk: successful match" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2715:10: note: in expansion of macro โ€˜DOUTโ€™ 2715 | DBG(0) DOUT() << "initial walk: successful match" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2715:10: note: in expansion of macro โ€˜DOUTโ€™ 2715 | DBG(0) DOUT() << "initial walk: successful match" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2715:10: note: in expansion of macro โ€˜DOUTโ€™ 2715 | DBG(0) DOUT() << "initial walk: successful match" << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2720:9: note: in expansion of macro โ€˜DOUTโ€™ 2720 | DBG(0) DOUT() << "initial walk requires iteration" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2720:9: note: in expansion of macro โ€˜DOUTโ€™ 2720 | DBG(0) DOUT() << "initial walk requires iteration" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2720:9: note: in expansion of macro โ€˜DOUTโ€™ 2720 | DBG(0) DOUT() << "initial walk requires iteration" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2720:9: note: in expansion of macro โ€˜DOUTโ€™ 2720 | DBG(0) DOUT() << "initial walk requires iteration" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2720:9: note: in expansion of macro โ€˜DOUTโ€™ 2720 | DBG(0) DOUT() << "initial walk requires iteration" << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::parse_lexemes_(const string&, Json::iterator&) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2781:4: note: in expansion of macro โ€˜DOUTโ€™ 2781 | DOUT() << "walked string: " << wstr << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2782:4: note: in expansion of macro โ€˜DOUTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2782:4: note: in expansion of macro โ€˜DOUTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2782:4: note: in expansion of macro โ€˜DOUTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2782:4: note: in expansion of macro โ€˜DOUTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2782:4: note: in expansion of macro โ€˜DOUTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~ lib/dbg.hpp:364:28: error: expected primary-expression before โ€˜.โ€™ token 364 | #define DBG_PROMPT(X) DBG().prompt(__func__, X+1) | ^ lib/Json.hpp:2782:14: note: in expansion of macro โ€˜DBG_PROMPTโ€™ 2782 | DOUT() << DBG_PROMPT(1) << "parsing here: " | ^~~~~~~~~~ lib/Json.hpp: In member function โ€˜std::string Json::extract_lexeme_(std::__cxx11::basic_string<char>::const_iterator&, char) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2831:9: note: in expansion of macro โ€˜DOUTโ€™ 2831 | DBG(1) DOUT() << "parsed lexeme: " << lexeme << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::parse_suffix_(std::__cxx11::basic_string<char>::const_iterator&, Json::iterator&, Json::vec_str&) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2866:10: note: in expansion of macro โ€˜DOUTโ€™ 2866 | DBG(1) DOUT() << "search type sfx: " << ENUMS(Jsearch, sfx) << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜std::__cxx11::basic_regex<char>::flag_type Json::parse_RE_flags_(std::string&) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2909:12: note: in expansion of macro โ€˜DOUTโ€™ 2909 | DBG(1) DOUT() << "RE flag: '" << c_flg[1] << "' is set" << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::parse_quantifier_(std::__cxx11::basic_string<char>::const_iterator&, Json::iterator&) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:2955:9: note: in expansion of macro โ€˜DOUTโ€™ 2955 | DBG(2) DOUT() << "offset / range: " << back_ws.ofst() << " / " << back_ws.range() << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::parse_subscript_type_(Json::WalkStep&) constโ€™: lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3094:9: note: in expansion of macro โ€˜DOUTโ€™ 3094 | DBG(2) DOUT() << "partial: " << ws << std::endl; | ^~~~ lib/dbg.hpp:356:29: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3109:9: note: in expansion of macro โ€˜DOUTโ€™ 3109 | DBG(2) DOUT() << "offset / range: " << ws.ofst() << " / " << ws.range() << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3109:9: note: in expansion of macro โ€˜DOUTโ€™ 3109 | DBG(2) DOUT() << "offset / range: " << ws.ofst() << " / " << ws.range() << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3109:9: note: in expansion of macro โ€˜DOUTโ€™ 3109 | DBG(2) DOUT() << "offset / range: " << ws.ofst() << " / " << ws.range() << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3109:9: note: in expansion of macro โ€˜DOUTโ€™ 3109 | DBG(2) DOUT() << "offset / range: " << ws.ofst() << " / " << ws.range() << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3109:9: note: in expansion of macro โ€˜DOUTโ€™ 3109 | DBG(2) DOUT() << "offset / range: " << ws.ofst() << " / " << ws.range() << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜bool Json::iterator::incremented()โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3165:18: note: in expansion of macro โ€˜DOUTโ€™ 3165 | DBG(json(), 2) DOUT(json()) << "path is out of iterations / non-iterable" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3165:18: note: in expansion of macro โ€˜DOUTโ€™ 3165 | DBG(json(), 2) DOUT(json()) << "path is out of iterations / non-iterable" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3165:18: note: in expansion of macro โ€˜DOUTโ€™ 3165 | DBG(json(), 2) DOUT(json()) << "path is out of iterations / non-iterable" << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3165:18: note: in expansion of macro โ€˜DOUTโ€™ 3165 | DBG(json(), 2) DOUT(json()) << "path is out of iterations / non-iterable" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3165:18: note: in expansion of macro โ€˜DOUTโ€™ 3165 | DBG(json(), 2) DOUT(json()) << "path is out of iterations / non-iterable" << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜size_t Json::iterator::walk_()โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3210:33: note: in expansion of macro โ€˜DOUTโ€™ 3210 | DBG(json(), 2) show_built_pv_(DOUT(json())); | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3210:33: note: in expansion of macro โ€˜DOUTโ€™ 3210 | DBG(json(), 2) show_built_pv_(DOUT(json())); | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3210:33: note: in expansion of macro โ€˜DOUTโ€™ 3210 | DBG(json(), 2) show_built_pv_(DOUT(json())); | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3210:33: note: in expansion of macro โ€˜DOUTโ€™ 3210 | DBG(json(), 2) show_built_pv_(DOUT(json())); | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3210:33: note: in expansion of macro โ€˜DOUTโ€™ 3210 | DBG(json(), 2) show_built_pv_(DOUT(json())); | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3219:5: note: in expansion of macro โ€˜DOUTโ€™ 3219 | DOUT(json()) << ENUMS(Json::Jsearch, Json::Forward_itr) << " at [" << i << "], " | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3219:5: note: in expansion of macro โ€˜DOUTโ€™ 3219 | DOUT(json()) << ENUMS(Json::Jsearch, Json::Forward_itr) << " at [" << i << "], " | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3219:5: note: in expansion of macro โ€˜DOUTโ€™ 3219 | DOUT(json()) << ENUMS(Json::Jsearch, Json::Forward_itr) << " at [" << i << "], " | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3219:5: note: in expansion of macro โ€˜DOUTโ€™ 3219 | DOUT(json()) << ENUMS(Json::Jsearch, Json::Forward_itr) << " at [" << i << "], " | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:19: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:19: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:19: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:19: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:19: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:77: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:77: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:77: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3230:77: note: in expansion of macro โ€˜DOUTโ€™ 3230 | DBG(json(), 2) { DOUT(json()) << "finished walking: with "; show_built_pv_(DOUT(json())); } | ^~~~ lib/Json.hpp: In member function โ€˜void Json::iterator::walk_step_(size_t, Jnode*)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3248:17: note: in expansion of macro โ€˜DOUTโ€™ 3248 | DBG(json(), 3) DOUT(json()) << "walking step: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3248:17: note: in expansion of macro โ€˜DOUTโ€™ 3248 | DBG(json(), 3) DOUT(json()) << "walking step: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3248:17: note: in expansion of macro โ€˜DOUTโ€™ 3248 | DBG(json(), 3) DOUT(json()) << "walking step: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3248:17: note: in expansion of macro โ€˜DOUTโ€™ 3248 | DBG(json(), 3) DOUT(json()) << "walking step: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3248:17: note: in expansion of macro โ€˜DOUTโ€™ 3248 | DBG(json(), 3) DOUT(json()) << "walking step: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3257:24: note: in expansion of macro โ€˜DOUTโ€™ 3257 | DBG(json(), 3) DOUT(json()) << "erased namespace: " | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3257:24: note: in expansion of macro โ€˜DOUTโ€™ 3257 | DBG(json(), 3) DOUT(json()) << "erased namespace: " | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3257:24: note: in expansion of macro โ€˜DOUTโ€™ 3257 | DBG(json(), 3) DOUT(json()) << "erased namespace: " | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3257:24: note: in expansion of macro โ€˜DOUTโ€™ 3257 | DBG(json(), 3) DOUT(json()) << "erased namespace: " | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3263:24: note: in expansion of macro โ€˜DOUTโ€™ 3263 | DBG(json(), 3) DOUT(json()) << "recorded fail-safe: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3263:24: note: in expansion of macro โ€˜DOUTโ€™ 3263 | DBG(json(), 3) DOUT(json()) << "recorded fail-safe: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3263:24: note: in expansion of macro โ€˜DOUTโ€™ 3263 | DBG(json(), 3) DOUT(json()) << "recorded fail-safe: [" << wsi << "]" << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3263:24: note: in expansion of macro โ€˜DOUTโ€™ 3263 | DBG(json(), 3) DOUT(json()) << "recorded fail-safe: [" << wsi << "]" << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜void Json::iterator::walk_numeric_offset_(size_t, Jnode*)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3320:17: note: in expansion of macro โ€˜DOUTโ€™ 3320 | DBG(json(), 1) DOUT(json()) << "found cached idx " << offset << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3320:17: note: in expansion of macro โ€˜DOUTโ€™ 3320 | DBG(json(), 1) DOUT(json()) << "found cached idx " << offset << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3320:17: note: in expansion of macro โ€˜DOUTโ€™ 3320 | DBG(json(), 1) DOUT(json()) << "found cached idx " << offset << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3320:17: note: in expansion of macro โ€˜DOUTโ€™ 3320 | DBG(json(), 1) DOUT(json()) << "found cached idx " << offset << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3320:17: note: in expansion of macro โ€˜DOUTโ€™ 3320 | DBG(json(), 1) DOUT(json()) << "found cached idx " << offset << std::endl; | ^~~~ lib/Json.hpp: In member function โ€˜Json::iter_jn Json::iterator::build_cache_(Jnode*, size_t)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3336:18: note: in expansion of macro โ€˜DOUTโ€™ 3336 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3336:18: note: in expansion of macro โ€˜DOUTโ€™ 3336 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3336:18: note: in expansion of macro โ€˜DOUTโ€™ 3336 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3336:18: note: in expansion of macro โ€˜DOUTโ€™ 3336 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3336:18: note: in expansion of macro โ€˜DOUTโ€™ 3336 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3356:4: note: in expansion of macro โ€˜DOUTโ€™ 3356 | DOUT(json()) << "built cache size: " << found_cache->VALUE.front().pv.size() | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3356:4: note: in expansion of macro โ€˜DOUTโ€™ 3356 | DOUT(json()) << "built cache size: " << found_cache->VALUE.front().pv.size() | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3356:4: note: in expansion of macro โ€˜DOUTโ€™ 3356 | DOUT(json()) << "built cache size: " << found_cache->VALUE.front().pv.size() | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3356:4: note: in expansion of macro โ€˜DOUTโ€™ 3356 | DOUT(json()) << "built cache size: " << found_cache->VALUE.front().pv.size() | ^~~~ lib/Json.hpp: In member function โ€˜void Json::iterator::walk_search_(size_t, Jnode*)โ€™: lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3420:18: note: in expansion of macro โ€˜DOUTโ€™ 3420 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3420:18: note: in expansion of macro โ€˜DOUTโ€™ 3420 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3420:18: note: in expansion of macro โ€˜DOUTโ€™ 3420 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3420:18: note: in expansion of macro โ€˜DOUTโ€™ 3420 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3420:18: note: in expansion of macro โ€˜DOUTโ€™ 3420 | DBG(json(), 1) DOUT(json()) << "building cache for [" << wsi << "] " << skey << std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3425:4: note: in expansion of macro โ€˜DOUTโ€™ 3425 | DOUT(json()) << "built cache size: " << found_cache->VALUE.size() << ", cache status: " | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3425:4: note: in expansion of macro โ€˜DOUTโ€™ 3425 | DOUT(json()) << "built cache size: " << found_cache->VALUE.size() << ", cache status: " | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3425:4: note: in expansion of macro โ€˜DOUTโ€™ 3425 | DOUT(json()) << "built cache size: " << found_cache->VALUE.size() << ", cache status: " | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3425:4: note: in expansion of macro โ€˜DOUTโ€™ 3425 | DOUT(json()) << "built cache size: " << found_cache->VALUE.size() << ", cache status: " | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3431:18: note: in expansion of macro โ€˜DOUTโ€™ 3431 | DBG(json(), 1) DOUT(json()) << "no cached instance found"<< std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected โ€˜)โ€™ before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3431:18: note: in expansion of macro โ€˜DOUTโ€™ 3431 | DBG(json(), 1) DOUT(json()) << "no cached instance found"<< std::endl; | ^~~~ lib/dbg.hpp:356:27: note: to match this โ€˜(โ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3431:18: note: in expansion of macro โ€˜DOUTโ€™ 3431 | DBG(json(), 1) DOUT(json()) << "no cached instance found"<< std::endl; | ^~~~ lib/dbg.hpp:333:63: error: โ€˜mgardโ€™ was not declared in this scope 333 | for(std::unique_lock<std::mutex> mgard(__dbg__.mutex()); mgard.owns_lock(); mgard.unlock()) \ | ^~~~~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4 | ^~~~ lib/dbg.hpp:341:5: note: in expansion of macro โ€˜__DBG_4TH_ARG__โ€™ 341 | __DBG_4TH_ARG__(dummy, ##args, __DBG_2_ARG__, __DBG_1_ARG__, __DBG_0_ARG__) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:342:22: note: in expansion of macro โ€˜__DBG_CHOOSER__โ€™ 342 | #define DBG(args...) __DBG_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~ lib/dbg.hpp:356:30: note: in expansion of macro โ€˜DBGโ€™ 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^~~ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3431:18: note: in expansion of macro โ€˜DOUTโ€™ 3431 | DBG(json(), 1) DOUT(json()) << "no cached instance found"<< std::endl; | ^~~~ lib/dbg.hpp:356:35: error: expected primary-expression before โ€˜.โ€™ token 356 | #define __DOUT_1_ARG__(X) (X.DBG().dout()) | ^ lib/dbg.hpp:357:49: note: in expansion of macro โ€˜__DOUT_1_ARG__โ€™ 357 | #define __DOUT_3RD_ARG__(arg1, arg2, arg3, ...) arg3 | ^~~~ lib/dbg.hpp:359:5: note: in expansion of macro โ€˜__DOUT_3RD_ARG__โ€™ 359 | __DOUT_3RD_ARG__(dummy, ##args, __DOUT_1_ARG__, __DOUT_0_ARG__) | ^~~~~~~~~~~~~~~~ lib/dbg.hpp:360:23: note: in expansion of macro โ€˜__DOUT_CHOOSER__โ€™ 360 | #define DOUT(args...) __DOUT_CHOOSER__(args)(args) | ^~~~~~~~~~~~~~~~ lib/Json.hpp:3431:18: note: in expansion of macro โ€˜DOUTโ€™ 3431 | DBG(json(), 1) DOUT(json()) << "no cached instance found"<< std::endl; | ^~~~ lib/dbg.hpp:332:2: error: expected unqualified-id before โ€˜ifโ€™ 332 | if( __dbg__(X) ) \ | ^~ lib/dbg.hpp:339:54: note: in expansion of macro โ€˜__DBG_1_ARG__โ€™ 339 | #define __DBG_4TH_ARG__(arg1, arg2, arg3, arg4, ...) arg4

Best Regards

[not really an issue] jtc is available in Fedora's repositories

Hi @ldn-softdev, I've packaged jtc for Fedora and submitted it to the repositories for Rawhide and Fedora 31 (it will take ~ a week for it to hit the Fedora 31 repos though).

This is more of an FYI-issue, but I can submit a PR to the README with added installation instructions? Otherwise, feel free to close this and thanks for creating jtc!

Doesn't compile

I've tried both GCC 7.3.0 (on Ubuntu 18.04.1) and Clang 7.0.0 (on Termux) but it doesn't compile, here is the output of Clang:

$ c++ -o jtc -Wall -std=c++14 -Ofast jtc.cpp
In file included from jtc.cpp:7:
./lib/getoptions.hpp:451:51: warning: result of comparison of constant -1 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
 while((option = getopt(argc, argv, fmt.c_str())) != -1) {      // read next option character
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
In file included from jtc.cpp:9:
./lib/shell.hpp:38:25: error: reference to function type cannot have 'const' qualifier
    const std::string & stdout(void) const { return out_; }
                        ^
/data/data/com.termux/files/usr/include/stdio.h:78:17: note: expanded from macro 'stdout'
#define stdout (&__sF[1])
                ^
In file included from jtc.cpp:9:
./lib/shell.hpp:35:50: error: use of undeclared identifier 'buf_'
                        Shell(size_t s = 1024) { buf_.resize(s); }
                                                 ^
./lib/shell.hpp:38:60: error: expected ';' after class
    const std::string & stdout(void) const { return out_; }
                                                           ^
                                                           ;
./lib/shell.hpp:39:34: error: non-member function cannot have 'const' qualifier
    int                 rc(void) const { return rc_; }
                                 ^~~~~~
./lib/shell.hpp:39:49: error: use of undeclared identifier 'rc_'; did you mean 'rc'?
    int                 rc(void) const { return rc_; }
                                                ^~~
                                                rc
./lib/shell.hpp:39:25: note: 'rc' declared here
    int                 rc(void) const { return rc_; }
                        ^
./lib/shell.hpp:40:41: error: non-member function cannot have 'const' qualifier
    size_t              buff_size(void) const { return buf_.size(); }
                                        ^~~~~~
./lib/shell.hpp:40:56: error: use of undeclared identifier 'buf_'
    size_t              buff_size(void) const { return buf_.size(); }
                                                       ^
./lib/shell.hpp:41:47: error: use of undeclared identifier 'buf_'
    Shell &             buff_size(size_t s) { buf_.resize(s); return *this; }
                                              ^
./lib/shell.hpp:41:71: error: invalid use of 'this' outside of a non-static member function
    Shell &             buff_size(size_t s) { buf_.resize(s); return *this; }
                                                                      ^
./lib/shell.hpp:45:2: error: expected unqualified-id
 protected:
 ^
./lib/shell.hpp:49:2: error: expected unqualified-id
 private:
 ^
./lib/shell.hpp:52:16: error: unknown type name 'ThrowReason'
    EXCEPTIONS(ThrowReason)                                     // see "enums.hpp"
               ^
./lib/shell.hpp:52:5: error: non-member function cannot have 'const' qualifier
    EXCEPTIONS(ThrowReason)                                     // see "enums.hpp"
    ^
./lib/extensions.hpp:143:91: note: expanded from macro 'EXCEPTIONS'
    stdException __exp__(THROW_ENUM reason, const char *func, const char *file, int line) const \
                                                                                          ^
In file included from jtc.cpp:9:
./lib/shell.hpp:52:5: error: use of undeclared identifier 'ThrowReason_str'
./lib/extensions.hpp:144:39: note: expanded from macro 'EXCEPTIONS'
        { return stdException{reason, ENUMS(THROW_ENUM, reason), func, file, line}; }
                                      ^
./lib/extensions.hpp:65:37: note: expanded from macro 'ENUMS'
#define ENUMS(enum_class, enum_idx) enum_class ## _str[enum_idx]
                                    ^
<scratch space>:132:1: note: expanded from here
ThrowReason_str
^
In file included from jtc.cpp:9:
./lib/shell.hpp:53:1: error: extraneous closing brace ('}')
};
^
./lib/shell.hpp:64:2: error: use of undeclared identifier 'out_'
 out_.clear();
 ^
./lib/shell.hpp:68:14: error: use of undeclared identifier 'buf_'
 while(fgets(buf_.data(), buf_.size(), fh) != nullptr)
             ^
./lib/shell.hpp:68:27: error: use of undeclared identifier 'buf_'
 while(fgets(buf_.data(), buf_.size(), fh) != nullptr)
                          ^
./lib/shell.hpp:69:3: error: use of undeclared identifier 'out_'
  out_ += buf_.data();
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.

source JSON might be lost in a corner case

When option -f is used (to update the output right into the source JSON file) and either of these failures occur:

  • fail: template argument failed interpolation
  • fail: file <name> holds an invalid JSON
  • fail: argument walk-type (<walk>) not allowed, due to mode <mode> already set
  • fail: non-walk argument <arg> not allowed, due to option -<opt> given
  • fail: non-walk argument <arg> not allowed, due to mode <mode> already set

then the source JSON file is lost (becomes empty)

Failing build on macOS

Seeing build failure on a macOS build environment.

Environment details:

macOS 10.13 (darwin/17.7.0) arch i386
Xcode 10.1
SDK 10.13

Command:

c++ jtc.cpp -o jtc -Wall -std=c++14 -Ofast

Build output:

In file included from jtc.cpp:9:
In file included from ./lib/Json.hpp:479:
./lib/Streamstr.hpp:45:32: error: use of overloaded operator '+=' is ambiguous (with operand types 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') and 'void')
                             s += {&hb_[offset], cur_ - offset};
                             ~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:920:45: note: candidate function
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const basic_string& __str) {return append(__str);}
                                            ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string:921:45: note: candidate function
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(__self_view __sv)          {return append(__sv);}
                                            ^
1 error generated.

Heap-use-after free in Json::iterator::reinterpret_label()

Running ./jtc -w '<>F3' Bookmarks reports a heap-use-after-free error when compiled with asan.

To reproduce:

$ clang++ --std=c++14 -Og -g -pthread -lpthread -lrt -fsanitize=address,undefined -o jtc jtc.cpp
$ ./jtc -w '<>F3' Bookmarks

Which results in:

=================================================================
==3636414==ERROR: AddressSanitizer: heap-use-after-free on address 0x613000000a40 at pc 0x558c2551455f bp 0x7fffdba409c0 sp 0x7fffdba409b8
READ of size 4 at 0x613000000a40 thread T0
    #0 0x558c2551455e in Json::iterator::reinterpret_label() const ./jtc/./lib/Json.hpp:2568:50
    #1 0x558c2548bb12 in Json::iterator::operator*() ./jtc/./lib/Json.hpp:3878:9
    #2 0x558c254dfba0 in Jtc::console_output_(Json::iterator&, Json&, Jtc::Grouping) ./jtc/jtc.cpp:2770:47
    #3 0x558c254d46f0 in Jtc::output_by_iterator(Json::iterator&, Jtc::Grouping) ./jtc/jtc.cpp:1970:3
    #4 0x558c254e9774 in Jtc::process_offsets_(std::deque<std::deque<Json::iterator, std::allocator<Json::iterator> >, std::allocator<std::deque<Json::iterator, std::allocator<Json::iterator> > > >&, std::vector<std::vector<long, std::all
ocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&, unsigned long, std::vector<unsigned long, std::allocator<unsigned long> >&) ./jtc/jtc.cpp:2749:2
    #5 0x558c254e8033 in Jtc::process_walk_iterators_(std::deque<std::deque<Json::iterator, std::allocator<Json::iterator> >, std::allocator<std::deque<Json::iterator, std::allocator<Json::iterator> > > >&) ./jtc/jtc.cpp:2
673:2
    #6 0x558c254cdd00 in Jtc::walk_interleaved_(void (Jtc::*)(Json::iterator&, Jtc::Grouping)) ./jtc/jtc.cpp:2657:3
    #7 0x558c254c8d1b in Jtc::walk_json() ./jtc/jtc.cpp:1896:2
    #8 0x558c254bf644 in Jtc::demux_opt() ./jtc/jtc.cpp:1517:25
    #9 0x558c254bd625 in run_single_optset(CommonResource&, Streamstr::const_iterator&, Json&, Json&) ./jtc/jtc.cpp:903:29
    #10 0x558c254bae77 in run_decomposed_optsets(CommonResource&, Streamstr::const_iterator&) ./jtc/jtc.cpp:877:3
    #11 0x558c254b5943 in main ./jtc/jtc.cpp:803:6
    #12 0x7f6520d61022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
    #13 0x558c25386ced in _start (./jtc/jtc+0x2ecced)

0x613000000a40 is located 320 bytes inside of 384-byte region [0x613000000900,0x613000000a80)
freed by thread T0 here:
    #0 0x558c2545fcd9 in operator delete(void*) (./jtc/jtc+0x3c5cd9)
    #1 0x558c256c5430 in __gnu_cxx::new_allocator<Json::iterator>::deallocate(Json::iterator*, unsigned long) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../include/c++/9.3.0/ext/new_allocator.h:128:2
    #2 0x558c254cc7db in Jtc::walk_interleaved_(void (Jtc::*)(Json::iterator&, Jtc::Grouping)) ./jtc/jtc.cpp:2622:3
    #3 0x558c254c8d1b in Jtc::walk_json() ./jtc/jtc.cpp:1896:2
    #4 0x558c254bf644 in Jtc::demux_opt() ./jtc/jtc.cpp:1517:25
    #5 0x558c254bd625 in run_single_optset(CommonResource&, Streamstr::const_iterator&, Json&, Json&) ./jtc/jtc.cpp:903:29
    #6 0x558c254bae77 in run_decomposed_optsets(CommonResource&, Streamstr::const_iterator&) ./jtc/jtc.cpp:877:3
    #7 0x558c254b5943 in main ./jtc/jtc.cpp:803:6
    #8 0x7f6520d61022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)

previously allocated by thread T0 here:
    #0 0x558c2545f2b9 in operator new(unsigned long) (./jtc/jtc+0x3c52b9)
    #1 0x558c256d0358 in __gnu_cxx::new_allocator<Json::iterator>::allocate(unsigned long, void const*) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../include/c++/9.3.0/ext/new_allocator.h:114:27
    #2 0x558c256d77ab in std::_Deque_base<Json::iterator, std::allocator<Json::iterator> >::_Deque_base(std::_Deque_base<Json::iterator, std::allocator<Json::iterator> >&&, std::integral_constant<bool, true>) /usr/bin/../lib64/gcc/x86_64-
pc-linux-gnu/9.3.0/../../../../include/c++/9.3.0/bits/stl_deque.h:532:2

SUMMARY: AddressSanitizer: heap-use-after-free ./jtc/./lib/Json.hpp:2568:50 in Json::iterator::reinterpret_label() const
Shadow bytes around the buggy address:
  0x0c267fff80f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c267fff8100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c267fff8110: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
  0x0c267fff8120: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c267fff8130: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c267fff8140: fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd
  0x0c267fff8150: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c267fff8160: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c267fff8170: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c267fff8180: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa
  0x0c267fff8190: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==3636414==ABORTING                                                                                                                                                                                         

This bug was found using Symbolic Execution techniques developed in the course of the SYMBIOSYS research project at COMSYS, RWTH Aachen University. This research is supported by the European Research Council (ERC) under the EU's Horizon 2020 Research and Innovation Programme grant agreement n. 647295 (SYMBIOSYS).

Raspberry PI

Has anyone got this work on RPI? I tried the binary and compiling. No go.

Does not compile on Ubuntu Linux 20.04 g++ 9.4.0

OS:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

Arch:
x86_64

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Compile command: g++ -o jtc -Wall -std=c++17 -Ofast jtc.cpp

Compiler output see attached file
jtc.err.gz

Past-the-end string parsing in extract_lexeme

The first loop in extract_lexeme (link) will continue past the end of the given string if the last character before the terminating 0 is a backslash (e.g., ./jtc -w '[\\' Bookmarks).

This is because the presence of the backslash will cause the iterator to be increased twice, thus skipping the terminating null-byte.

This bug was found using Symbolic Execution techniques developed in the course of the SYMBIOSYS research project at COMSYS, RWTH Aachen University. This research is supported by the European Research Council (ERC) under the EU's Horizon 2020 Research and Innovation Programme grant agreement n. 647295 (SYMBIOSYS).

Compiling on CygWin

Sorry for the bother, I managed to compile jtm using the Linux command on Cygwin/Windows 10

But jtc compilation breaks for some reason

c++ -o jtm -Wall -std=gnu++14 -static -Ofast jtc.cpp

In file included from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/cstdio:42:0,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ext/string_conversions.h:43,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:6361,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/string:52,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iostream:39,
                 from jtc.cpp:1:
lib/shell.hpp:38:25: error: expected โ€˜)โ€™ before โ€˜->โ€™ token
     const std::string & stdout(void) const { return out_; }
                         ^
In file included from /usr/include/wchar.h:6:0,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/cwchar:44,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/postypes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iosfwd:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ios:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iostream:39,
                 from jtc.cpp:1:
lib/shell.hpp:38:25: error: expected โ€˜;โ€™ at end of member declaration
     const std::string & stdout(void) const { return out_; }
                         ^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/cstdio:42:0,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ext/string_conversions.h:43,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:6361,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/string:52,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iostream:39,
                 from jtc.cpp:1:
lib/shell.hpp:38:25: error: expected unqualified-id before โ€˜->โ€™ token
     const std::string & stdout(void) const { return out_; }
                         ^
jtc.cpp: In member function โ€˜bool Jtc::execute_cli_(Json&, Json::iterator&, const map_jn&)โ€™:
jtc.cpp:1449:17: error: expected unqualified-id before โ€˜(โ€™ token
  string out{sh_.stdout()};
                 ^
jtc.cpp:1449:25: error: no matching function for call to โ€˜std::basic_string<char>::basic_string(<brace-enclosed initializer list>)โ€™
  string out{sh_.stdout()};
                         ^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/string:52:0,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iostream:39,
                 from jtc.cpp:1:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3589:9: note: candidate: template<class _InputIterator> std::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&)
         basic_string(_InputIterator __beg, _InputIterator __end,
         ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3589:9: note:   template argument deduction/substitution failed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3579:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3579:7: note:   conversion of argument 1 would be ill-formed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3561:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string(basic_string&& __str)
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3561:7: note:   conversion of argument 1 would be ill-formed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3551:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3551:7: note:   candidate expects 3 arguments, 1 provided
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3544:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3544:7: note:   conversion of argument 1 would be ill-formed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3537:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       basic_string(const _CharT* __s, size_type __n,
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3537:7: note:   candidate expects 3 arguments, 1 provided
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3525:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       basic_string(const basic_string& __str, size_type __pos,
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3525:7: note:   candidate expects 4 arguments, 1 provided
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3516:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       basic_string(const basic_string& __str, size_type __pos,
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3516:7: note:   candidate expects 3 arguments, 1 provided
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3507:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       basic_string(const basic_string& __str, size_type __pos,
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3507:7: note:   candidate expects 3 arguments, 1 provided
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3497:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string(const basic_string& __str);
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3497:7: note:   conversion of argument 1 would be ill-formed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3490:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string(const _Alloc& __a);
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3490:7: note:   conversion of argument 1 would be ill-formed:
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3479:7: note: candidate: std::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       basic_string()
       ^~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/basic_string.h:3479:7: note:   candidate expects 0 arguments, 1 provided

I also tried

clang++-8 -Wall -std=c++14 -Ofast jtc.cpp -o jtc

In file included from jtc.cpp:11:
./lib/shell.hpp:38:25: error: expected ')'
    const std::string & stdout(void) const { return out_; }
                        ^
/usr/include/stdio.h:161:23: note: expanded from macro 'stdout'
#define stdout  (_REENT->_stdout)
                       ^
./lib/shell.hpp:38:25: note: to match this '('
/usr/include/stdio.h:161:16: note: expanded from macro 'stdout'
#define stdout  (_REENT->_stdout)
                ^
In file included from jtc.cpp:11:
./lib/shell.hpp:38:25: error: function cannot return function type 'const std::string &() const' (aka 'const basic_string<char> &() const')
    const std::string & stdout(void) const { return out_; }
                        ^
/usr/include/stdio.h:161:17: note: expanded from macro 'stdout'
#define stdout  (_REENT->_stdout)
                 ^
/usr/include/sys/reent.h:825:28: note: expanded from macro '_REENT'
# define _REENT (__getreent())
                           ^
In file included from jtc.cpp:11:
./lib/shell.hpp:38:53: error: no viable conversion from returned value of type 'std::string' (aka 'basic_string<char>') to function return type 'int'
    const std::string & stdout(void) const { return out_; }
                                                    ^~~~
jtc.cpp:1449:17: error: expected unqualified-id
 string out{sh_.stdout()};
                ^
/usr/include/stdio.h:161:16: note: expanded from macro 'stdout'
#define stdout  (_REENT->_stdout)
                ^
4 errors generated.

If you have the time to check it out I would be happy

thanks

Second, third, etc Regex lexeme in the walk-path might not re-engage

considering ab.json example from User Guide:

bash $ <ab.json jtc -w'<street address>l:<>f<St$>R<>F'
"6213 E Colfax Ave"
bash $ 
bash $ <ab.json jtc -w'<street address>l:<>f<St$>R<>F<.*>R'
bash $ 

Those two should produce exactly the same result, though the last one is not matching (because the trailing lexeme <.*>R is not getting engaged)

<<<'[ "1st json" ] { "2nd": "json" } "3rd json"' jtc -ar dies with a failed assertion or an exception

The following example from the user guide results in a failed assertion:

$ <<<'[ "1st json" ] { "2nd": "json" } "3rd json"' jtc -ar
[ "1st json" ]
{ "2nd": "json" }
"3rd json"
/builddir/build/BUILD/gcc-10.1.1-20200507/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:1019: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Aborted (core dumped)

This does only happen with gcc though, with clang I get the following instead:

$ <<<'[ "1st json" ] { "2nd": "json" } "3rd json"' ./jtc -ar
[ "1st json" ]
{ "2nd": "json" }
"3rd json"
jtc json parsing exception (<stdin>:44): expected_json_value

<ab.json ./jtc -w'<phone>l:' -w'<phone>l:[-1:]' -s / -w'<phone>l:' -l leaks memory

The following example from User Guide.md results in a memory leak:

bash $ <ab.json jtc -w'<phone>l:' -w'<phone>l:[-1:]' -s / -w'<phone>l:' -l
"phone": {
   "number": "113-123-2368",
   "type": "mobile"
}
"phone": {
   "number": "223-283-0372",
   "type": "mobile"
}
"phone": {
   "number": "333-638-0238",
   "type": "home"
}

=================================================================
==240775==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 960 byte(s) in 6 object(s) allocated from:
    #0 0x63c677 in operator new(unsigned long) (/home/dan/projects/github.com/ldn-softdev/jtc/jtc+0x63c677)
    #1 0x855f8c in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/ext/new_allocator.h:115:27
    #2 0x855ef0 in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >&, unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/alloc_traits.h:460:20
    #3 0x855e99 in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_get_node() /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:584:16
    #4 0x94aa4f in std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >* std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_create_node<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:634:23
    #5 0x94a407 in std::pair<std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, bool> std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_emplace_unique<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:2414:19
    #6 0x7a9df1 in std::pair<std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, bool> std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Jnode, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_map.h:577:16
    #7 0x675912 in Json::parse_array_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3074:20
    #8 0x670232 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3015:29
    #9 0x6734ff in Json::parse_object_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3112:3
    #10 0x670145 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3014:30
    #11 0x6749ac in Json::parse_array_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3058:3
    #12 0x670232 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3015:29
    #13 0x6734ff in Json::parse_object_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3112:3
    #14 0x670145 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3014:30
    #15 0x66d604 in Json::parse(Streamstr::const_iterator&, Json::ParseTrailing) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:2961:2
    #16 0x70798e in Jtc::parsejson(Streamstr::const_iterator&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1392:12
    #17 0x704d88 in run_single_optset(CommonResource&, Streamstr::const_iterator&, Json&, Json&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:905:11
    #18 0x7007c9 in run_decomposed_optsets(CommonResource&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:888:3
    #19 0x6f595f in main /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:814:6
    #20 0x7ff4d9941041 in __libc_start_main (/lib64/libc.so.6+0x27041)

Indirect leak of 960 byte(s) in 6 object(s) allocated from:
    #0 0x63c677 in operator new(unsigned long) (/home/dan/projects/github.com/ldn-softdev/jtc/jtc+0x63c677)
    #1 0x855f8c in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/ext/new_allocator.h:115:27
    #2 0x855ef0 in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >&, unsigned long) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/alloc_traits.h:460:20
    #3 0x855e99 in std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_get_node() /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:584:16
    #4 0xa175ef in std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >* std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_create_node<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:634:23
    #5 0xa16f37 in std::pair<std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, bool> std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::_M_emplace_unique<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_tree.h:2414:19
    #6 0x7b1121 in std::pair<std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> >, bool> std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Jnode, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode> > >::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Jnode>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&&, Jnode&&) /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_map.h:577:16
    #7 0x6742b2 in Json::parse_object_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3120:21
    #8 0x670145 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3014:30
    #9 0x6749ac in Json::parse_array_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3058:3
    #10 0x670232 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3015:29
    #11 0x6734ff in Json::parse_object_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3112:3
    #12 0x670145 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3014:30
    #13 0x6749ac in Json::parse_array_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3058:3
    #14 0x670232 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3015:29
    #15 0x6734ff in Json::parse_object_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3112:3
    #16 0x670145 in Json::parse_(Jnode&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:3014:30
    #17 0x66d604 in Json::parse(Streamstr::const_iterator&, Json::ParseTrailing) /home/dan/projects/github.com/ldn-softdev/jtc/./lib/Json.hpp:2961:2
    #18 0x70798e in Jtc::parsejson(Streamstr::const_iterator&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:1392:12
    #19 0x704d88 in run_single_optset(CommonResource&, Streamstr::const_iterator&, Json&, Json&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:905:11
    #20 0x7007c9 in run_decomposed_optsets(CommonResource&, Streamstr::const_iterator&) /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:888:3
    #21 0x6f595f in main /home/dan/projects/github.com/ldn-softdev/jtc/jtc.cpp:814:6
    #22 0x7ff4d9941041 in __libc_start_main (/lib64/libc.so.6+0x27041)

SUMMARY: AddressSanitizer: 1920 byte(s) leaked in 12 allocation(s).

[FreeBSD] Fails to build with clang 10

Since clang 10, the compiler has been made more restrictive in what is allowed. As a result of this an error is thrown during compilation with clang 10:

./lib/Json.hpp:1224:37: error: cannot assign to non-static data member within const member function 'operator()'
                             { lbp_ = &s; jnp_ = &jn; return *this; }
                               ~~~~ ^
./lib/Json.hpp:1223:29: note: member function 'Jnode::Iterator::SuperJnode::operator()' is declared const here
        const SuperJnode &  operator()(const std::string &s, const Jnode &jn) const
        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/Json.hpp:1224:48: error: cannot assign to non-static data member within const member function 'operator()'
                             { lbp_ = &s; jnp_ = &jn; return *this; }
                                          ~~~~ ^
./lib/Json.hpp:1223:29: note: member function 'Jnode::Iterator::SuperJnode::operator()' is declared const here
        const SuperJnode &  operator()(const std::string &s, const Jnode &jn) const
        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Outright removing this line at Json.hpp#L1223 resolves the issue, if this was intentional I don't know. Cheers!

Huge repository size due to committed binaries

Hi Dmitry!

Feel free to consider removing binaries from the repository by rewriting the history. Gihub offers a corresponding releases page for this purpose (you've used this already few times).

$ git clone git://github.com/ldn-softdev/jtc.git
$ cd jtc
$ du -sh .git
39M      .git                                                                                                                                                          

39 megabytes. Let's try to recompress the repo, maybe it's just garbage:

$ START=$SECONDS; git gc --aggressive; echo "elapsed $((($SECONDS-$START)/60)) min $((($SECONDS-$START)%60)) sec"
Enumerating objects: 2366, done.                                                                                                                                      
Counting objects: 100% (2366/2366), done.                                                                                                                             
Compressing objects: 100% (2363/2363), done.                                                                                     
Writing objects: 100% (2366/2366), done.                                                                                                                             
Total 2366 (delta 1617), reused 700 (delta 0)                                                                                           
elapsed 8 min 28 sec

It took much time but

$ du -sh .git
33M      .git                                                                                                                     

33 megabytes is almost same.

Now let's remove the binaries for Linux and MacOS following https://help.github.com/en/articles/removing-sensitive-data-from-a-repository

$ git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch jtc-linux* jtc-macos*' --prune-empty --tag-name-filter cat -- --all
$ git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
$ git reflog expire --expire=now --all
$ git gc --prune=now --aggressive

And check the repo size:

$ du -sh .git
732K    .git

Impressive, we've saved 98% of space!

Regards,
Andrey

improve template-per-walk behavior

currently, the template-per-walk is bound to successful walks, though such behavior is less desirable than binding per a given walk

e.g., the behavior from this query is not what normally would be expected by a user:

bash $ <<<'["a","b","c"]' jtc -jw[0] -T0 -w[] -T1 -w[2] -T2
[
   0,
   1
]
bash $ 

b/c users normally would want to bound each template per the given walk, and expect this behavior:

bash $ <<<'["a","b","c"]' jtc -jw[0] -T0 -w[] -T1 -w[2] -T2
[
   0,
   2
]
bash $ 

A similar improvement is also required for templates pertain to -u, -i operations

compiling: error: explicit specialization in non-namespace scope 'class Json'

$ c++ -o jtc -Wall -std=gnu++14 -Ofast -static -Wl,--whole-archive -lrt -pthread -lpthread -Wl,--no-whole-archive jtc.cpp
In file included from jtc.cpp:18:
lib/Json.hpp:1971:14: error: explicit specialization in non-namespace scope 'class Json'
1971 | template<>
| ^
lib/Json.hpp:1972:25: error: template-id 'parse_template_Json::Jsn' in declaration of primary template
1972 | bool parse_template_(Jnode &,
| ^~~~~~~~~~~~~~~~~~~~
lib/Json.hpp: In member function 'void Json::parse_array_(Jnode&, Streamstr::const_iterator&)':
lib/Json.hpp:3188:27: warning: macro expands to multiple statements [-Wmultistatement-macros]
3188 | MAY_RETURN_ON_FAILURE( parse_(child, jsp) )
| ^~~~~~
lib/Json.hpp:3051:5: note: in definition of macro 'MAY_RETURN_ON_FAILURE'
3051 | CODE;
| ^~~~
lib/Json.hpp:3187:3: note: some parts of macro expansion are not guarded by this 'if' clause
3187 | if(not parse_template_(child, jsp, TmpPlacement::Value))
| ^~
In file included from jtc.cpp:18:
lib/Json.hpp: In static member function 'static void Json::generate_auto_tokens_(Json::map_jne&, Json::Stringover&, Json::iterator&)':
lib/Json.hpp:5404:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
5404 | if(uct.count(to_upper(t))) DOUT(jit.json()) << dlm << to_upper(t); dlm = ", ";
| ^~
lib/Json.hpp:5404:71: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
5404 | if(uct.count(to_upper(t))) DOUT(jit.json()) << dlm << to_upper(t); dlm = ", ";
| ^~~
lib/Json.hpp:5405:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
5405 | if(lct.count(t)) DOUT(jit.json()) << dlm << t; dlm = ", ";
| ^~
lib/Json.hpp:5405:51: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
5405 | if(lct.count(t)) DOUT(jit.json()) << dlm << t; dlm = ", ";
|

$ uname -a
Linux zabbix 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ c++ --version
c++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0

include in apt repos for debian/ubuntu

Love the tool, but hard to be able to rely on it unless we can reliably access it across all the systems where its needed.

I mentioned debian/ubuntu in the issue title.... RHEL/fedora/centos would also be of interest for others I work with.

more documentation on -i0

Looking at this example given when running jtc -g:

jtc -fw'[Relation][:]<g:"X">f<\bSmith\b>R<g:"Y">v[-1]' -i0 -T'{"gene": "{g}"}' example.json

There doesn't seem to be a clear explanation of -i0 in the documentation.

If I do jtc -h there's this:

-i j|w|t insert JSON (given as JSON/walk/template); see with -g for more

I'm guessing 0 is a walk? But then there's the -T that is a template.

I've tried running this through the debugger (-dddd) but the debugging output seems focussed on the walk-path.

And this doesn't clarify either: https://github.com/ldn-softdev/jtc/blob/master/User%20Guide.md#insert-operations

$PATH token does not undergo string-interpolation

An example from the User-Guide states:

bash $ <ab.json jtc -w'<$#:\t>v<NY>' -qqT'"{$PATH}"'
Directory       0       address state
bash $ 

while currently it's giving:

bash $ <ab.json jtc -w'<$#:\t>v<NY>' -qqT'"{$PATH}"'
NY
bash $ 

the token $PATH generates a JSON array and therefore should be subjected to all interpolation features as well as any JSON array, thus viewing this current behavior as a bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.