godot/thirdparty/embree/common/sys/ref.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "atomic.h"

namespace embree
{
  struct NullTy {};

  extern MAYBE_UNUSED NullTy null;
  
  class RefCount
  {};
  
  ////////////////////////////////////////////////////////////////////////////////
  /// Reference to single object
  ////////////////////////////////////////////////////////////////////////////////

  template<typename Type>
  class Ref
  {};

  template<typename Type> __forceinline bool operator < (const Ref<Type>& a, const Ref<Type>& b) {}

  template<typename Type> __forceinline bool operator ==(const Ref<Type>& a, NullTy            ) {}
  template<typename Type> __forceinline bool operator ==(NullTy            , const Ref<Type>& b) {}
  template<typename Type> __forceinline bool operator ==(const Ref<Type>& a, const Ref<Type>& b) {}

  template<typename Type> __forceinline bool operator !=(const Ref<Type>& a, NullTy            ) {}
  template<typename Type> __forceinline bool operator !=(NullTy            , const Ref<Type>& b) {}
  template<typename Type> __forceinline bool operator !=(const Ref<Type>& a, const Ref<Type>& b) {}
}