Re: Poll: C++11 compiler support

Nux! <[email protected]> Mon, 6 Mar 2017 08:52:27 +0000 (GMT)
Newsgroups gmane.mail.cone,gmane.mail.imap.courier.general,gmane.mail.imap.courier.sqwebmail,gmane.mail.imap.courier.server,gmane.mail.maildrop
Message-ID <[email protected]>
Hello,

Got errors with both commands:
CentOS 6 x86_64, gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)

This could have some impact as CentOS 6 is still pretty used in the server world.

g++ -o utest utest.C
utest.C: In function ‘int main()’:
utest.C:5: error: ‘char32_t’ was not declared in this scope
utest.C:5: error: expected ‘;’ before ‘c’
utest.C:6: error: ‘u32string’ is not a member of ‘std’
utest.C:6: error: expected ‘;’ before ‘u’

g++ -std=c++11 -o utest utest.C
cc1plus: error: unrecognized command line option "-std=c++11"

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Sam Varshavchik" <[email protected]>
> To: [email protected], [email protected], [email protected],
> "SqWebMail mailing list" <[email protected]>, "Maildrop mailing list"
> <[email protected]>, [email protected]
> Sent: Sunday, 5 March, 2017 20:21:43
> Subject: [cone] Poll: C++11 compiler support

> The forward match of progress is requiring a clean break from the pre-c++11
> days. Under consideration is migrating the courier-unicode library, used by
> both Courier and Cone, to use C++11's unicode support only.
> 
> I am taking a poll whether there's still any notable platforms where Courier
> and Cone is used that's still using an old compiler that does not support
> C++11.
> 
> According to gcc's documentation, gcc 4.8.1 was the first version with full
> C++11 support; but it's likely that older versions of gcc had sufficient
> support. gcc 4.5's compliance page gives Unicode string literals as
> supported, so I'm fairly confident of sufficient C++11 unicode support at
> least in gcc 4.5, at the latest.
> 
> I'd like to know if your compiler does not support C++11 unicode strings.
> This can be determined with a simple test:
> 
> #include <string>
> 
> int main()
> {
>    char32_t c=0;
>    std::u32string u;
> 
>    return 0;
> }
> 
> Save the above as "utest.C", then execute either:
> 
> g++ -o utest utest.C
> 
> or
> 
> g++ -std=c++11 -o utest utest.C
> 
> If either one completes without errors, you're good. This is if your
> compiler is "g++", of course. Certain platforms, like Debian, FreeBSD, and
> many others, might have multiple versions of gcc installed; typically as
> "g++NN". Use the appropriate command for your gcc.
> 
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Courier-cone mailing list
> [email protected]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-cone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Courier-cone mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-cone