Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions example/plugins/cpp-api/boom/boom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,13 @@ GlobalPlugin *plugin;
// Functor that decides whether the HTTP error can be rewritten or not.
// Rewritable codes are: 2xx, 3xx, 4xx, 5xx and 6xx.
// 1xx is NOT rewritable!
class IsRewritableCode
class IsRewritableCode : public std::unary_function<std::string, bool>
{ // could probably be replaced with mem_ptr_fun()..
private:
int current_code_;
std::string current_code_string_;

public:
using argument_type = std::string;
using result_type = bool;

explicit IsRewritableCode(int current_code) : current_code_(current_code)
{
std::ostringstream oss;
Expand Down
6 changes: 1 addition & 5 deletions include/tscore/IntrusivePtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,9 @@ template <typename T> class IntrusivePtrDefaultPolicy
static void finalize(T *t);

/// Strict weak order for STL containers.
class Order
class Order : public std::binary_function<IntrusivePtr<T>, IntrusivePtr<T>, bool>
{
public:
using first_argument_type = IntrusivePtr<T>;
using second_argument_type = IntrusivePtr<T>;
using result_type = bool;

/// Default constructor.
Order() {}
/// Compare by raw pointer.
Expand Down
10 changes: 2 additions & 8 deletions include/tscpp/api/Headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,12 @@ class HeaderField;
/**
* @brief A header field value iterator iterates through all header fields.
*/
class header_field_value_iterator
class header_field_value_iterator : public std::iterator<std::forward_iterator_tag, int>
{
private:
HeaderFieldValueIteratorState *state_;

public:
using iterator_category = std::forward_iterator_tag;
using value_type = int;

/**
* Constructor for header_field_value_iterator, this shouldn't need to be used directly.
* @param bufp the TSMBuffer associated with the headers
Expand Down Expand Up @@ -172,16 +169,13 @@ class header_field_value_iterator
/**
* @brief A header field iterator is an iterator that dereferences to a HeaderField.
*/
class header_field_iterator
class header_field_iterator : public std::iterator<std::forward_iterator_tag, int>
{
private:
HeaderFieldIteratorState *state_;
header_field_iterator(void *hdr_buf, void *hdr_loc, void *field_loc);

public:
using iterator_category = std::forward_iterator_tag;
using value_type = int;

~header_field_iterator();

/**
Expand Down
5 changes: 1 addition & 4 deletions iocore/net/quic/QUICFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,9 @@ class QUICAckFrame : public QUICFrame
class AckBlockSection
{
public:
class const_iterator
class const_iterator : public std::iterator<std::input_iterator_tag, QUICAckFrame::AckBlock>
{
public:
using iterator_category = std::input_iterator_tag;
using value_type = QUICAckFrame::AckBlock;

const_iterator(uint8_t index, const std::vector<QUICAckFrame::AckBlock> *ack_blocks);

const QUICAckFrame::AckBlock &
Expand Down
6 changes: 1 addition & 5 deletions lib/swoc/include/swoc/DiscreteRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,7 @@ template <typename T> class DiscreteRange {
The first pair of elements that are not equal determine the ordering
of the overall tuples.
*/
struct lexicographic_order {
using first_argument_type = self_type;
using second_argument_type = self_type;
using result_type = bool;

struct lexicographic_order : public std::binary_function<self_type, self_type, bool> {
//! Functor operator.
bool operator()(self_type const &lhs, self_type const &rhs) const;
};
Expand Down
6 changes: 1 addition & 5 deletions src/tscore/HostLookup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,7 @@ struct CharIndexBlock {
class CharIndex
{
public:
struct iterator {
using iterator_category = std::forward_iterator_tag;
using value_type = HostBranch;
using difference_type = int;

struct iterator : public std::iterator<std::forward_iterator_tag, HostBranch, int> {
using self_type = iterator;

struct State {
Expand Down
6 changes: 1 addition & 5 deletions src/wccp/WccpMeta.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ template <bool VALUE> struct TEST_IF_TRUE : public TEST_RESULT<TEST_BOOL<VALUE>>
};

// Helper for assigning a value to all instances in a container.
template <typename T, typename R, typename A1> struct TsAssignMember {
using first_argument_type = T;
using second_argument_type = A1;
using result_type = R;

template <typename T, typename R, typename A1> struct TsAssignMember : public std::binary_function<T, A1, R> {
R T::*_m;
A1 _arg1;
TsAssignMember(R T::*m, A1 const &arg1) : _m(m), _arg1(arg1) {}
Expand Down