About 11,000 results
Open links in new tab
  1. How to use enums as flags in C++? - Stack Overflow

    Sep 19, 2009 · I marked the operator bool override with C++11's explicit keyword to prevent it from resulting in int conversions, as those could cause sets of flags to end up collapsed into 0 or 1 when …

  2. c++ - How do flags work in C? - Stack Overflow

    Apr 2, 2016 · Recently I have come across several examples of "flags" in C and C++, and I don't quite understand how they work. After looking at some source code I noticed that often flag values are …

  3. c++ - gcc -g :what will happen - Stack Overflow

    13 The -g flag tells the compiler to generate debugging information. It has no impact on whether or not a core file will be generated. On most unix-like systems, that can be setup using the ulimit command.

  4. How to use C++11 enum class for flags - Stack Overflow

    Sep 15, 2015 · Also, it avoids the use of macros, so the compiler can warn you if it is not happy. Lastly, without the comments, it isn't a lot of code. You're not making a class and setting a bunch of …

  5. How to make functions with flag parameters? (C++)

    Oct 19, 2009 · How to make functions with flag parameters? (C++) Asked 16 years, 2 months ago Modified 16 years, 2 months ago Viewed 20k times

  6. c++ - What's the point of g++ -Wreorder? - Stack Overflow

    The g++ -Wall option includes -Wreorder. What this option does is described below. It is not obvious to me why somebody would care (especially enough to turn this on by default in -Wall). -Wreord...

  7. c++ - GCC -fPIC option - Stack Overflow

    Mar 15, 2011 · I have read about GCC's Options for Code Generation Conventions, but could not understand what "Generate position-independent code (PIC)" does. Please give an example to …

  8. design patterns - C++ setting up "flags" - Stack Overflow

    Apr 4, 2010 · The first step is to set the numerical value of each flag an exponential value of 2 (ex - 1,2,4,8,16,32,64,etc...), so in binary it would look like 0001,0010,0100,1000 and so forth.

  9. c++ - Check if flag is set in integer variable - Stack Overflow

    Check if flag is set in integer variable Asked 13 years, 1 month ago Modified 7 years, 5 months ago Viewed 35k times

  10. How does gcc's linktime optimisation (-flto flag) work

    Apr 30, 2015 · GCC's -flto emits a serialized form of GCC's internal representation, as you discovered. Then, at link time, the linker reinvokes GCC and passes it the objects that need final compilation. …