Does “volatile” guarantee anything at all in portable C code for multi-core systems?

I’m no expert, but cppreference.com has what appears to me to be some pretty good information on volatile. Here’s the gist of it: Every access (both read and write) made through an lvalue expression of volatile-qualified type is considered an observable side effect for the purpose of optimization and is evaluated strictly according to the … Read more

Does TortoiseGit work with PortableGit-x.x.x.x-previewyyyyyy? What are compatible git versions for TortoiseGit?

TortoiseGit (as of 2.14) requires a command-line git.exe. It works with a variety of different “git.exe providers”. Known to work are: Git for Windows 2.24+ (https://gitforwindows.org/, based on MSYS2; portable and installer are known to work; recommended; for Git for Windows >= 2.16 you need at least TortoiseGit 2.5.7; older versions of Git are not … Read more

Portable Compare And Swap (atomic operations) C/C++ library?

OPA (Open Portable Atomics) could be a good fit for your needs. https://trac.mcs.anl.gov/projects/openpa/ It provides a consistent C API to common atomic operations across multiple platforms under an MIT-style license. The library is small and certainly meets your size requirements. The current platform list is: GCC inline assembly for x86, x86_64, ia64, PPC 440, and … Read more

How can I mark a C++ class method as deprecated?

In C++14, you can mark a function as deprecated using the [[deprecated]] attribute (see section 7.6.5 [dcl.attr.deprecated]). The attribute-token deprecated can be used to mark names and entities whose use is still allowed, but is discouraged for some reason. For example, the following function foo is deprecated: [[deprecated]] void foo(int); It is possible to provide … Read more