mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 55139: Implemented parse methods for OCI image spec.
Date Sun, 08 Jan 2017 17:55:28 GMT

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




include/mesos/oci/spec.hpp (lines 27 - 48)
<https://reviews.apache.org/r/55139/#comment232080>

    I would use template and template specification here:
    ```
    template <typename T>
    Try<T> parse(const string& s);
    
    template <>
    Try<Descriptor> parse(const string& s);
    
    ...
    ```
    
    At callsite, you can do:
    ```
    Try<Descriptor> descriptor = parse<Descriptor>(s);
    ```


- Jie Yu


On Jan. 3, 2017, 2:11 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55139/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2017, 2:11 p.m.)
> 
> 
> Review request for mesos, Gilbert Song and Jie Yu.
> 
> 
> Bugs: MESOS-6681
>     https://issues.apache.org/jira/browse/MESOS-6681
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented parse methods for OCI image spec.
> 
> 
> Diffs
> -----
> 
>   include/mesos/oci/spec.hpp PRE-CREATION 
>   src/CMakeLists.txt c8d4260c03d8cdee1951a50d293e9fdabcd2cf84 
>   src/Makefile.am 6d0f77be37af9bc4e22199418796d6d0c5b6c462 
>   src/oci/spec.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/55139/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


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