MCPcopy Create free account
hub / github.com/docopt/docopt.cpp / operator==

Function operator==

docopt_value.h:309–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307 }
308
309 inline
310 bool operator==(value const& v1, value const& v2)
311 {
312 if (v1.kind_ != v2.kind_)
313 return false;
314
315 switch (v1.kind_) {
316 case Kind::String:
317 return v1.variant_.strValue==v2.variant_.strValue;
318
319 case Kind::StringList:
320 return v1.variant_.strList==v2.variant_.strList;
321
322 case Kind::Bool:
323 return v1.variant_.boolValue==v2.variant_.boolValue;
324
325 case Kind::Long:
326 return v1.variant_.longValue==v2.variant_.longValue;
327
328 case Kind::Empty:
329 default:
330 return true;
331 }
332 }
333
334 inline
335 bool operator!=(value const& v1, value const& v2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected