This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does -std=c++11 hide certain function calls


Am 05.09.2018 um 07:55 schrieb John Selbie:

With this: g++ foo.cpp -c -std=c++11
It compiles fine everywhere else, except CygWin.  Output on Cygwin:

I'm afraid that may mean everywhere else is wrong.

Yes, switching to -std=gnu++11 or adding  -D_DEFAULT_SOURCE to the command
line line works.

But I don't understand why the need to enforce these extensions to get
access to some of the most common unix libraries?

Because that's what std=c++11 is meant and documented to do. It turns off all extensions to the standard language. And yes, that does include extensions to the standard libary, up to and including POSIX-specific content.

For what you want to do, std=c++11 is simply the wrong setting.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]