Project: mesos
Issue MESOS-5471: Enable `Option` to handle string literals gracefully
In {{FlagsBase::add}}, MESOS-5064 begins making use of template function parameters like {{T2*}} for the default flag value rather than {{Option&}}. This is because in some places in the code base, we pass string literals for this argument. If an {{Option}} type is used, the compiler infers a {{char [x]}} type for {{T2}}, which breaks {{Option::getOrElse}}, which attempts to return that same type, since returning arrays is disallowed. To fix this, we could employ {{std::decay}}, which would convert a return type of {{char [x]}} into {{const char *}}.
Story points: 2