home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,044 of 243,242   
   bart to Bonita Montero   
   Re: Unicode...   
   22 Nov 25 17:35:12   
   
   From: bc@freeuk.com   
      
   On 22/11/2025 17:13, Bonita Montero wrote:   
   > You can compile the code with -mavx512bw.   
   > This is "inline.h":   
      
   But I now get, from:   
      
      g++ =std=c++23 -mavx512bw -O2 c.cpp   
      
   the errors shown below. I tried -fconcepts too.   
      
   So, what also do I need? (So far you're not selling C++ very well!)   
      
   ---------------------------------   
      
   c.cpp:33:54: warning: use of C++23 'make_signed_t' integer constant   
       33 |             if( (*it & 0xC0) == 0x80 || width > min( 4Z, rem )   
   ) [[unlikely]]   
          |                                                      ^~   
   c.cpp:24:5: error: 'requires' does not name a type   
       24 |     requires std::same_as ||   
   std::same_as   
          |     ^~~~~~~~   
   c.cpp:24:5: note: 'requires' only available with '-std=c++20' or   
   '-fconcepts'   
   c.cpp: In function 'size_t utf8widthC(const char*)':   
   c.cpp:52:10: error: 'char8_t' was not declared in this scope; did you   
   mean 'wchar_t'?   
       52 |     for( char8_t c; (c = *str); ++length )   
          |          ^~~~~~~   
          |          wchar_t   
   c.cpp:52:22: error: 'c' was not declared in this scope   
       52 |     for( char8_t c; (c = *str); ++length )   
          |                      ^   
   c.cpp: In function 'size_t utf8Width512(const char*)':   
   c.cpp:99:21: error: 'countr_one' was not declared in this scope   
       99 |     unsigned ones = countr_one( nzMask );   
          |                     ^~~~~~~~~~   
   c.cpp: In function 'size_t utf8Width256(const char*)':   
   c.cpp:150:21: error: 'countr_one' was not declared in this scope   
      150 |     unsigned ones = countr_one( nzMask );   
          |                     ^~~~~~~~~~   
   c.cpp: In function 'int main()':   
   c.cpp:192:5: error: 'span' was not declared in this scope   
      192 |     span ranges( rawRanges );   
          |     ^~~~   
   c.cpp:192:5: note: 'std::span' is only available from C++20 onwards   
   c.cpp:193:5: error: 'char8_t' was not declared in this scope; did you   
   mean 'wchar_t'?   
      193 |     char8_t rawTypeHeads[4] { 0, 0xC0, 0xE0, 0xF0 };   
          |     ^~~~~~~   
          |     wchar_t   
   c.cpp:194:9: error: expected ';' before 'typeHeads'   
      194 |     span typeHeads( rawTypeHeads );   
          |         ^~~~~~~~~~   
          |         ;   
   c.cpp:196:5: error: 'u8string' was not declared in this scope   
      196 |     u8string u8Str( BUF_MIN + 3, (char8_t)0 );   
          |     ^~~~~~~~   
   c.cpp:196:5: note: 'std::u8string' is only available from C++20 onwards   
   c.cpp:197:20: error: 'u8string' does not name a type   
      197 |     using u8s_it = u8string::iterator;   
          |                    ^~~~~~~~   
   c.cpp:198:5: error: 'u8s_it' was not declared in this scope   
      198 |     u8s_it   
          |     ^~~~~~   
   c.cpp:201:30: error: 'itChar' was not declared in this scope   
      201 |     for( size_t width, type; itChar < itCharEnd; itChar += width )   
          |                              ^~~~~~   
   c.cpp:201:39: error: 'itCharEnd' was not declared in this scope   
      201 |     for( size_t width, type; itChar < itCharEnd; itChar += width )   
          |                                       ^~~~~~~~~   
   c.cpp:205:23: error: 'ranges' was not declared in this scope; did you   
   mean 'rawRanges'?   
      205 |         char32_t c = (ranges[type])( mt );   
          |                       ^~~~~~   
          |                       rawRanges   
   c.cpp:206:20: error: expected ';' before 'itTail'   
      206 |         for( u8s_it itTail = itChar + width; --itTail > itChar;   
   c >>= 6 )   
          |                    ^~~~~~~   
          |                    ;   
   c.cpp:206:48: error: 'itTail' was not declared in this scope   
      206 |         for( u8s_it itTail = itChar + width; --itTail > itChar;   
   c >>= 6 )   
          |                                                ^~~~~~   
   c.cpp:208:19: error: 'typeHeads' was not declared in this scope   
      208 |         *itChar = typeHeads[type] | (char8_t)c;   
          |                   ^~~~~~~~~   
   c.cpp:210:5: error: 'u8Str' was not declared in this scope   
      210 |     u8Str.resize( itChar - u8Str.begin() );   
          |     ^~~~~   
   c.cpp:210:19: error: 'itChar' was not declared in this scope   
      210 |     u8Str.resize( itChar - u8Str.begin() );   
          |                   ^~~~~~   
   c.cpp:228:25: error: 'u8string' is not a type   
      228 |     bench( "my: ", [&]( u8string const &str ) { total +=   
   utf8Width256( (char *)str.c_str() ); } );   
          |                         ^~~~~~~~   
   c.cpp: In lambda function:   
   c.cpp:228:84: error: request for member 'c_str' in 'str', which is of   
   non-class type 'const int'   
      228 |     bench( "my: ", [&]( u8string const &str ) { total +=   
   utf8Width256( (char *)str.c_str() ); } );   
          |   
                       ^~~~~   
   c.cpp: In function 'int main()':   
   c.cpp:229:27: error: 'u8string' is not a type   
      229 |     bench( "nerd: ", [&]( u8string const &str ) { total +=   
   utf8widthC( (char *)str.c_str() ); } );   
          |                           ^~~~~~~~   
   c.cpp: In lambda function:   
   c.cpp:229:84: error: request for member 'c_str' in 'str', which is of   
   non-class type 'const int'   
      229 |     bench( "nerd: ", [&]( u8string const &str ) { total +=   
   utf8widthC( (char *)str.c_str() ); } );   
          |   
                       ^~~~~   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca