Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between -std=c++11 and -std=gnu++11?

Tags:

c++

gcc

c++11

clang

People also ask

What is the difference between 11 and 11 Max?

iPhone 11 Pro Max is a much bigger device, with a 6.5-inch OLED display. iPhone 11 Pro's screen measures just 5.8 inches, making it much more pocketable. Both have batteries that charge wirelessly, and both are driven by Apple's powerful new A13 Bionic processor.

Which is faster 11 or 11 pro?

The A13 chipset is the next-generation of Apple's silicone and it provides absolutely fantastic performance across all Apple's 2019 iPhones. There's no obvious difference in terms of speed and graphical power between the iPhone 11 and 11 Pro though, so don't pick up the pricier model expecting it to run games faster.

Why is the 11 pro smaller than the 11?

Apple's iPhone has gone “pro” for its 11th iteration, with dramatically improved cameras and longer battery life, which make the smaller iPhone 11 Pro the king of more manageable phones.


As you have found out yourself, the difference between the two options is whether GNU extensions that violates/extend the C++ standard are enabled or not. The GNU C++ extensions are described here. You can also use most of the GNU C extensions (described here) in your C++ programs. It would be also useful to read about the -Wpedantic GCC option here.

Note that some extensions can still be in effect when using -std=c++11, as long as they do not contradict the standard. For instance, when using the MinGW compiler, I need the extensions for a working Boost.Lexical_Cast. But, as long as you don't use any of them, you are better off sticking to the standard without extensions for maximum portability. This might come in handy if you find yourself forced to change compiler.