MCPcopy Create free account
hub / github.com/davisking/dlib / _private_less

Method _private_less

dlib/smart_pointers/weak_ptr.h:168–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167 template <typename Y>
168 bool _private_less (
169 const weak_ptr<Y>& rhs
170 ) const
171 {
172 if (expired())
173 {
174 if (rhs.expired())
175 {
176 return false;
177 }
178 else
179 {
180 return true;
181 }
182 }
183 else
184 {
185 if (rhs.expired())
186 {
187 return false;
188 }
189 else
190 {
191 // in this case they have both not expired so lets
192 // compare the shared_node pointers
193 return (weak_node->shared_node) < (rhs.weak_node->shared_node);
194 }
195 }
196 }
197
198 private:
199

Callers 1

operator<Function · 0.45

Calls 1

expiredMethod · 0.80

Tested by

no test coverage detected