Const-qualify operator()s. NFC. (#1638)

As a general rule, `operator()` should be const-qualified.
The exceptions are few and far between.

I was actually looking for a Guideline on that subject;
I grepped for `operator()` and found that not only is there
no such Guideline yet, the doc actually contained these
places that (needlessly) violated the general rule.
This commit is contained in:
Arthur O'Dwyer
2020-07-02 14:08:50 -04:00
committed by GitHub
parent c379d3f6ea
commit 567331ab4e

View File

@@ -14523,7 +14523,7 @@ It is harder to ensure absence of errors in detached threads (and potentially de
void f() { std::cout << "Hello "; }
struct F {
void operator()() { std::cout << "parallel world "; }
void operator()() const { std::cout << "parallel world "; }
};
int main()
@@ -14537,7 +14537,7 @@ It is harder to ensure absence of errors in detached threads (and potentially de
void f() { std::cout << "Hello "; }
struct F {
void operator()() { std::cout << "parallel world "; }
void operator()() const { std::cout << "parallel world "; }
};
int main()