Skip to content

Modernize codebase: optional instead of out-argsΒ #109

@sipa

Description

@sipa

The codebase in several places uses constructions like functions that return a bool to communicate success/failure, and then actually put their output in a by-ref argument, e.g.:

template<typename Ctx> bool ToString(const Ctx& ctx, std::string& ret) const

With the code now using C++17, I think those should be retrofitted to use std::optional instead:

template<typename Ctx> std::optional<std::string> ToString(const Ctx& ctx) const

(and many other examples)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions