Home » U++ Library support » U++ Core » Big issue with Visual Studio 2019 (some versions)
Big issue with Visual Studio 2019 (some versions) [message #53011] |
Sat, 08 February 2020 02:19  |
 |
Alboni
Messages: 216 Registered: January 2012 Location: Kajaani, Finland
|
Experienced Member |
|
|
Hello,
There is a big issue with Visual Studio 2019 (some versions)
The example gives a warning and with reason
It may seem like a small issue but it'd not. This is used all over UPP and TheIde.
I can't compile a working non crashing version of TheIde (and my sofware) with it.
It's roulette whether it works or not. On my collegues computer it works, on mine it doesn't
See example below.
#include <Core/Core.h>
using namespace Upp;
// this construction is used a lot in upp
String SomeFunction()
{
StringBuffer s;
s.Cat("M\0nkey", 6); // some binary data
return s; // warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied
// this contruction (returning a StringBuffer to a String return type) is used a LOT in UPP
// it relies on the constructor of String(StringBuffer& ) to do the copying
// However another path is from StringBuffer::Begin() -> String::String(const char*)
// this however does not work for binary data (containing a 0)
// Visual Studio 2019 picks the first or the second option depending on which *EXACT* version of it you're using, and gives this warning that it flipped a coin
// IT IS NOT A BENIGN WARNING! It's roulette if the software works or not.
// I cannot compile a stable executable of TheIde with VS2019 on my computer. It just keeps
// crashing. My collegue can.
}
CONSOLE_APP_MAIN
{
String rv = SomeFunction();
Cout() << rv.GetCount() << "\r\n"; // Should print 6, but prints 1
}
[Updated on: Sat, 08 February 2020 11:52] Report message to a moderator
|
|
|
 |
|
Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sat, 08 February 2020 02:19
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sat, 08 February 2020 11:50
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Sat, 08 February 2020 11:55
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sat, 08 February 2020 13:02
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sat, 08 February 2020 13:10
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sat, 08 February 2020 13:17
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Sun, 09 February 2020 10:34
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sun, 09 February 2020 14:33
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Mon, 10 February 2020 10:32
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Sun, 09 February 2020 14:35
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Mon, 10 February 2020 10:58
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Mon, 10 February 2020 11:50
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Wed, 29 July 2020 10:32
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: JeyCi on Thu, 20 March 2025 06:58
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Thu, 20 March 2025 13:38
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Thu, 20 March 2025 15:37
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Thu, 20 March 2025 21:12
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Wed, 29 July 2020 14:17
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: mirek on Wed, 23 September 2020 12:45
|
 |
|
Re: Big issue with Visual Studio 2019 (some versions)
By: Alboni on Wed, 29 July 2020 14:27
|
Goto Forum:
Current Time: Mon May 12 05:47:20 CEST 2025
Total time taken to generate the page: 0.04898 seconds
|