Skip to content

Commit

Permalink
Assignment operator template caused ambiguity error in MSVC build - d…
Browse files Browse the repository at this point in the history
…rop it, it's strictly not necessary.
  • Loading branch information
dok-net committed Dec 24, 2019
1 parent fd72c17 commit a807d50
Showing 1 changed file with 0 additions and 86 deletions.
86 changes: 0 additions & 86 deletions src/circular_queue/Delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,6 @@ namespace detail
return *this;
}

template<typename F> DelegatePImpl& operator=(F functional)
{
if (FUNC != kind)
{
if (FPA == kind)
{
obj.~A();
}
new (&this->functional) FunctionType();
kind = FUNC;
}
this->functional = std::forward<F>(functional);
return *this;
}

DelegatePImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FUNC == kind)
Expand Down Expand Up @@ -491,17 +476,6 @@ namespace detail
return *this;
}

template<typename F> DelegatePImpl& operator=(F fn)
{
if (FPA == kind)
{
obj = {};
}
kind = FP;
this->fn = std::forward<F>(fn);
return *this;
}

DelegatePImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FPA == kind)
Expand Down Expand Up @@ -701,17 +675,6 @@ namespace detail
return *this;
}

template<typename F> DelegatePImpl& operator=(F functional)
{
if (FUNC != kind)
{
new (&this->functional) FunctionType();
kind = FUNC;
}
this->functional = std::forward<F>(functional);
return *this;
}

DelegatePImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FUNC == kind)
Expand Down Expand Up @@ -852,12 +815,6 @@ namespace detail
return *this;
}

template<typename F> DelegatePImpl& operator=(F fn)
{
DelegatePImpl::fn = std::forward<F>(fn);
return *this;
}

DelegatePImpl& IRAM_ATTR operator=(std::nullptr_t)
{
fn = nullptr;
Expand Down Expand Up @@ -1075,21 +1032,6 @@ namespace detail
return *this;
}

template<typename F> DelegateImpl& operator=(F functional)
{
if (FUNC != kind)
{
if (FPA == kind)
{
obj.~A();
}
new (&this->functional) FunctionType();
kind = FUNC;
}
this->functional = std::forward<F>(functional);
return *this;
}

DelegateImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FUNC == kind)
Expand Down Expand Up @@ -1334,17 +1276,6 @@ namespace detail
return *this;
}

template<typename F> DelegateImpl& operator=(F fn)
{
if (FPA == kind)
{
obj = {};
}
kind = FP;
this->fn = std::forward<F>(fn);
return *this;
}

DelegateImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FPA == kind)
Expand Down Expand Up @@ -1543,17 +1474,6 @@ namespace detail
return *this;
}

template<typename F> DelegateImpl& operator=(F functional)
{
if (FUNC != kind)
{
new (&this->functional) FunctionType();
kind = FUNC;
}
this->functional = std::forward<F>(functional);
return *this;
}

DelegateImpl& IRAM_ATTR operator=(std::nullptr_t)
{
if (FUNC == kind)
Expand Down Expand Up @@ -1694,12 +1614,6 @@ namespace detail
return *this;
}

template<typename F> DelegateImpl& operator=(F fn)
{
DelegateImpl::fn = std::forward<F>(fn);
return *this;
}

DelegateImpl& IRAM_ATTR operator=(std::nullptr_t)
{
fn = nullptr;
Expand Down

0 comments on commit a807d50

Please sign in to comment.