> On Jan. 4, 2016, 6:26 p.m., Joris Van Remoortere wrote:
> > Looks good. How did you choose the particular functions to make constexpr. 
> > Why not the units for example? or others?
> 
> Benjamin Bannier wrote:
>     The goal was to provide `constexpr` versions of `Duration::min`, 
> `Duration::max`, and `Duration::zero`. The latter requires a `constexpr` 
> default ctr for `Duration`, the two former ones `constexpr` ctrs for both 
> `NanoSeconds` and for `Duration(int64_t, int64_t)`. For consistency I made 
> most ctrs `constexpr`.
>     
>     What do you mean by units here?

For example:
`static std::string units() { return "hrs"; }`


- Joris


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


On Jan. 4, 2016, 6:43 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41881/
> -----------------------------------------------------------
> 
> (Updated Jan. 4, 2016, 6:43 p.m.)
> 
> 
> Review request for mesos, Joris Van Remoortere, Till Toenshoff, and Jiang Yan 
> Xu.
> 
> 
> Bugs: MESOS-4277
>     https://issues.apache.org/jira/browse/MESOS-4277
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> For that we need to provide a constexpr constructor for Nanoseconds at
> least; make all constructors of Duration types constexpr if possible.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/duration.hpp 
> dc610e697032f0d5d9c7a6524aeb34984041dec7 
> 
> Diff: https://reviews.apache.org/r/41881/diff/
> 
> 
> Testing
> -------
> 
> make check (OS X 10.10.5).
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>

Reply via email to