Skip to content

Commit

Permalink
Refactor tracker_ref a little to avoid Internal Compiler Error in VS …
Browse files Browse the repository at this point in the history
…16.4 (#1716)
  • Loading branch information
jevansaks committed Dec 17, 2019
1 parent 7f352d8 commit 3ee4aa0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions dev/inc/tracker_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

#include "SharedHelpers.h"

struct __declspec(novtable) ITrackerHandleManager
{
virtual ~ITrackerHandleManager() = default;
Expand Down Expand Up @@ -78,13 +80,6 @@ struct __declspec(novtable) ITrackerHandleManager
bool m_wasEnsureCalled{};
#endif

// Specifies if this instance is composed by an outer object.
// Only returns true if this is an AggregableComObject<T> instance.
virtual bool IsComposed()
{
return false;
}

protected:
::ITrackerOwner* m_trackerOwnerInnerNoRef{ nullptr };
};
Expand Down Expand Up @@ -128,9 +123,10 @@ enum class TrackerRefFallback
FallbackToComPtrBeforeRS4
};

template<typename T, TrackerRefFallback fallback = TrackerRefFallback::None, typename RawStorageT = ::IUnknown*, typename IUnknownAccessorT = typename IUnknownAccessor<T>>
template<typename T, TrackerRefFallback fallback = TrackerRefFallback::None, typename RawStorageT = ::IUnknown*>
class tracker_ref sealed
{
using IUnknownAccessorT = typename IUnknownAccessor<T>;
public:
explicit tracker_ref(const ITrackerHandleManager* owner)
{
Expand Down

0 comments on commit 3ee4aa0

Please sign in to comment.