Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread Martin Sebor
C U+1EBC If you want to use transform with wide characters, you need to use towupper (declared in ). Martin [*] I vaguely recall toupper and friends aborting on Windows when passed an out-of-range argument but I'm not 100% sure. -----Original Message- From: Martin Sebor Sent: Tues

Re: [Mingw-w64-public] toUpper()

2015-07-01 Thread Martin Sebor
On 06/30/2015 05:24 PM, Riot wrote: > #include > #include > > std::string str = "Hello World"; > std::transform(str.begin(), str.end(), str.begin(), std::toupper); Please note this code is subtly incorrect for two reasons. There are two overloads of std::toupper: 1) int toup

Re: [Mingw-w64-public] [[ noreturn ]]

2015-05-29 Thread Martin Sebor
On 05/29/2015 03:03 PM, Hotmail (ArbolOne) wrote: > This is the actual code where the test takes place: > void ascii_all [[ noreturn ]] () { > uint32_t ASCII_MAX = 255; > std::wstring a; > > for (uint32_t i = 0; i <= ASCII_MAX; i++) { > a = i; > size_t w1/*, w2*/; >

Re: [Mingw-w64-public] [[ noreturn ]]

2015-05-29 Thread Martin Sebor
On 05/28/2015 08:46 PM, Hotmail (ArbolOne) wrote: > Hi! > When using this the [[ noreturn ]] attribute like this: - void f [[ > noreturn ]] (); - I get a warning that reads: > warning: 'noreturn' function does return > ( http://www.stroustrup.com/C++11FAQ.html#attributes ) > What can I do to remove

Re: [Mingw-w64-public] GCCG with C++11

2015-05-28 Thread Martin Sebor
On 05/28/2015 10:31 AM, Jonathan Wakely wrote: > On 28 May 2015 at 16:51, Martin Sebor wrote: >> The standard specifies that implementations conforming to C++ >> 11 must define the __cplusplus macro to 201103L, and recommends >> that non-conforming compilers (presumably thos

Re: [Mingw-w64-public] GCCG with C++11

2015-05-28 Thread Martin Sebor
On 05/28/2015 09:24 AM, Hotmail (ArbolOne) wrote: > If I am not mistaken _MSC_VER >= 1600 is the version that started > implementing C++11. So, I test for that version of the compiler in my > code, i.e. > #ifdef _MSC_VER >= 1600 > > #endif > I would like to do the same for __GNUG__, but wh