EN VI
Posts (0)

No data results!

Please check back again in feature!

Questions (49)
2024-03-10 00:00:09
slide_view requires forward_range since the elements need to be traversed more than once. This is not the case for join_view in your case, because the latter joins a nested range whose elements are pr...
Tags: c++ c++20 std-ranges
2024-03-10 00:30:05
std::vector vBuffer(bytes); Your vector is empty because bytes is a TOCTOU race. You printed bytes, and it is likely 0. At least, for me it is: Success GET / HTTP/1.1 Host: example.com Connection...
Tags: c++ asio
2024-03-10 03:00:07
how do I detect which kind of data is being sent? The easiest way to do so would be to reserve the first byte (or n bytes) of your message for the type of message being sent. Here's your code with t...
Tags: c++ sockets qt5.15
2024-03-10 04:00:05
Regardless of the physical memory location, passing a large object by value normally forces it to be passed via stack, which means it needs to be copied there first which takes time. The object needs...
2024-03-10 18:00:08
It depends on what definitions are necessary in the header. Basically you may be able to use your own forward declarations of your own types. Otherwise you should typically use the PIMPL idiom, in thi...
Tags: c++ boost build
2024-03-10 23:00:04
If N_EBOS is 15, more than 1 that is, then the second argument of glGenBuffers must point to the first item of the array of at least this size, otherwise you'll get a buffer overflow. ::std::array ebo...
Tags: c++ opengl
2024-03-10 23:00:06
Assuming you fix the obvious syntax errors in your example: Explicit specializations of member function templates are also allowed in class scope. This has been clarified a long time ago, but it is a...
Tags: c++ templates friend
2024-03-11 17:00:05
Unfortunately type and non-type template (variadic) arguments do not mix well. For std::array you can add this: template inline unsigned ttypeid() { static unsigned id = gen_id(); return id;...
2024-03-11 19:00:04
Use decltype instead of typeof, and std::is_same_v instead of ==: static_assert(std::is_same_v); static_assert(std::is_same_v); Demo
Tags: c++
2024-03-12 00:30:07
I'd recommend changing the approach slightly, instead of having transform modify its argument, it should return a value that will replace in input. So you can have a set of overloads like this: std::s...

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login