Quantcast
Channel: User xaxxon - Stack Overflow
Browsing all 73 articles
Browse latest View live

Comment by xaxxon on Why is it a syntax error to use explicit object...

"this" is a variable not a type. You don't put variables in types unless you're decltype-ing with it

View Article



Comment by xaxxon on How 'undefined' a race condition can be?

The reason you're getting so much push back on your question is that there's no good reason to ask this but LOTS of bad reasons to ask it. Nothing about the answer to this question should be used for...

View Article

Comment by xaxxon on How 'undefined' a race condition can be?

in your example, the program doesn't know that getfoo will return zero, so it has to take at least one more step of the loop is either never run or an infinite loop.

View Article

Comment by xaxxon on Is it dangerous to print random pointers? (Windows 10, x64)

"proceeds to read every byte in the my machine's memory" no it doesn't. Your program doesn't have access to every byte in your machine's memory. Pointers don't point to addresses in system memory. They...

View Article

Comment by xaxxon on Why would adding the "noexcept" keyword hurt a functions...

"The best way to performance test a function like this is to look at its optimized, un-inlined assembly" in trivial cases, that's true. In non-trivial cases it quickly becomes nearly impossible. The...

View Article


Comment by xaxxon on Lambda capture with std::move and this

Please make sure to remove all code irrelevant to reproducing your problem. This question has way too much extraneous code.

View Article

Comment by xaxxon on Object Gets De-Referenced After Being Defined In A...

as @user12002570 said, please provide a reproduction and remove all unnecessary code, as well. You'll likely find your problem as you try to reproduce this and start removing code that seems ancillary...

View Article

Comment by xaxxon on Cannot get Eigen to multithread

@tom1989 you need to have one section of code in your question that can be copy/pasted and compiled directly that has the minimal code necessary to reproduce the problem. However, I don't see anything...

View Article


Comment by xaxxon on C++ palindrome function

Please make sure not to downvote questions that don't violate rules. Just because you think it's easy or something doesn't make it a bad question.

View Article


Comment by xaxxon on How does data type assignment works?

You just follow basic precedence. You wouldn't assign 4 to d0 before dividing it. You divide first. And you can't divide a float by an integer, so why would you do the less precise one?

View Article

Comment by xaxxon on How do I make use of a core dump to find application...

"teach me to use a debugger" is way too broad for a stack overflow question. Just search for "gdb core dump"

View Article

Answer by xaxxon for What is the use of const in the given function when the...

methods not marked const cannot be called on a const object (or ref or pointer to a const object). StatDemo sd;StatDemo const & sdr = sd;sdr.get(x); // error because getx isn't marked constHowever,...

View Article

Answer by xaxxon for Thread safe queue gives segmentation fault

std::unique_ptr<ThreadSafeQueue<std::stringstream>> logMessages;You never allocated memory for this variable. It's not pointing to a ThreadSafeQueue<> objectMaybeauto logMessages =...

View Article


Trying to validate any ARM Template but getting: 'Error converting value to...

I'm trying to validate an arm template - ANY arm template - but I always get the same error:The request content was invalid and could not be deserialized: 'Error converting value "{...}" to type...

View Article

Answer by xaxxon for Trying to validate any ARM Template but getting: 'Error...

According to the docs:template object The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a...

View Article


Answer by xaxxon for `enable_if()` to disable static member function...

Enable_if only works in deduced contexts. In your example, the deduction is done at class type time. By the time you get to the functions, T is already known, so there isn't anything to deduce.You can...

View Article

Answer by xaxxon for Copy a git repo without history

Isn't this exactly what squashing a rebase does? Just squash everything except the last commit and then (force) push it.

View Article


Answer by xaxxon for How network event FD_WRITE is generated when using Event...

FD_WRITE means you can write to the socket right now. If the send buffers fill up (you're sending data faster than it can be sent on the network), eventually you won't be able to write anymore until...

View Article

Answer by xaxxon for Explicit specialization - template-id does not match any...

Your template returns the type T and takes a type T* but your specialization returns the same type as it takes, so it doesn't match. If you specialize for T=char*, then it needs to take a T* (char**)...

View Article

Image may be NSFW.
Clik here to view.

CLion 2017.3 unable to autocomplete through unique_ptr using clang 5 (works...

edit: scroll to bold section below for current status.CLion seems to be unable to autocomplete members of a type pointed to by a unique_ptr in clang 5. I either get "no suggestions" or I get...

View Article
Browsing all 73 articles
Browse latest View live




Latest Images