diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-02-26 14:52:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-02-26 14:52:36 +0200 |
commit | 4c79699959a1368d1a1cd4770d5f46134768905d (patch) | |
tree | 32a0818d3760aca53b7947a8597b05052536a973 | |
parent | c07b140808440aa603b5664b603b78a04f63328a (diff) |
Adjust to new aggregate initialization rules in C++20
-rw-r--r-- | bpkg/package.hxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 515f105..e782f1b 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -757,6 +757,7 @@ namespace bpkg package_prerequisites prerequisites; + public: bool system () const { @@ -822,6 +823,37 @@ namespace bpkg #pragma db member(prerequisites) id_column("package") \ key_column("prerequisite") key_not_null value_column("") + // Explicit aggregate initialization for C++20 (private default ctor). + // + selected_package (package_name n, + version_type v, + package_state s, + package_substate ss, + bool hp, + bool hv, + repository_location rf, + optional<path> a, + bool pa, + optional<dir_path> sr, + bool ps, + optional<std::string> mc, + optional<dir_path> o, + package_prerequisites pps) + : name (move (n)), + version (move (v)), + state (s), + substate (ss), + hold_package (hp), + hold_version (hv), + repository_fragment (move (rf)), + archive (move (a)), + purge_archive (pa), + src_root (move (sr)), + purge_src (ps), + manifest_checksum (move (mc)), + out_root (move (o)), + prerequisites (move (pps)) {} + private: friend class odb::access; selected_package () = default; |