https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89151

--- Comment #2 from Csaba Ráduly <csaba_22 at yahoo dot co.uk> ---
Commenting out the non-optional operator GetWhat makes GCC 8.2.0 compile the
example as written. However, that operator is needed if struct R is changed to

struct R {
        boost::optional<std::string> password;
        std::string                  name;

        R()
        : password{ get_from().as<decltype(password)>() }
        , name{ get_from().as<decltype(name)>() }
        {}
};

Reply via email to