Am 03.10.2017 um 11:35 schrieb Raphael Neider:
> Hi,
> 
> On Oct 3, 2017 10:33, "Philipp Klaus Krause" <p...@spth.de
> <mailto:p...@spth.de>> wrote:
> 
>     Am 01.10.2017 um 23:40 schrieb alvin albrecht:
>     >
>     > I have a couple of compile issues using vs2015 with the current
>     version
>     > 10024.
>     >
>     > (1)
>     > In sdcc/src/SDCCralloc.hpp line 618, the compiler complains that there
>     > is an attempt to use deleted operator=.
>     > Line 591 gives the option to use alternative code and if I set the
>     IF to
>     > 0, the compile is fine.
>     >
>     > C:\Program Files (x86)\Microsoft Visual Studio
>     > 14.0\VC\include\xutility(458): error C2280:
>     > 'assignments_introduce_instruction::inserter_t
>     > &assignments_introduce_instruction::inserter_t::operator =(const
>     > assignments_introduce_instruction::inserter_t &)': attempting to
>     > reference a deleted function
>     >
>     > 2> C:\Projects\z80\z88dk\zsdcc\sdcc\src\SDCCralloc.hpp(618): note:
>     > compiler has generated
>     > 'assignments_introduce_instruction::inserter_t::operator =' here
>     >
>     > 2> C:\Program Files (x86)\Microsoft Visual Studio
>     > 14.0\VC\include\algorithm(3211): note: see reference to function
>     > template instantiation '_Iter &std::_Rechecked<_OutIt,_OutIt>(_Iter
>     > &,_UIter)' being compiled
> 
>     I don't think I know C++ well enough to really see what's going on here.
>     But it seems GCC 7 doesn't complain about that code, even when using
>     -pedantic --std=c++11 -Wall.
>     So maybe we just make the alternative code the default for Microsoft
>     Visual C++?
> 
> 
> To me this looks as if Microsoft generates the operator=(iterator_t
> &rhs) for our local struct as deleted, possibly because we do define
> some constructors and/or operator=() overloads. Manually providing an
> implementation of said (copy-)assignment operator - copying all fields
> from rhs to *this - might do the trick...
> The copy assignment operator is likely required for the (unused) return
> value of set_intersection().
> 
> Best regards,
> Raphael

I thought copy asignment opertators were only generated as deleted if
there is a user-declared move constructor. But the constructor that I
declared is not a move constructor.

For now (revision 10033) I just implemented the simple workaround of
replacing

#if 1

by

#if !defined(_MSC_VER)

Philipp

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to