chromium/net/third_party/quiche/src/quiche/quic/core/quic_arena_scoped_ptr.h

// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// unique_ptr-style pointer that stores values that may be from an arena. Takes
// up the same storage as the platform's native pointer type. Takes ownership
// of the value it's constructed with; if holding a value in an arena, and the
// type has a non-trivial destructor, the arena must outlive the
// QuicArenaScopedPtr. Does not support array overloads.

#ifndef QUICHE_QUIC_CORE_QUIC_ARENA_SCOPED_PTR_H_
#define QUICHE_QUIC_CORE_QUIC_ARENA_SCOPED_PTR_H_

#include <cstdint>  // for uintptr_t

#include "quiche/quic/platform/api/quic_export.h"
#include "quiche/quic/platform/api/quic_logging.h"

namespace quic {

template <typename T>
class QUICHE_NO_EXPORT QuicArenaScopedPtr {};

template <typename T>
bool operator==(const QuicArenaScopedPtr<T>& left,
                const QuicArenaScopedPtr<T>& right) {}

template <typename T>
bool operator!=(const QuicArenaScopedPtr<T>& left,
                const QuicArenaScopedPtr<T>& right) {}

template <typename T>
bool operator==(std::nullptr_t, const QuicArenaScopedPtr<T>& right) {}

template <typename T>
bool operator!=(std::nullptr_t, const QuicArenaScopedPtr<T>& right) {}

template <typename T>
bool operator==(const QuicArenaScopedPtr<T>& left, std::nullptr_t) {}

template <typename T>
bool operator!=(const QuicArenaScopedPtr<T>& left, std::nullptr_t) {}

template <typename T>
QuicArenaScopedPtr<T>::QuicArenaScopedPtr() :{}

template <typename T>
QuicArenaScopedPtr<T>::QuicArenaScopedPtr(T* value)
    :{}

template <typename T>
template <typename U>
QuicArenaScopedPtr<T>::QuicArenaScopedPtr(QuicArenaScopedPtr<U>&& other)
    : value_(other.value_) {}

template <typename T>
template <typename U>
QuicArenaScopedPtr<T>& QuicArenaScopedPtr<T>::operator=(
    QuicArenaScopedPtr<U>&& other) {}

template <typename T>
QuicArenaScopedPtr<T>::~QuicArenaScopedPtr() {}

template <typename T>
T* QuicArenaScopedPtr<T>::get() const {}

template <typename T>
T& QuicArenaScopedPtr<T>::operator*() const {}

template <typename T>
T* QuicArenaScopedPtr<T>::operator->() const {}

template <typename T>
void QuicArenaScopedPtr<T>::swap(QuicArenaScopedPtr& other) {}

template <typename T>
bool QuicArenaScopedPtr<T>::is_from_arena() {}

template <typename T>
void QuicArenaScopedPtr<T>::reset(T* value) {}

template <typename T>
QuicArenaScopedPtr<T>::QuicArenaScopedPtr(void* value, ConstructFrom from_arena)
    :{}

}  // namespace quic

#endif  // QUICHE_QUIC_CORE_QUIC_ARENA_SCOPED_PTR_H_