-// Copyright (C) 2009-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009-2022 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// The template parameter is either \c QuestionPtr (for the question section)
/// or \c RRsetPtr (for the answer, authority, or additional section).
template <typename T>
-class SectionIterator : public std::iterator<std::input_iterator_tag, T> {
+class SectionIterator {
public:
+ // Aliases used to enable iterator behavior on this class
+ using iterator_category = std::input_iterator_tag;
+ using value_type = T;
+ using difference_type = std::ptrdiff_t;
+ using pointer = T*;
+ using reference = T&;
+
SectionIterator() : impl_(NULL) {}
SectionIterator(const SectionIteratorImpl<T>& impl);
~SectionIterator();
/// \return A reference to the same \c std::ostream object referenced by
/// parameter \c os after the insertion operation.
std::ostream& operator<<(std::ostream& os, const Message& message);
-}
-}
-#endif // MESSAGE_H
-// Local Variables:
-// mode: c++
-// End:
+} // namespace dns
+} // namespace isc
+
+#endif // MESSAGE_H
-// Copyright (C) 2012-2015,2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2022 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
///
/// It behaves like a \c std::iterator forward iterator, so please
/// see its documentation for usage.
- class Iterator : std::iterator<std::forward_iterator_tag,
- const isc::dns::AbstractRRset>
- {
+ class Iterator {
public:
+ // Aliases used to enable iterator behavior on this class
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = isc::dns::AbstractRRset const;
+ using difference_type = std::ptrdiff_t;
+ using pointer = isc::dns::AbstractRRset const*;
+ using reference = isc::dns::AbstractRRset const&;
+
explicit Iterator(IterPtr iter) :
iter_(iter)
{}
} // end of namespace isc
#endif // RRSET_COLLECTION_BASE_H
-
-// Local Variables:
-// mode: c++
-// End:
-// Copyright (C) 2010-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2022 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// Note: this class is intended to be used within this implementation file,
// and assumes "base < base_end" on construction without validating the
// arguments. The behavior is undefined if this assumption doesn't hold.
-class EncodeNormalizer : public iterator<input_iterator_tag, uint8_t> {
+class EncodeNormalizer {
public:
+ // Aliases used to enable iterator behavior on this class
+ using iterator_category = input_iterator_tag;
+ using value_type = uint8_t;
+ using difference_type = ptrdiff_t;
+ using pointer = uint8_t*;
+ using reference = uint8_t&;
+
EncodeNormalizer(const vector<uint8_t>::const_iterator& base,
const vector<uint8_t>::const_iterator& base_end) :
base_(base), base_end_(base_end), in_pad_(false)
// and for simplicity assumes "base < base_beginpad <= base_end" on
// construction without validating the arguments. The behavior is undefined
// if this assumption doesn't hold.
-class DecodeNormalizer : public iterator<input_iterator_tag, char> {
+class DecodeNormalizer {
public:
+ // Aliases used to enable iterator behavior on this class
+ using iterator_category = input_iterator_tag;
+ using value_type = char;
+ using difference_type = ptrdiff_t;
+ using pointer = char*;
+ using reference = char&;
+
DecodeNormalizer(const char base_zero_code,
const string::const_iterator& base,
const string::const_iterator& base_beginpad,