C++ syntax question about accessing members
Why is it wrong to access the fun()
function this way?
C++ syntax question about accessing members
Why is it wrong to access the fun()
function this way?
C++ syntax question about accessing members
Why is it wrong to access the fun()
function this way?
How do I replace a default int* argument and modify it in modern C++?
I’m looking at some C++ code that currently passes an int* array that can be null and does some logic. Let’s say it’s of the following form:
A reasonable conversion in the member function pointer but an error occurred?
I always thought that when I converted a member function ptr in C to a member function ptr in A, I just had to make sure that the call was pointing to an C entity , but that was a mistake. Does the standard describe this use case in more detail?(checked with multiple compilers)
Is it safe to specialize `std::numeric_limits` for `std::byte`?
I was surprised that std::numeric_limits<std::byte>::digits
returns 0
, when I was expecting 8
. I believe this is due to lacking specialization for std::byte
hence defaulting to the, well, default implementation that return 0
in this case.
How to wrap all API-calls in a uniform error-handler?
I’m dealing with a vendor-provided C-library (let’s call it foo
), that offers a multitude of API-calls. All of these functions take a (pre-initialized) handle (of type FOOHandle
) and return 0 on success, and some other number on failure. In the latter case, the caller can call the foo_get_errmsg()
to get the textual description of the error saved in his own buffer. Nothing too unusual.
Cannot access a private class even using a friend class [duplicate]
entity::entity cannot access private member declared in class “Entity”
Calculate tiles for L-shape [closed]
Closed 6 days ago.
Calculate tiles for L-shape [closed]
Closed 6 days ago.