// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2005-2023 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
#ifndef PB_DS_SAMPLE_UPDATE_POLICY_HPP
#define PB_DS_SAMPLE_UPDATE_POLICY_HPP
-// A sample list-update policy.
-struct sample_update_policy
+namespace __gnu_pbds
{
- // Default constructor.
- sample_update_policy();
+ /// A sample list-update policy.
+ struct sample_update_policy
+ {
+ /// Default constructor.
+ sample_update_policy();
- // Copy constructor.
- sample_update_policy(const sample_update_policy&);
+ /// Copy constructor.
+ sample_update_policy(const sample_update_policy&);
- // Swaps content.
- inline void
- swap(sample_update_policy& other);
+ /// Swaps content.
+ inline void
+ swap(sample_update_policy& other);
-protected:
- // Metadata on which this functor operates.
- typedef some_metadata_type metadata_type;
+ protected:
+ /// Metadata on which this functor operates.
+ typedef some_metadata_type metadata_type;
- // Creates a metadata object.
- metadata_type
- operator()() const;
+ /// Creates a metadata object.
+ metadata_type
+ operator()() const;
- // Decides whether a metadata object should be moved to the front of
- // the list. A list-update based containers object will call this
- // method to decide whether to move a node to the front of the
- // list. The method shoule return true if the node should be moved
- // to the front of the list.
- bool
- operator()(metadata_reference) const;
-};
-
-#endif
+ /// Decides whether a metadata object should be moved to the front
+ /// of the list. A list-update based containers object will call
+ /// this method to decide whether to move a node to the front of
+ /// the list. The method shoule return true if the node should be
+ /// moved to the front of the list.
+ bool
+ operator()(metadata_reference) const;
+ };
+}
+#endif