----------------------------------------------------------- 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) I would use template and template specification here: ``` template Try parse(const string& s); template <> Try parse(const string& s); ... ``` At callsite, you can do: ``` Try descriptor = parse(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 > >