Search Results

Search found 2 results on 1 pages for 'murrekatt'.

Page 1/1 | 1 

  • emacs public/protected/private label indentation of C++ header file not working for zero offset

    - by murrekatt
    I cannot get zero offset for some things for my C++ header files in emacs even if I have it defined in my .emacs file. The header file below shows a class definition inside two namespaces and most importantly the public keyword I would like to have with zero offset like below. namespace n1 { namespace n2 { class SomeClass { public: // this line with zero offset SomeClass(); ... }; } // n2 } // n2 In my .emacs file I have added label like this: (c-set-offset 'label 0) I used Ctrl-C Ctrl-S to find out what to modify. Other offsets I have defined in the .emacs file are working fine and also values other than 0 work for label. When I set offset 0 for label it turns out to be 1 when hitting tab for that line. This is strange and looks like something else is overriding or adding a minimum of 1. Can anyone explain how I can achieve what I want and maybe also an explanation what is happening currently? Phew, this was my first question here. Thanks :)

    Read the article

  • Clarification of atomic memory access for different OSs

    - by murrekatt
    I'm currently porting a Windows C++ library to MacOS as a hobby project as a learning experience. I stumbled across some code using the Win Interlocked* functions and thus I've been trying to read up on the subject in general. Reading related questions here in SO, I understand there are different ways to do these operations depending on the OS. Interlocked* in Windows, OSAtomic* in MacOS and I also found that compilers have builtin (intrinsic) operations for this. After reading gcc builtin atomic memory access, I'm left wondering what is the difference between intrinsic and the OSAtomic* or Interlocked* ones? I mean, can I not choose between OSAtomic* or gcc builtin if I'm on MacOS when I use gcc? The same if I'd be on Windows using gcc. I also read that on Windows Interlocked* come as both inline and intrinsic versions. What to consider when choosing between intrinsic or inline? In general, are there multiple options on OSs what to use? Or is this again "it depends"? If so, what does it depend on? Thanks!

    Read the article

1