Special handling for vector<bool>.

Synopsis

Declared in <folly/json/dynamic.h>

dynamic(std::vector<bool>::reference b);

Description

If v is vector<bool>, v[idx]is a proxy object implicitly convertible to bool. Calling a function f(dynamic) with f(v[idx]) would require a double implicit conversion (reference ‐> bool ‐> dynamic) which is not allowed, hence we explicitly accept the reference proxy.

Parameters

Name

Description

b

The vector<bool> element proxy to store as a boolean.

Created with MrDocs