}
else
{
- boost::optional<FreeSpaceCondition> free_space_condition;
+ std::optional<FreeSpaceCondition> free_space_condition;
try
{
}
else
{
- boost::optional<FreeSpaceCondition> free_space_condition;
+ std::optional<FreeSpaceCondition> free_space_condition;
try
{
}
- boost::optional<BackupConfig::TargetMode>
+ std::optional<BackupConfig::TargetMode>
GlobalOptions::only_target_mode_value(const ParsedOpts& opts) const
{
ParsedOpts::const_iterator it = opts.find("target-mode");
if (it == opts.end())
- return boost::optional<BackupConfig::TargetMode>();
+ return std::optional<BackupConfig::TargetMode>();
BackupConfig::TargetMode target_mode;
}
- boost::optional<string>
+ std::optional<string>
GlobalOptions::backup_config_value(const ParsedOpts& opts) const
{
ParsedOpts::const_iterator it = opts.find("backup-config");
if (it == opts.end())
- return boost::optional<string>();
+ return std::optional<string>();
return it->second;
}
#include <string>
-#include <boost/optional.hpp>
+#include <optional>
#include <snapper/Enum.h>
bool quiet() const { return _quiet; }
bool verbose() const { return _verbose; }
bool debug() const { return _debug; }
- const boost::optional<BackupConfig::TargetMode>& target_mode() const { return _target_mode; }
+ const std::optional<BackupConfig::TargetMode>& target_mode() const { return _target_mode; }
bool automatic() const { return _automatic; }
bool utc() const { return _utc; }
bool iso() const { return _iso; }
OutputFormat output_format() const { return _output_format; }
const string& separator() const { return _separator; }
bool headers() const { return _headers; }
- const boost::optional<string>& backup_config() const { return _backup_config; }
+ const std::optional<string>& backup_config() const { return _backup_config; }
private:
void check_options(const ParsedOpts& parsed_opts) const;
- boost::optional<BackupConfig::TargetMode> only_target_mode_value(const ParsedOpts& parsed_opts) const;
+ std::optional<BackupConfig::TargetMode> only_target_mode_value(const ParsedOpts& parsed_opts) const;
Style table_style_value(const ParsedOpts& parsed_opts) const;
OutputFormat output_format_value(const ParsedOpts& parsed_opts) const;
string separator_value(const ParsedOpts& parsed_opts) const;
- boost::optional<string> backup_config_value(const ParsedOpts& parsed_opts) const;
+ std::optional<string> backup_config_value(const ParsedOpts& parsed_opts) const;
bool _quiet;
bool _verbose;
bool _debug;
- boost::optional<BackupConfig::TargetMode> _target_mode;
+ std::optional<BackupConfig::TargetMode> _target_mode;
bool _automatic;
bool _utc;
bool _iso;
OutputFormat _output_format;
string _separator;
bool _headers;
- boost::optional<string> _backup_config;
+ std::optional<string> _backup_config;
};
#include <vector>
#include <boost/algorithm/string.hpp>
-#include <boost/optional.hpp>
#include <snapper/AppUtil.h>
}
}
- boost::optional<TreeView::SearchResult>
+
+ std::optional<TreeView::SearchResult>
TreeView::find_nearest_valid_node(const string& start_uuid) const
{
auto pair = pool.find(start_uuid);
__builtin_unreachable();
}
- boost::optional<TreeView::SearchResult>
+
+ std::optional<TreeView::SearchResult>
TreeView::find_nearest_valid_node(const ProxyNode* start_node) const
{
queue<SearchResult> nodes_to_visit;
}
}
- return boost::none;
+ return std::nullopt;
}
void TreeView::set_parent(ProxyNode* node, ProxyNode* parent, ParentType parent_type)
#include <memory>
#include <string>
#include <vector>
-
-#include <boost/optional.hpp>
+#include <optional>
#include <snapper/Enum.h>
TreeView(const vector<shared_ptr<ProxyNode>>& nodes);
/** Find the nearest valid node to use as a Btrfs‑send parent. */
- boost::optional<SearchResult>
+ std::optional<SearchResult>
find_nearest_valid_node(const string& start_uuid) const;
/** Print the tree graph in Graphviz DOT Language. */
* Find the nearest valid node to use as a Btrfs‑send parent, starting from the
* given node.
*/
- boost::optional<SearchResult>
+ std::optional<SearchResult>
find_nearest_valid_node(const ProxyNode* start_node) const;
/**