Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Browsing all 223 articles
Browse latest View live
↧

Comment by Peter - Reinstate Monica on Resource sharing / locking between two...

Uh-hm, Windows 7. I sure hope they are not attached to any wires that leave the office ;-).

View Article


Comment by Peter - Reinstate Monica on Is `(expession, lvalue) = rvalue` a...

@sleeptightAnsiC Oh, I see: the (...) expression is not an lavalue in C, but it desn't have to be -- xx[0] is an lvalue even if xx is not, cool! (As an aside, in C you could also revert the operands...

View Article


Comment by Peter - Reinstate Monica on fopen not seeing my file despite...

Relative paths are notoriously unreliable when working with build systems. (What is the "current directory"? The location of the exe? The location of the project? The directory from which the IDE was...

View Article

Comment by Peter - Reinstate Monica on Does the C standard provide a...

Well, it seems by the references you found that the term for an array of unknown size is indeed "array of unknown size" ;-). Particularly convincing is the editorial change in n3299 you mention.

View Article

Comment by Peter - Reinstate Monica on Is `(expression, lvalue) = rvalue` a...

@sleeptightAnsiC Oh, I see: the (...) expression is not an lavalue in C, but it desn't have to be -- xx[0] is an lvalue even if xx is not, cool! (As an aside, in C you could also revert the operands...

View Article


Comment by Peter - Reinstate Monica on What happens if i mix c with c++ in a...

@HolyBlackCat You mean that the names then are global as well as in std? I didn't know that, actually!

View Article

Comment by Peter - Reinstate Monica on how do they function in absorbing...

If I can trust Deepl, this is off-topic for Stackoverflow which is about computing and programming. (Besides being Japanese, apparently -- SO requires English).

View Article

Comment by Peter - Reinstate Monica on c++ typewriter effect delay issues?

From the Microsoft documentation on Sleep(): "Use caution when calling timeBeginPeriod, as frequent calls can significantly affect the system clock, system power usage, and the scheduler. If you call...

View Article


Comment by Peter - Reinstate Monica on std::iota is very limited

I see the OO opponents rolling their eyes -- ca. 5000 lines of headers and 15 lines of own code to produce the first 10 even numbers ;-).

View Article


Answer by Peter - Reinstate Monica for std::iota is very limited

With strides from C++23 you can writeiota(0) | stride(2)instead ofiota(0) | filter([](auto i) { return i % 2 == 0; })which feels much more clumsy and unnecessarily computing intensive (even if the...

View Article

Comment by Peter - Reinstate Monica on How do I successfully test this...

Well, the pointers are local variables and thus on the stack, but I admit it's probably not (fully) what the problem intended, which is to take advantage of implicit information on the stack (the...

View Article

Comment by Peter - Reinstate Monica on c++ typewriter effect delay issues?

From the Microsoft documentation on Sleep(): "Use caution when calling timeBeginPeriod, as frequent calls can significantly affect the system clock, system power usage, and the scheduler. If you call...

View Article

std::async: does "as if in a new thread" guarantee that it is safe to use...

The 2020 standard says (23.9.9/4.1):If launch::async is set in policy, calls invoke(decay-copy(std::forward(f)), decaycopy(std::forward(args))...) (20.14.4, 32.4.3.3) as if in a new thread of execution...

View Article


Comment by Peter - Reinstate Monica on One MinGW, many GCC versions - how to...

I have the same question for mingw under msys. Msys has a generic mingw gcc packet which updates/upgrades gcc to a new version whenever the maintainers have created one, currently 14.2.0-2. I'd like to...

View Article

Comment by Peter - Reinstate Monica on linking gcc compiled c application to...

Did the calls that used to work indeed work with the same Fortran library binary -- or has the library bee recompiled/updated? Because I see that the Fortran compiler g77 has -fno-underscoring which...

View Article


Comment by Peter - Reinstate Monica on How Important Are These Modules for a...

I'm not sure whether this is a good Stackoverflow question but I can offer a bit of general advice: The only hting that really helped me in my software developer and -tester career was the systematic...

View Article

Comment by Peter - Reinstate Monica on C: handle pointer to subset of array...

I wonder whether double (*smallarr_ptr)[10] = &bigarr[297]; is defined behavior because there is no array of 10 elements there. There are (ideally) 10 elements, but that's a different matter....

View Article


Comment by Peter - Reinstate Monica on How to write a performant & UB-free...

Simply use -fnostrict-aliasing... that's what the kernel people do afaik, who are extremely interested in performance.

View Article

Comment by Peter - Reinstate Monica on C++ Convert string to float

Perhaps worth mentioning that the number is at the edge of single precision resolution (23 bits or a bit more than 7 decimal digits for IEEE 754 floats).

View Article

Comment by Peter - Reinstate Monica on Why are log lines missing without a...

The mutex makes guarantees about memory in the same process. It says nothing about side effects beyond that; in this case, it has no effect like triggering a call to flush() or waiting for the...

View Article
Browsing all 223 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>