814,700 questions
Advice
0
votes
1
replies
63
views
Is there an existing C or C++ interface to Pollen Robotics' RustyPot servo controller?
I have been using RustyPot from Python using the automatically generated Python bindings, but I'd really like to also use the High-Level API from C or C++. I'm completely unfamiliar with Rust ...
0
votes
0
answers
76
views
Shared Python Swig Modules [closed]
I have a complex C++ application (call it foo) that exposes an API that is wrapped for Python via Swig.
This provides a 'statefull' library -- i.e. large amounts of complex data are kept on the C++ ...
0
votes
1
answer
136
views
C++ Cast base class unique_ptr to derived class unique_ptr [duplicate]
I have a method in a derived class which I want to call via a unique_ptr to the base class.
How do I cast my unique_ptr to the base class to allow me to call the method in the derived class?
In ...
Advice
3
votes
2
replies
108
views
What Windows API should I use to create a blurred window?
I want to create a panel (a top-level window) looking the same as backdrop-filter: blur(Npx); in CSS).
The window should at least have rounded corners or be custom-shaped (ultimately).
On top of the ...
3
votes
1
answer
207
views
Am I understanding the “no effects” guarantee in the C++ standard correctly?
For some library functions, the C++ standard (conditionally) prescribes the strong exception guarantee in terms of “no effects”. This holds, for example, for std::vector::reserve [vector.capacity/4/4]:...
1
vote
0
answers
74
views
How to avoid the dialog box "No symbols found" in case a symbol file is not found in Visual Studio 2022?
I'm debugging a C++ dump in Visual Studio 2022. My symbol servers are defined.
When I ask to load the symbols, I want Visual Studio to try to find the symbols in the locations I've provided, and in ...
-4
votes
0
answers
110
views
Issue with a vector<node*> pointers [closed]
I'm trying to make a doubly linked hash table, sort of. At least, within each bucket it is doubly linked.
My issue is when I am trying to assign the next/previous pointer to of the top of the bucket. ...
Advice
0
votes
11
replies
127
views
Are lookup tables for case-converting, ASCII only characters [0,127] faster than arithmetic operation?
Imagine I have a long string 10 kb characters, filled with random ASCII characters.
And I want to lowercase them. One way i could do that is by using a simple operation like:
inline char lowercase(...
4
votes
2
answers
160
views
Sort of reverse Argument Dependent Lookup in C++
I am pretty sure the feature I am looking for doesn't exist in C++, but maybe there are smart alternatives that do something similar.
In C++, we have Argument Dependent Lookup (ADL) feature, also ...
Advice
2
votes
7
replies
107
views
Pool multiple events and await the first one in C++
If I had multiple sockets to wait for information from, on a POSIX system I would use poll on multiple pollfd for POLLIN roughly as follows...
struct pollfd pollFds[2] = {};
pollFd[0].fd = socket_0;
...
9
votes
1
answer
495
views
GCC rejects passing function pointer as argument to variadic function template parameter with const parameter
I wrote the following program, which is accepted by clang and msvc, but is rejected by gcc.
Demo
template<typename... T>
double BigFunction(double (*func)(const T...), double var)
{
return {}...
4
votes
4
answers
295
views
Best way to handle similar type of function without writing them again in C++
I have a C++ function that looks something like this:
double BigFunction(double (*func)(double), double var)
{
// calculations that only use "var" variable
double var3 = func(var2);
...
13
votes
1
answer
611
views
Why is a call to `copy_n` ambiguous between `std::copy_n` and `__gnu_cxx::copy_n` in GCC 9, but not in GCC 13?
The following code produces a compilation error in g++-9:
#include <ext/algorithm>
#include <algorithm>
#include <vector>
int main() {
std::vector<unsigned int> a[3], b[3];...
-3
votes
0
answers
108
views
issuing EOF in debug vs in run mode c++ [closed]
i'm wondering why issuing an EOF to stop the loop in run mode will result in the program terminated but in debug mode it will just exist the loop.
I'm using Clion as my IDE (send EOF using shortkey in ...
-1
votes
0
answers
82
views
Missing std::ostringstream after upgrading Fedora 43 -> 44 [closed]
After upgrading Fedora 43 -> 44, I can't compile a C++ cmake project in Eclipse CDT.
I am using these lines for downloading a file:
try {
==> std::ostringstream result;
curlpp::Cleanup ...