Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
2
Description
In FlagsBase::add, MESOS-5064 begins making use of template function parameters like T2* for the default flag value rather than Option<T2>&. 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 *.