Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
derived-path-map.hh
Go to the documentation of this file.
1#pragma once
3
4#include "types.hh"
5#include "derived-path.hh"
6
7namespace nix {
8
27template<typename V>
32 struct ChildNode {
39
43 using Map = std::map<OutputName, ChildNode>;
44
49
50 bool operator == (const ChildNode &) const noexcept;
51
52 // TODO libc++ 16 (used by darwin) missing `std::map::operator <=>`, can't do yet.
53 // decltype(std::declval<V>() <=> std::declval<V>())
54 // operator <=> (const ChildNode &) const noexcept;
55 };
56
60 using Map = std::map<StorePath, ChildNode>;
61
66
67 bool operator == (const DerivedPathMap &) const = default;
68
69 // TODO libc++ 16 (used by darwin) missing `std::map::operator <=>`, can't do yet.
70 // auto operator <=> (const DerivedPathMap &) const noexcept;
71
80
91};
92
93template<>
94bool DerivedPathMap<std::set<std::string>>::ChildNode::operator == (
95 const DerivedPathMap<std::set<std::string>>::ChildNode &) const noexcept;
96
97// TODO libc++ 16 (used by darwin) missing `std::map::operator <=>`, can't do yet.
98#if 0
99template<>
100std::strong_ordering DerivedPathMap<std::set<std::string>>::ChildNode::operator <=> (
101 const DerivedPathMap<std::set<std::string>>::ChildNode &) const noexcept;
102
103template<>
104inline auto DerivedPathMap<std::set<std::string>>::operator <=> (const DerivedPathMap<std::set<std::string>> &) const noexcept = default;
105#endif
106
107extern template struct DerivedPathMap<std::set<std::string>>::ChildNode;
108extern template struct DerivedPathMap<std::set<std::string>>;
109
110}
Definition derived-path-map.hh:32
V value
Definition derived-path-map.hh:38
std::map< OutputName, ChildNode > Map
Definition derived-path-map.hh:43
Map childMap
Definition derived-path-map.hh:48
Definition derived-path-map.hh:28
std::map< StorePath, ChildNode > Map
Definition derived-path-map.hh:60
ChildNode & ensureSlot(const SingleDerivedPath &k)
Definition derived-path-map.cc:7
Map map
Definition derived-path-map.hh:65
ChildNode * findSlot(const SingleDerivedPath &k)
Definition derived-path-map.cc:26
Definition derived-path.hh:102