You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Bannier (JIRA)" <ji...@apache.org> on 2016/12/06 11:11:26 UTC
[jira] [Created] (MESOS-6727) FlagsBase allows add'ing non-Option
member without a default value
Benjamin Bannier created MESOS-6727:
---------------------------------------
Summary: FlagsBase allows add'ing non-Option member without a default value
Key: MESOS-6727
URL: https://issues.apache.org/jira/browse/MESOS-6727
Project: Mesos
Issue Type: Bug
Components: stout
Reporter: Benjamin Bannier
The class {{FlagsBase}} provides {{add}} overloads acting on non-{{Option}} members ({{T Flags::*}}) without requiring a default value, e.g., among others
{code}
template <typename Flags, typename T>
void add(
T Flags::*t,
const Name& name,
const std::string& help);
{code}
This overload is problematic if {{T}} is a fundamental type (i.e., without a constructor) as it can leave members uninitialized.
It appears we should always require default value when acting on non-{{Option}} members with {{add}}, and remove the offending overloads.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)