Skip to main content
Filter by
Sorted by
Tagged with
6 votes
1 answer
67 views

Any function declared in a C++20 module seems to get mangled in a way that includes the module name. For example: export module A; export void a(int); int main() { a(42); } This a gets mangled ...
HolyBlackCat's user avatar
0 votes
1 answer
67 views

There is a similar post but it doesn't help. The solution in that post is that it was a gcc bug which was fixed. Does gcc 15.2 has the bug again? I receive for the below code snapshot these error ...
Peter VARGA's user avatar
  • 5,352
1 vote
0 answers
32 views

I have a shared library project libproj which needs to be added as a dependency to a binary project binproj, where it needs to include the library header files, for this I'm using cmake find_package ...
Harry's user avatar
  • 4,377
1 vote
1 answer
44 views

Coming here from codereview. I was trying to implement a multiple producer single consumer (MPSC) queue using atomics. Currently, I am facing some race condition that I am having difficulty solving. ==...
kiner_shah's user avatar
  • 4,843
0 votes
0 answers
29 views

I actually have what I want working in Python with PySide and edsdk-python, however I am trying to get this working in C++ and stumbling on the decoding of the memory stream data. Here is the relevant ...
Marshall Eubanks's user avatar
1 vote
1 answer
105 views

MRE: #include <unordered_map> #include <string> class MyClass { private: std::unordered_map<std::string, int> myMap; public: MyClass() : myMap() {} }; int main() { ...
FluidMechanics Potential Flows's user avatar
0 votes
2 answers
149 views

I'm working on a C++ program for a college project, and I have the following code written down: const wchar_t g_szClassName[] = L"myWindowClass"; // Step 4: the Window Procedure LRESULT ...
Nathan Rasmussen's user avatar
0 votes
0 answers
48 views

In my project, the Rust binary rust-bin needs to link to a C++ shared library sub-project cpp-lib, for which I'm using cmake rust crate as a build dependency. The entire project builds fine, but the C+...
Harry's user avatar
  • 4,377
Best practices
0 votes
5 replies
93 views

I am a newbie and I want to connect with my OPC server by means of c++. Please write me a code and talk my which library is good. I use a .NET framework too. Write to me a easy launguage, because I am ...
Kamil's user avatar
  • 1
0 votes
1 answer
102 views

I use GCC15. I want to use the C++26 feature std::views::concat. Now I'm using VSCode and the extensions "C/C++" and "CMake". This is my code main.cpp: #include <ranges> #...
GKxx's user avatar
  • 789
Best practices
1 vote
6 replies
103 views

I'm trying to find a best-practice method to handle an edge case when a hardware clock timer wraps around and the overflown value generates a false positive logic match. For example, on a 16 MHz chip, ...
zero-day's user avatar
  • 402
1 vote
1 answer
162 views

I've checked the std::unordered_map documentation, and it still doesn't give me an answer on how to change the starting size of an unordered_map. I may or may not use an allocator, but I'm not sure ...
Samuel Scott's user avatar
Advice
0 votes
11 replies
159 views

I wrote the below test code. As can be seen, I can use default arguments for a traditional function call, but not for invoking a std::function object (if I were to uncomment the commented out ...
Vinod's user avatar
  • 1,249
0 votes
0 answers
93 views

I have a templated base class which looks like this: enum class PushConstantType { vec1, vec2, vec4 }; template<typename T, PushConstantType P> struct PushConstant { PushConstant<T, P>...
alexpanter's user avatar
  • 1,666
-2 votes
0 answers
81 views

I am trying to append to a string in a constexpr function, it seems to fail once the string grows to 16 characters and it does this consistently under MSVC, GCC and Clang. Reserve doesn't help. #...
David Carpenter's user avatar

15 30 50 per page
1
2 3 4 5
54325