Procházet zdrojové kódy

feat(std::set): add template key version of lower_bound

greatbridf před 1 rokem
rodič
revize
281050186a
1 změnil soubory, kde provedl 16 přidání a 0 odebrání
  1. 16 0
      gblibstdc++/include/set

+ 16 - 0
gblibstdc++/include/set

@@ -190,6 +190,14 @@ public:
     __GBLIBCPP_CONSTEXPR
     const_iterator upper_bound(const Key& key) const
     { return tree.upper_bound(key); }
+    template <typename K>
+    __GBLIBCPP_CONSTEXPR
+    iterator upper_bound(const K& key)
+    { return tree.upper_bound(key); }
+    template <typename K>
+    __GBLIBCPP_CONSTEXPR
+    const_iterator upper_bound(const K& key) const
+    { return tree.upper_bound(key); }
 
     __GBLIBCPP_CONSTEXPR
     iterator lower_bound(const Key& key)
@@ -197,6 +205,14 @@ public:
     __GBLIBCPP_CONSTEXPR
     const_iterator lower_bound(const Key& key) const
     { return tree.lower_bound(key); }
+    template <typename K>
+    __GBLIBCPP_CONSTEXPR
+    iterator lower_bound(const K& key)
+    { return tree.lower_bound(key); }
+    template <typename K>
+    __GBLIBCPP_CONSTEXPR
+    const_iterator lower_bound(const K& key) const
+    { return tree.lower_bound(key); }
 };
 
 template <typename Key, typename Compare, typename Allocator>