From: Bonita.Montero@gmail.com   
      
   A lot of errors look like that you haven't enable at C++23 properly.   
   Can you install a current g++ ? Maybe the newest from the repository   
   is sufficient.   
      
   Am 22.11.2025 um 18:35 schrieb bart:   
   > 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)   
|