karastojko / mailio

mailio is a cross platform C++ library for MIME format and SMTP, POP3, IMAP protocols. It is based on the standard C++ 17 and Boost library.
Other
381 stars 102 forks source link

Is it ok to use `-std=c++17` instead of `-std=gnu++1z` #142

Closed orchistro closed 1 year ago

orchistro commented 1 year ago

Hi,

I am using two compilers: gcc and bullseye. Bullseye does not support gnu extensions, it supports ISO c++ standard only, while gcc supports (of course😁) -std=gnu++1z.

BTW, according to the cmake documentation, theCXX_EXTENSIONS property is ON by default. It makes -std=gnu++1z be passed to bullseye, which I don't want to.

I wonder if it is ok to add set(CMAKE_CXX_EXTENSIONS OFF) to the CMakeLists.txt. Is any gnu c++ extension required ?

EDIT: Since mailio supports many platforms, it should use only ISO standard c++. I think set(CMAKE_CXX_EXTENSIONS OFF) line should be added to the CMakeLists.txt. What do you think?

Regards.

karastojko commented 1 year ago

Thanks for the remark. I have merged the PR and added you to the list of contributors. If you are familiar with the Chinese, you can also create PR to translate the sentence in English regarding your contribution in the readme file.