]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp
re PR libstdc++/37144 (A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destr...
[thirdparty/gcc.git] / libstdc++-v3 / include / ext / pb_ds / detail / hash_fn / sample_ranged_probe_fn.hpp
index 2bcfdf51a5422452f9c2121ec938cc5ea792f2f0..b362f3d354fbf43ca4c307bb81c37fe794b05c2a 100644 (file)
 #ifndef PB_DS_SAMPLE_RANGED_PROBE_FN_HPP
 #define PB_DS_SAMPLE_RANGED_PROBE_FN_HPP
 
-// A sample ranged-probe functor.
-class sample_ranged_probe_fn
+namespace __gnu_pbds
 {
+  /// A sample ranged-probe functor.
+  class sample_ranged_probe_fn
+  {
+  public:
+    typedef std::size_t        size_type;
 
-public:
+    // Default constructor.
+    sample_ranged_probe_fn();
 
-  // Size type.
-  typedef std::size_t size_type;
+    // Copy constructor.
+    sample_ranged_probe_fn(const sample_ranged_probe_fn&);
 
-public:
+    // Swaps content.
+    inline void
+    swap(sample_ranged_probe_fn&);
 
-  // Default constructor.
-  sample_ranged_probe_fn();
+  protected:
 
-  // Copy constructor.
-  sample_ranged_probe_fn(const sample_ranged_probe_fn& other);
+    // Notifies the policy object that the container's __size has
+    // changed to size.
+    void
+    notify_resized(size_type);
 
-  // Swaps content.
-  inline void
-  swap(sample_ranged_probe_fn& other);
-
-protected:
-
-  // Notifies the policy object that the container's __size has changed to size.
-  void
-  notify_resized(size_type size);
-
-  // Transforms the const key reference r_key into the i-th position within the table. This method is called for each collision within the probe sequence.
-  inline size_type
-  operator()(const_key_reference r_key, std::size_t hash, size_type i) const;
-
-};
+    // Transforms the const key reference r_key into the i-th position
+    // within the table. This method is called for each collision within
+    // the probe sequence.
+    inline size_type
+    operator()(key_const_reference, std::size_t, size_type) const;
 
+  };
+}
 #endif // #ifndef PB_DS_SAMPLE_RANGED_PROBE_FN_HPP