+class VerIteratorWithCaching
+{
+ const pkgCache::VerIterator iter;
+ const pkgCache::DescFile * descFile;
+public:
+ VerIteratorWithCaching(const pkgCache::VerIterator& iter) :
+ iter(iter),
+ descFile(iter->DescriptionList != 0
+ ? (const pkgCache::DescFile *) iter.TranslatedDescription().FileList()
+ : nullptr)
+ {}
+ const pkgCache::DescFile * CachedDescFile() const { return descFile; }
+ operator pkgCache::VerIterator() const { return iter; }
+};
+
+struct VersionSortDescriptionLocality /*{{{*/