简体   繁体   中英

Is it possible to enforce standard behavior with Visual Studio 2013 C++?

When porting my project to linux using gcc, I've come across quite a few errors that are a result of VS trying to be "convenient" such as using standard functions like "memcpy" and the "str*" functions without needing to include the right headers, or the std::exception::exception overload that takes a const char*. Is there anyway to force VS to not do this along with other non-standard behaviors?

In a word, no. MS has "extensions" like const char * for std::exception .

You could try setting up a "sanity" build, on say a continuous integration machine to build with another compiler to check.

Do try having the warning level turned all the way up. This may catch one or two things.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM