Search:
Type: Posts; User: 2kaud
Search:
Search took 0.17 seconds.
-
March 6th, 2021, 05:21 AM
The code compiles OK with both gcc and clang as C++17 or as C++20 with a change for unique. See https://wandbox.org/permlink/tfhEOLLXuzGTdh7J
The issue is only with VS. Hence I've moved this to...
-
March 5th, 2021, 05:06 AM
I'd change it to C++17 - and re-compile everything.
This C++17 example code demonstrates the problem:
#include <list>
using LT = std::list<int>;
using func_t = void(LT::*)();
-
March 4th, 2021, 12:01 PM
In VS2019, for the project/properties/general/C++ Language standard
What's the value? Preview means using C++20 which has return values for these functions. C++17 and previous had return void for...
-
March 4th, 2021, 10:51 AM
That's probably the issue. All the lines which now don't compile are those that reference functions that no longer return void, but have a return value - as of C++20! eg for C++20, unique() returns a...
-
March 4th, 2021, 08:52 AM
What version of lua are you using? The latest version is 5.4.2
There's also info on the internet as to how to use lua with C++ and classes as lua seems to be written in C. I've never used it.
-
March 4th, 2021, 08:38 AM
My response in my post #2 is based upon what I remember reading some time ago (MSDN blog post?) about some changes to the way Microsoft implement some class member functions which would have some...
-
March 4th, 2021, 07:38 AM
I think that this is due to changes in the stl implementation that means that some stl class members are no longer 'true functions' ie functions to which an address can be taken. There's nothing in...
-
March 3rd, 2021, 06:54 AM
operator() needs to be declared const
bool operator()(const int* p1, const int* p2) const
-
March 2nd, 2021, 08:10 AM
John, please don't ask different questions in the same post. It's better to start a new post for each new question.
-
March 2nd, 2021, 07:29 AM
The assert is correct even if reserve is used. All reserve() does is to allocate memory (which MSVC does). It doesn't add any elements. If you just reserve and don't add any elements, then .size()...
-
March 2nd, 2021, 04:15 AM
NO. Don't do it. Don't use a std::string (or any non POD type) in a union. If you want these three types, use a std::variant with C++17.
I know you said you use C++11, but that is now over 9 years...
-
March 1st, 2021, 04:45 AM
In which case you can't use templates.
If the compiler doesn't know the type at compile time, you're very limited as to what you can do. C++ is a strictly typed language.
If you update to a...
-
February 28th, 2021, 12:04 PM
auto itr = std::find_if......
The scope of this itr only exists until the block closing }. It does not extend to the while clause. The itr used in the while clause is the same as that defined...
-
February 28th, 2021, 07:22 AM
Where was the constellation of the planets and what was the phase of the moon when this event took place? :d
I'm assuming because of the previous posts, that the function that isn't exported has...
-
February 28th, 2021, 05:17 AM
Use LoadLibrary()/GetProcAddress() to specify which one to use.
-
February 23rd, 2021, 12:23 PM
For differences between the various versions of VS2019, see https://www.tektutorialshub.com/visual-studio/difference-between-visual-studio-2019-community-vs-professional-vs-enterprise/
-
February 21st, 2021, 05:59 AM
Have you tried creating a completly new solution with just the existing source files? IMO there's a solution file used in debugging that contains a wrong file reference. Try doing a file search for...
-
February 20th, 2021, 07:43 AM
Just for interest/info - we stopped creating .dll's several years ago. We also stopped splitting classes into header/implementation files. Everything is now in .hpp files that are included as needed...
-
February 20th, 2021, 07:26 AM
PS Has this fixed the previous error with the debug build with the missing subfolder? [ https://forums.codeguru.com/showthread.php?565257-Strange-crash-with-Debug-build ]
-
February 20th, 2021, 05:18 AM
Under SDK's, libraries and frameworks - I have:
C++ ATL for latest v142 build tools (x86 & x64)
Windows 10 SDK (10.0.19041.0)
-
February 19th, 2021, 12:08 PM
Yeah - Several C++ questions asked in this forum should be asked in the C++ (Non-visual C++ Issues) forum.
-
February 19th, 2021, 09:10 AM
If both were built with VS2019, then I don't know. Other than there seems to be something wrong with your VS install. I'd be tempted to completely remove it and re-install from scratch. Have you got...
-
February 19th, 2021, 08:50 AM
Yes - for OLE automation. There's quite a few different types - BSTR possibly being the most well known. They are not part of C++ though. These were developed by MS to help with interoperability with...
-
February 19th, 2021, 08:34 AM
yes - probably because of different versions of std::stringstream exe/dll. You can't mix versions! This is the sort of thing that was called 'dll hell'! In the above, std::stringstream default...
-
February 19th, 2021, 06:11 AM
|
Click Here to Expand Forum to Full Width
On-Demand Webinars (sponsored)
|