mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <>
Subject Review Request 68813: Added support for `Option<T&>` / `Option<const T&>`.
Date Sun, 23 Sep 2018 01:09:39 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Benjamin Bannier, Benno Evers, and Michael Park.

Bugs: MESOS-9252

Repository: mesos


This adds support for options of references. While this is still
under debate for `std::optional`, there are some use cases in
stout that can benefit from this:

  // None if the value is not found, otherwise a reference
  // to the value.
  Option<T&> t = hashmap.get("key");

Assignment and equality are deleted in order to avoid confusion
around which of the 2 possible behaviors they provide (e.g. are
the references being compared? or are the objects being referred
to being compared?)


  3rdparty/stout/include/stout/option.hpp 8feed012a55fed6eab89c883958324f3345e46e9 



Test added in subsequent patch.


Benjamin Mahler

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message