mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Review Request 43434: Constrain one of Option's constructors to 'constructible' types.
Date Wed, 10 Feb 2016 23:35:57 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43434/
-----------------------------------------------------------

Review request for mesos, Bernd Mathiske, Artem Harutyunyan, and Michael Park.


Bugs: MESOS-4633
    https://issues.apache.org/jira/browse/MESOS-4633


Repository: mesos


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 6b66bce76838046d7c955188ab9ac05e12756a83


Diff: https://reviews.apache.org/r/43434/diff/


Testing
-------

Note: All credit for this patch, including the below example, goes to MPark :)

Lets us compile something like this:
```
struct Foo {};

void F(const std::string&) {}
void F(const Option<Foo>&) {}

TEST(OptionTest, ConditionalConstruct)
{
  F("hello");
}
```


Thanks,

Joseph Wu


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